]> git.pld-linux.org Git - packages/dgee.git/blob - dgee.spec
- not tested and probably not finished
[packages/dgee.git] / dgee.spec
1 %bcond_with     apache1
2 %define         apxs    /usr/sbin/apxs
3 %define         _rel    2
4 Summary:        The DotGNU Execution Environment Core
5 Name:           dgee
6 Version:        0.1.6
7 Release:        %{_rel}.0.1.3
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 Patch2:         %{name}-dglib_fix_so.patch
13 License:        GPL
14 Vendor:         DotGNU
15 Group:          Networking/Daemons
16 BuildRequires:  apache-devel
17 BuildRequires:  expat-devel
18 BuildRequires:  goldwater-devel => 0.3.4
19 BuildRequires:  phlib-devel => 1.20
20 BuildRequires:  pnet-devel => 0.6.0-2
21 BuildRequires:  %{apxs}
22 Requires:       apache
23 Requires(post,preun):   %{apxs}
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
34 %patch2 -p1
35 %build
36 %{__aclocal}
37 %{__autoconf}
38 %{__automake}
39 %configure \
40         --with-goldwater=%{_prefix} \
41         --with-pnet=%{_prefix} \
42         --with-username=http \
43         --with-usergroup=http \
44 %if %{with apache1}
45         --with-apache=%{_prefix}
46 %else
47         --without-apache \
48         --with-apache2=%{_prefix}
49 %endif
50
51 %if %{with apache1}
52 %{__make} 
53 %else
54 %{__make} \
55         APACHE=
56 %endif
57
58 %install
59 rm -rf $RPM_BUILD_ROOT
60 %if %{with apache1}
61 %{__make} install \
62         DESTDIR=$RPM_BUILD_ROOT 
63 %else
64 %{__make} install \
65         DESTDIR=$RPM_BUILD_ROOT \
66         APACHE=
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
97 %clean
98 #rm -rf $RPM_BUILD_ROOT
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}*
105 %{_libdir}/%{name}
106 %{_libdir}/libdgee.*
107 %{_libdir}/libdgxml.*
108 %if %{with apache1}
109 %config %{_sysconfdir}/httpd/mod_%{name}.conf
110 %{_libdir}/apache/mod_%{name}.so
111 %else
112 #%config %{_sysconfdir}/httpd/mod_%{name}.conf
113 #%{_libdir}/apache/mod_%{name}.so
114 %endif
115 %{_datadir}/%{name}
116
117 # Local variables:
118 # mode: rpm-spec
119 # end:
This page took 0.35553 seconds and 3 git commands to generate.