]>
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 | |
39709ac0 | 7 | Release: %{_rel}.0.1.3 |
265c2052 | 8 | Source0: http://www.nfluid.com/download/src/%{name}-%{version}-%{_rel}.tgz |
9 | # Source0-md5: a2573a076832c4c7212479cabda15eff | |
10 | Patch0: %{name}-DESTDIR.patch | |
11 | Patch1: %{name}-apache.patch | |
39709ac0 | 12 | Patch2: %{name}-dglib_fix_so.patch |
265c2052 | 13 | License: GPL |
14 | Vendor: DotGNU | |
15 | Group: Networking/Daemons | |
a3692708 | 16 | BuildRequires: apache-devel |
265c2052 | 17 | BuildRequires: expat-devel |
89066afc | 18 | BuildRequires: goldwater-devel => 0.3.4 |
19 | BuildRequires: phlib-devel => 1.20 | |
20 | BuildRequires: pnet-devel => 0.6.0-2 | |
39709ac0 | 21 | BuildRequires: %{apxs} |
22 | Requires: apache | |
23 | Requires(post,preun): %{apxs} | |
265c2052 | 24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
25 | ||
26 | %description | |
27 | The core DotGNU Execution Environment that provides the functionality | |
28 | of accepting, validating and satisfying web service requests. | |
29 | ||
30 | %prep | |
31 | %setup -q | |
32 | %patch0 -p1 | |
33 | %patch1 -p1 | |
39709ac0 | 34 | %patch2 -p1 |
265c2052 | 35 | %build |
36 | %{__aclocal} | |
37 | %{__autoconf} | |
38 | %{__automake} | |
39 | %configure \ | |
40 | --with-goldwater=%{_prefix} \ | |
a3692708 | 41 | --with-pnet=%{_prefix} \ |
39709ac0 | 42 | --with-username=http \ |
43 | --with-usergroup=http \ | |
d6258be9 | 44 | %if %{with apache1} |
45 | --with-apache=%{_prefix} | |
46 | %else | |
a3692708 | 47 | --without-apache \ |
48 | --with-apache2=%{_prefix} | |
d6258be9 | 49 | %endif |
265c2052 | 50 | |
d6258be9 | 51 | %if %{with apache1} |
52 | %{__make} | |
53 | %else | |
a3692708 | 54 | %{__make} \ |
55 | APACHE= | |
d6258be9 | 56 | %endif |
265c2052 | 57 | |
58 | %install | |
59 | rm -rf $RPM_BUILD_ROOT | |
d6258be9 | 60 | %if %{with apache1} |
61 | %{__make} install \ | |
62 | DESTDIR=$RPM_BUILD_ROOT | |
63 | %else | |
265c2052 | 64 | %{__make} install \ |
a3692708 | 65 | DESTDIR=$RPM_BUILD_ROOT \ |
66 | APACHE= | |
d6258be9 | 67 | %endif |
68 | ||
69 | %post | |
70 | %if %{with apache1} | |
71 | if [ -f /etc/httpd/httpd.conf ] && \ | |
72 | ! grep -q "^Include.*/mod_dgee.conf" /etc/httpd/httpd.conf; then | |
73 | echo "Include /etc/httpd/mod_dgee.conf" >> /etc/httpd/httpd.conf | |
74 | fi | |
75 | %endif | |
76 | ||
77 | %{apxs} -e -a -n dgee %{_pkglibdir}/mod_dgee.so 1>&2 | |
78 | if [ -f /var/lock/subsys/httpd ]; then | |
79 | /etc/rc.d/init.d/httpd restart 1>&2 | |
80 | fi | |
81 | ||
82 | %preun | |
83 | if [ "$1" = "0" ]; then | |
84 | %if %{with apache1} | |
85 | umask 027 | |
86 | grep -E -v "^Include.*/mod_dgee.conf" /etc/httpd/httpd.conf > \ | |
87 | /etc/httpd/httpd.conf.tmp | |
88 | mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf | |
89 | %endif | |
90 | %{apxs} -e -A -n dgee %{_pkglibdir}/mod_dgee.so 1>&2 | |
91 | if [ -f /var/lock/subsys/httpd ]; then | |
92 | /etc/rc.d/init.d/httpd restart 1>&2 | |
93 | fi | |
94 | fi | |
95 | ||
96 | ||
265c2052 | 97 | %clean |
39709ac0 | 98 | #rm -rf $RPM_BUILD_ROOT |
265c2052 | 99 | |
100 | %files | |
101 | %defattr(644,root,root,755) | |
102 | %doc BINARYINSTALL INSTALL QUICKSTART README COPYING | |
103 | %attr(755,root,root) %{_bindir}/* | |
104 | %config %{_sysconfdir}/%{name}* | |
265c2052 | 105 | %{_libdir}/%{name} |
106 | %{_libdir}/libdgee.* | |
107 | %{_libdir}/libdgxml.* | |
d6258be9 | 108 | %if %{with apache1} |
109 | %config %{_sysconfdir}/httpd/mod_%{name}.conf | |
110 | %{_libdir}/apache/mod_%{name}.so | |
111 | %else | |
a3692708 | 112 | #%config %{_sysconfdir}/httpd/mod_%{name}.conf |
113 | #%{_libdir}/apache/mod_%{name}.so | |
d6258be9 | 114 | %endif |
265c2052 | 115 | %{_datadir}/%{name} |
116 | ||
117 | # Local variables: | |
118 | # mode: rpm-spec | |
119 | # end: |