]> git.pld-linux.org Git - packages/dgee.git/blame - dgee.spec
- do more tests in post and preun section
[packages/dgee.git] / dgee.spec
CommitLineData
c6f3af49 1#
2# TODO:
3# --without apache1 (default) should build mod_dgee.so for
4# apache2 - it doesn't
5#
6
d6258be9 7%bcond_with apache1
39709ac0 8%define apxs /usr/sbin/apxs
265c2052 9%define _rel 2
10Summary: The DotGNU Execution Environment Core
11Name: dgee
12Version: 0.1.6
38f3bc83 13Release: %{_rel}.0.2
265c2052 14Source0: http://www.nfluid.com/download/src/%{name}-%{version}-%{_rel}.tgz
15# Source0-md5: a2573a076832c4c7212479cabda15eff
7d976bf3 16Source1: %{name}.init
17Source2: %{name}.logrotate
265c2052 18Patch0: %{name}-DESTDIR.patch
19Patch1: %{name}-apache.patch
39709ac0 20Patch2: %{name}-dglib_fix_so.patch
38f3bc83 21Patch3: %{name}-pythonvm.patch
265c2052 22License: GPL
23Vendor: DotGNU
24Group: Networking/Daemons
a3692708 25BuildRequires: apache-devel
265c2052 26BuildRequires: expat-devel
89066afc 27BuildRequires: goldwater-devel => 0.3.4
28BuildRequires: phlib-devel => 1.20
29BuildRequires: pnet-devel => 0.6.0-2
39709ac0 30BuildRequires: %{apxs}
31Requires: apache
c6f3af49 32Requires: goldwater
39709ac0 33Requires(post,preun): %{apxs}
c6f3af49 34Requires(post,preun): /sbin/chkconfig
35Requires(post,postun): /sbin/ldconfig
265c2052 36BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38%description
39The core DotGNU Execution Environment that provides the functionality
40of accepting, validating and satisfying web service requests.
41
42%prep
43%setup -q
44%patch0 -p1
45%patch1 -p1
39709ac0 46%patch2 -p1
38f3bc83 47%patch3 -p1
5a444393 48
265c2052 49%build
50%{__aclocal}
51%{__autoconf}
52%{__automake}
53%configure \
54 --with-goldwater=%{_prefix} \
a3692708 55 --with-pnet=%{_prefix} \
5a444393 56 --with-repository=/var/lib/%{name} \
39709ac0 57 --with-username=http \
58 --with-usergroup=http \
38f3bc83 59 --with-python \
d6258be9 60%if %{with apache1}
61 --with-apache=%{_prefix}
62%else
a3692708 63 --without-apache \
64 --with-apache2=%{_prefix}
d6258be9 65%endif
265c2052 66
d6258be9 67%if %{with apache1}
68%{__make}
69%else
a3692708 70%{__make} \
71 APACHE=
d6258be9 72%endif
265c2052 73
74%install
75rm -rf $RPM_BUILD_ROOT
d6258be9 76%if %{with apache1}
77%{__make} install \
78 DESTDIR=$RPM_BUILD_ROOT
79%else
265c2052 80%{__make} install \
a3692708 81 DESTDIR=$RPM_BUILD_ROOT \
82 APACHE=
d6258be9 83%endif
5a444393 84# Thise files should be installed by Makefile (I can't fix it):
85install cslib/DotGNU/DGEE/DotGNU.DGEE.dll \
86 $RPM_BUILD_ROOT/%{_libdir}/%{name}
87install cslib/System/Web/Services/System.Web.Services.dll \
88 $RPM_BUILD_ROOT/%{_libdir}/%{name}
89install cslib/DotGNU/DGEE/Protocols/XmlRpc/XmlRpcService.exe \
90 $RPM_BUILD_ROOT/%{_libdir}/%{name}
91
92install -d $RPM_BUILD_ROOT/var/lib/%{name}/{index,data}
93install -d $RPM_BUILD_ROOT/var/log/%{name}
7d976bf3 94touch $RPM_BUILD_ROOT/var/log/%{name}/{%{name}.log,stdout,stderr}
5a444393 95install -d $RPM_BUILD_ROOT/var/log/archiv/%{name}
96install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
97install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
7d976bf3 98install -d $RPM_BUILD_ROOT/etc/logrotate.d
99install %{SOURCE2} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
100
d6258be9 101
102%post
103%if %{with apache1}
104if [ -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
107fi
108%endif
109
110%{apxs} -e -a -n dgee %{_pkglibdir}/mod_dgee.so 1>&2
111if [ -f /var/lock/subsys/httpd ]; then
112 /etc/rc.d/init.d/httpd restart 1>&2
113fi
114
7d976bf3 115/sbin/ldconfig
0513f6a1 116
117if [ -f /var/lock/subsys/dgee ]; then
118 /etc/rc.d/init.d/dgee restart 1>&2
119else
120 echo "Run \"/etc/rc.d/init.d/dgee start\" to start goltwater and dgee services."
121fi
c6f3af49 122/sbin/chkconfig --add dgee
7d976bf3 123
d6258be9 124%preun
125if [ "$1" = "0" ]; then
126%if %{with apache1}
127 umask 027
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
131%endif
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
135 fi
0513f6a1 136 if [ -f /var/lock/subsys/dgee ]; then
137 /etc/rc.d/init.d/dgee stop 1>&2
138 fi
139 /sbin/chkconfig --del dgee
d6258be9 140fi
141
7d976bf3 142%postun
143/sbin/ldconfig
d6258be9 144
265c2052 145%clean
39709ac0 146#rm -rf $RPM_BUILD_ROOT
265c2052 147
148%files
149%defattr(644,root,root,755)
150%doc BINARYINSTALL INSTALL QUICKSTART README COPYING
151%attr(755,root,root) %{_bindir}/*
152%config %{_sysconfdir}/%{name}*
7d976bf3 153%dir %{_libdir}/%{name}
154%attr(755,root,root) %{_libdir}/%{name}/*
265c2052 155%{_libdir}/libdgee.*
156%{_libdir}/libdgxml.*
d6258be9 157%if %{with apache1}
158%config %{_sysconfdir}/httpd/mod_%{name}.conf
159%{_libdir}/apache/mod_%{name}.so
160%else
a3692708 161#%config %{_sysconfdir}/httpd/mod_%{name}.conf
162#%{_libdir}/apache/mod_%{name}.so
d6258be9 163%endif
265c2052 164%{_datadir}/%{name}
5a444393 165/var/lib/%{name}
166%attr(754,root,root) /etc/rc.d/init.d/%{name}
7d976bf3 167%attr(730,root,http) %dir /var/log/%{name}
168%attr(660,root,http) /var/log/%{name}/*
5a444393 169%attr(750,root,root) %dir /var/log/archiv/%{name}
7d976bf3 170%attr(640,root,root) %config(noreplace) /etc/logrotate.d/*
265c2052 171
172# Local variables:
173# mode: rpm-spec
174# end:
This page took 0.088528 seconds and 4 git commands to generate.