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