]>
Commit | Line | Data |
---|---|---|
d6258be9 | 1 | %bcond_with apache1 |
39709ac0 | 2 | %define apxs /usr/sbin/apxs |
265c2052 | 3 | %define _rel 2 |
4 | Summary: The DotGNU Execution Environment Core | |
5 | Name: dgee | |
6 | Version: 0.1.6 | |
5a444393 | 7 | Release: %{_rel}.0.1.4 |
265c2052 | 8 | Source0: http://www.nfluid.com/download/src/%{name}-%{version}-%{_rel}.tgz |
5a444393 | 9 | Source1: %{name}.init |
265c2052 | 10 | # Source0-md5: a2573a076832c4c7212479cabda15eff |
11 | Patch0: %{name}-DESTDIR.patch | |
12 | Patch1: %{name}-apache.patch | |
39709ac0 | 13 | Patch2: %{name}-dglib_fix_so.patch |
265c2052 | 14 | License: GPL |
15 | Vendor: DotGNU | |
16 | Group: Networking/Daemons | |
a3692708 | 17 | BuildRequires: apache-devel |
265c2052 | 18 | BuildRequires: expat-devel |
89066afc | 19 | BuildRequires: goldwater-devel => 0.3.4 |
20 | BuildRequires: phlib-devel => 1.20 | |
21 | BuildRequires: pnet-devel => 0.6.0-2 | |
39709ac0 | 22 | BuildRequires: %{apxs} |
23 | Requires: apache | |
24 | Requires(post,preun): %{apxs} | |
265c2052 | 25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
26 | ||
27 | %description | |
28 | The core DotGNU Execution Environment that provides the functionality | |
29 | of accepting, validating and satisfying web service requests. | |
30 | ||
31 | %prep | |
32 | %setup -q | |
33 | %patch0 -p1 | |
34 | %patch1 -p1 | |
39709ac0 | 35 | %patch2 -p1 |
5a444393 | 36 | |
265c2052 | 37 | %build |
38 | %{__aclocal} | |
39 | %{__autoconf} | |
40 | %{__automake} | |
41 | %configure \ | |
42 | --with-goldwater=%{_prefix} \ | |
a3692708 | 43 | --with-pnet=%{_prefix} \ |
5a444393 | 44 | --with-repository=/var/lib/%{name} \ |
39709ac0 | 45 | --with-username=http \ |
46 | --with-usergroup=http \ | |
d6258be9 | 47 | %if %{with apache1} |
48 | --with-apache=%{_prefix} | |
49 | %else | |
a3692708 | 50 | --without-apache \ |
51 | --with-apache2=%{_prefix} | |
d6258be9 | 52 | %endif |
265c2052 | 53 | |
d6258be9 | 54 | %if %{with apache1} |
55 | %{__make} | |
56 | %else | |
a3692708 | 57 | %{__make} \ |
58 | APACHE= | |
d6258be9 | 59 | %endif |
265c2052 | 60 | |
61 | %install | |
62 | rm -rf $RPM_BUILD_ROOT | |
d6258be9 | 63 | %if %{with apache1} |
64 | %{__make} install \ | |
65 | DESTDIR=$RPM_BUILD_ROOT | |
66 | %else | |
265c2052 | 67 | %{__make} install \ |
a3692708 | 68 | DESTDIR=$RPM_BUILD_ROOT \ |
69 | APACHE= | |
d6258be9 | 70 | %endif |
5a444393 | 71 | # Thise files should be installed by Makefile (I can't fix it): |
72 | install cslib/DotGNU/DGEE/DotGNU.DGEE.dll \ | |
73 | $RPM_BUILD_ROOT/%{_libdir}/%{name} | |
74 | install cslib/System/Web/Services/System.Web.Services.dll \ | |
75 | $RPM_BUILD_ROOT/%{_libdir}/%{name} | |
76 | install cslib/DotGNU/DGEE/Protocols/XmlRpc/XmlRpcService.exe \ | |
77 | $RPM_BUILD_ROOT/%{_libdir}/%{name} | |
78 | ||
79 | install -d $RPM_BUILD_ROOT/var/lib/%{name}/{index,data} | |
80 | install -d $RPM_BUILD_ROOT/var/log/%{name} | |
81 | install -d $RPM_BUILD_ROOT/var/log/archiv/%{name} | |
82 | install -d $RPM_BUILD_ROOT/etc/rc.d/init.d | |
83 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} | |
d6258be9 | 84 | |
85 | %post | |
86 | %if %{with apache1} | |
87 | if [ -f /etc/httpd/httpd.conf ] && \ | |
88 | ! grep -q "^Include.*/mod_dgee.conf" /etc/httpd/httpd.conf; then | |
89 | echo "Include /etc/httpd/mod_dgee.conf" >> /etc/httpd/httpd.conf | |
90 | fi | |
91 | %endif | |
92 | ||
93 | %{apxs} -e -a -n dgee %{_pkglibdir}/mod_dgee.so 1>&2 | |
94 | if [ -f /var/lock/subsys/httpd ]; then | |
95 | /etc/rc.d/init.d/httpd restart 1>&2 | |
96 | fi | |
97 | ||
98 | %preun | |
99 | if [ "$1" = "0" ]; then | |
100 | %if %{with apache1} | |
101 | umask 027 | |
102 | grep -E -v "^Include.*/mod_dgee.conf" /etc/httpd/httpd.conf > \ | |
103 | /etc/httpd/httpd.conf.tmp | |
104 | mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf | |
105 | %endif | |
106 | %{apxs} -e -A -n dgee %{_pkglibdir}/mod_dgee.so 1>&2 | |
107 | if [ -f /var/lock/subsys/httpd ]; then | |
108 | /etc/rc.d/init.d/httpd restart 1>&2 | |
109 | fi | |
110 | fi | |
111 | ||
112 | ||
265c2052 | 113 | %clean |
39709ac0 | 114 | #rm -rf $RPM_BUILD_ROOT |
265c2052 | 115 | |
116 | %files | |
117 | %defattr(644,root,root,755) | |
118 | %doc BINARYINSTALL INSTALL QUICKSTART README COPYING | |
119 | %attr(755,root,root) %{_bindir}/* | |
120 | %config %{_sysconfdir}/%{name}* | |
265c2052 | 121 | %{_libdir}/%{name} |
122 | %{_libdir}/libdgee.* | |
123 | %{_libdir}/libdgxml.* | |
d6258be9 | 124 | %if %{with apache1} |
125 | %config %{_sysconfdir}/httpd/mod_%{name}.conf | |
126 | %{_libdir}/apache/mod_%{name}.so | |
127 | %else | |
a3692708 | 128 | #%config %{_sysconfdir}/httpd/mod_%{name}.conf |
129 | #%{_libdir}/apache/mod_%{name}.so | |
d6258be9 | 130 | %endif |
265c2052 | 131 | %{_datadir}/%{name} |
5a444393 | 132 | /var/lib/%{name} |
133 | %attr(754,root,root) /etc/rc.d/init.d/%{name} | |
134 | %attr(750,root,root) %dir /var/log/%{name} | |
135 | %attr(750,root,root) %dir /var/log/archiv/%{name} | |
265c2052 | 136 | |
137 | # Local variables: | |
138 | # mode: rpm-spec | |
139 | # end: |