3 # --without apache1 (default) should build mod_dgee.so for
8 %define apxs /usr/sbin/apxs
10 Summary: The DotGNU Execution Environment Core
14 Source0: http://www.nfluid.com/download/src/%{name}-%{version}-%{_rel}.tgz
15 # Source0-md5: a2573a076832c4c7212479cabda15eff
17 Source2: %{name}.logrotate
18 Patch0: %{name}-DESTDIR.patch
19 Patch1: %{name}-apache.patch
20 Patch2: %{name}-dglib_fix_so.patch
21 Patch3: %{name}-pythonvm.patch
24 Group: Networking/Daemons
25 BuildRequires: apache-devel
26 BuildRequires: expat-devel
27 BuildRequires: goldwater-devel => 0.3.4
28 BuildRequires: phlib-devel => 1.20
29 BuildRequires: pnet-devel => 0.6.0-2
30 BuildRequires: %{apxs}
33 Requires(post,preun): %{apxs}
34 Requires(post,preun): /sbin/chkconfig
35 Requires(post,postun): /sbin/ldconfig
36 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39 The core DotGNU Execution Environment that provides the functionality
40 of accepting, validating and satisfying web service requests.
54 --with-goldwater=%{_prefix} \
55 --with-pnet=%{_prefix} \
56 --with-repository=/var/lib/%{name} \
57 --with-username=http \
58 --with-usergroup=http \
61 --with-apache=%{_prefix}
64 --with-apache2=%{_prefix}
75 rm -rf $RPM_BUILD_ROOT
78 DESTDIR=$RPM_BUILD_ROOT
81 DESTDIR=$RPM_BUILD_ROOT \
84 # Thise files should be installed by Makefile (I can't fix it):
85 install cslib/DotGNU/DGEE/DotGNU.DGEE.dll \
86 $RPM_BUILD_ROOT/%{_libdir}/%{name}
87 install cslib/System/Web/Services/System.Web.Services.dll \
88 $RPM_BUILD_ROOT/%{_libdir}/%{name}
89 install cslib/DotGNU/DGEE/Protocols/XmlRpc/XmlRpcService.exe \
90 $RPM_BUILD_ROOT/%{_libdir}/%{name}
92 install -d $RPM_BUILD_ROOT/var/lib/%{name}/{index,data}
93 install -d $RPM_BUILD_ROOT/var/log/%{name}
94 touch $RPM_BUILD_ROOT/var/log/%{name}/{%{name}.log,stdout,stderr}
95 install -d $RPM_BUILD_ROOT/var/log/archiv/%{name}
96 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
97 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
98 install -d $RPM_BUILD_ROOT/etc/logrotate.d
99 install %{SOURCE2} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
104 if [ -f /etc/httpd/httpd.conf ] && \
105 ! grep -q "^Include.*/mod_dgee.conf" /etc/httpd/httpd.conf; then
106 echo "Include /etc/httpd/mod_dgee.conf" >> /etc/httpd/httpd.conf
110 %{apxs} -e -a -n dgee %{_pkglibdir}/mod_dgee.so 1>&2
111 if [ -f /var/lock/subsys/httpd ]; then
112 /etc/rc.d/init.d/httpd restart 1>&2
117 if [ -f /var/lock/subsys/dgee ]; then
118 /etc/rc.d/init.d/dgee restart 1>&2
120 echo "Run \"/etc/rc.d/init.d/dgee start\" to start goltwater and dgee services."
122 /sbin/chkconfig --add dgee
125 if [ "$1" = "0" ]; then
128 grep -E -v "^Include.*/mod_dgee.conf" /etc/httpd/httpd.conf > \
129 /etc/httpd/httpd.conf.tmp
130 mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
132 %{apxs} -e -A -n dgee %{_pkglibdir}/mod_dgee.so 1>&2
133 if [ -f /var/lock/subsys/httpd ]; then
134 /etc/rc.d/init.d/httpd restart 1>&2
136 if [ -f /var/lock/subsys/dgee ]; then
137 /etc/rc.d/init.d/dgee stop 1>&2
139 /sbin/chkconfig --del dgee
146 #rm -rf $RPM_BUILD_ROOT
149 %defattr(644,root,root,755)
150 %doc BINARYINSTALL INSTALL QUICKSTART README COPYING
151 %attr(755,root,root) %{_bindir}/*
152 %config %{_sysconfdir}/%{name}*
153 %dir %{_libdir}/%{name}
154 %attr(755,root,root) %{_libdir}/%{name}/*
156 %{_libdir}/libdgxml.*
158 %config %{_sysconfdir}/httpd/mod_%{name}.conf
159 %{_libdir}/apache/mod_%{name}.so
161 #%config %{_sysconfdir}/httpd/mod_%{name}.conf
162 #%{_libdir}/apache/mod_%{name}.so
166 %attr(754,root,root) /etc/rc.d/init.d/%{name}
167 %attr(730,root,http) %dir /var/log/%{name}
168 %attr(660,root,http) /var/log/%{name}/*
169 %attr(750,root,root) %dir /var/log/archiv/%{name}
170 %attr(640,root,root) %config(noreplace) /etc/logrotate.d/*