]> git.pld-linux.org Git - packages/dgee.git/blob - dgee.spec
- cosmetics
[packages/dgee.git] / dgee.spec
1 #
2 # TODO: 
3 #  --without apache1 (default) should build mod_dgee.so for 
4 #  apache2 - it doesn't
5
6 # Conditional build:
7 %bcond_with     apache1
8 #
9 %define         apxs    /usr/sbin/apxs
10 %define         _rel    2
11 Summary:        The DotGNU Execution Environment Core
12 Summary(pl):    Podstawa ¶rodowiska wykonawczego DotGNU
13 Name:           dgee
14 Version:        0.1.6
15 Release:        %{_rel}.0.3
16 License:        GPL
17 Group:          Networking/Daemons
18 Source0:        http://www.nfluid.com/download/src/%{name}-%{version}-%{_rel}.tgz
19 # Source0-md5:  a2573a076832c4c7212479cabda15eff
20 Source1:        %{name}.init
21 Source2:        %{name}.logrotate
22 Patch0:         %{name}-DESTDIR.patch
23 Patch1:         %{name}-apache.patch
24 Patch2:         %{name}-dglib_fix_so.patch
25 Patch3:         %{name}-pythonvm.patch
26 Patch4:         %{name}-pic.patch
27 Patch5:         %{name}-nolibnsl.patch
28 URL:            http://www.dotgnu.org/dgee.html
29 BuildRequires:  apache-devel
30 BuildRequires:  autoconf >= 2.13
31 BuildRequires:  automake
32 BuildRequires:  expat-devel
33 BuildRequires:  libffi-devel
34 BuildRequires:  goldwater-devel => 0.3.4
35 BuildRequires:  phlib-devel => 1.20
36 BuildRequires:  pnet-devel => 0.6.0-2
37 BuildRequires:  %{apxs}
38 Requires(post): /sbin/ldconfig
39 Requires(post,preun):   %{apxs}
40 Requires(post,preun):   /sbin/chkconfig
41 Requires:       apache
42 Requires:       goldwater
43 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44
45 %description
46 The core DotGNU Execution Environment that provides the functionality
47 of accepting, validating and satisfying web service requests.
48
49 %description -l pl
50 Ten pakiet zawiera podstawê ¶rodowiska wykonawczego DotGNU (DotGNU
51 Execution Environment) dostarczaj±c± funkcjonalno¶æ przyjmowania,
52 sprawdzania poprawno¶ci i wykonywania ¿±dañ us³ug WWW.
53
54 %prep
55 %setup -q
56 %patch0 -p1
57 %patch1 -p1
58 %patch2 -p1
59 %patch3 -p1
60 %patch4 -p1
61 %patch5 -p1
62
63 %build
64 %{__aclocal}
65 %{__autoconf}
66 %{__autoheader}
67 %{__automake}
68 %configure \
69         cflags=our \
70         --with-goldwater=%{_prefix} \
71         --with-pnet=%{_prefix} \
72         --with-repository=/var/lib/%{name} \
73         --with-username=http \
74         --with-usergroup=http \
75         --with-python \
76 %if %{with apache1}
77         --with-apache=%{_prefix}
78 %else
79         --without-apache \
80         --with-apache2=%{_prefix}
81 %endif
82
83 %if %{with apache1}
84 %{__make} 
85 %else
86 %{__make} \
87         APACHE=
88 %endif
89
90 %install
91 rm -rf $RPM_BUILD_ROOT
92
93 %if %{with apache1}
94 %{__make} install \
95         DESTDIR=$RPM_BUILD_ROOT 
96 %else
97 %{__make} install \
98         DESTDIR=$RPM_BUILD_ROOT \
99         APACHE=
100 %endif
101
102 # Thise files should be installed by Makefile (I can't fix it):
103 install cslib/DotGNU/DGEE/DotGNU.DGEE.dll \
104         $RPM_BUILD_ROOT%{_libdir}/%{name}
105 install cslib/System/Web/Services/System.Web.Services.dll \
106         $RPM_BUILD_ROOT%{_libdir}/%{name}
107 install cslib/DotGNU/DGEE/Protocols/XmlRpc/XmlRpcService.exe \
108         $RPM_BUILD_ROOT%{_libdir}/%{name}
109
110 install -d $RPM_BUILD_ROOT/var/lib/%{name}/{index,data}
111 install -d $RPM_BUILD_ROOT/var/log/%{name}
112 touch $RPM_BUILD_ROOT/var/log/%{name}/{%{name}.log,stdout,stderr}
113 install -d $RPM_BUILD_ROOT/var/log/archiv/%{name}
114 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
115 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
116 install -d $RPM_BUILD_ROOT/etc/logrotate.d
117 install %{SOURCE2} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
118
119 %clean
120 rm -rf $RPM_BUILD_ROOT
121
122 %post
123 /sbin/ldconfig
124 %if %{with apache1}
125 if [ -f /etc/httpd/httpd.conf ] && \
126         ! grep -q "^Include.*/mod_dgee.conf" /etc/httpd/httpd.conf; then
127                 echo "Include /etc/httpd/mod_dgee.conf" >> /etc/httpd/httpd.conf
128 fi
129 %endif
130
131 %{apxs} -e -a -n dgee %{_pkglibdir}/mod_dgee.so 1>&2
132 if [ -f /var/lock/subsys/httpd ]; then
133         /etc/rc.d/init.d/httpd restart 1>&2
134 fi
135
136 if [ -f /var/lock/subsys/dgee ]; then
137         /etc/rc.d/init.d/dgee restart 1>&2
138 else
139         echo "Run \"/etc/rc.d/init.d/dgee start\" to start goltwater and dgee services."
140 fi
141 /sbin/chkconfig --add dgee
142
143 %preun
144 if [ "$1" = "0" ]; then
145 %if %{with apache1}
146         umask 027
147         grep -E -v "^Include.*/mod_dgee.conf" /etc/httpd/httpd.conf > \
148                 /etc/httpd/httpd.conf.tmp
149         mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
150 %endif
151         %{apxs} -e -A -n dgee %{_pkglibdir}/mod_dgee.so 1>&2
152         if [ -f /var/lock/subsys/httpd ]; then
153                 /etc/rc.d/init.d/httpd restart 1>&2
154         fi
155         if [ -f /var/lock/subsys/dgee ]; then
156                 /etc/rc.d/init.d/dgee stop 1>&2
157         fi
158         /sbin/chkconfig --del dgee
159 fi
160
161 %postun -p /sbin/ldconfig
162
163 %files
164 %defattr(644,root,root,755)
165 %doc BINARYINSTALL INSTALL QUICKSTART README
166 %attr(755,root,root) %{_bindir}/*
167 %attr(755,root,root) %{_libdir}/libdgee.so.*.*
168 %attr(755,root,root) %{_libdir}/libdgxml.so.*.*
169 %dir %{_libdir}/%{name}
170 %attr(755,root,root) %{_libdir}/%{name}/*
171 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}*
172 %if %{with apache1}
173 %config %verify(not size mtime md5) %{_sysconfdir}/httpd/mod_%{name}.conf
174 %{_libdir}/apache/mod_%{name}.so
175 %else
176 #%config %{_sysconfdir}/httpd/mod_%{name}.conf
177 #%{_libdir}/apache/mod_%{name}.so
178 %endif
179 %{_datadir}/%{name}
180 /var/lib/%{name}
181 %attr(754,root,root) /etc/rc.d/init.d/%{name}
182 %attr(730,root,http) %dir /var/log/%{name}
183 %attr(660,root,http) /var/log/%{name}/*
184 %attr(750,root,root) %dir /var/log/archiv/%{name}
185 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/logrotate.d/*
This page took 0.066416 seconds and 3 git commands to generate.