]>
Commit | Line | Data |
---|---|---|
00650e5a | 1 | # TODO: |
26d365b1 | 2 | # - pnet incompatability, see -pnet.patch |
00650e5a | 3 | # |
d7f76255 | 4 | # Conditional build: |
26d365b1 ER |
5 | %bcond_without apache1 # disable building apache 1.3.x module |
6 | %bcond_without apache2 # disable building apache 2.x module | |
62a78d85 | 7 | %bcond_with i_have_checked_this_patch_works_not_just_compiles |
d7f76255 | 8 | # |
26d365b1 ER |
9 | %define apxs1 /usr/sbin/apxs1 |
10 | %define apxs2 /usr/sbin/apxs | |
2030af0d | 11 | %define subver 2 |
12 | %define base_version 0.1.6 | |
265c2052 | 13 | Summary: The DotGNU Execution Environment Core |
d21906cb | 14 | Summary(pl.UTF-8): Podstawa środowiska wykonawczego DotGNU |
265c2052 | 15 | Name: dgee |
2030af0d | 16 | Version: %{base_version}_%{subver} |
26d365b1 | 17 | Release: 2.2 |
e6621393 JB |
18 | License: GPL |
19 | Group: Networking/Daemons | |
2030af0d | 20 | Source0: http://www.nfluid.com/download/src/%{name}-%{base_version}-%{subver}.tgz |
265c2052 | 21 | # Source0-md5: a2573a076832c4c7212479cabda15eff |
7d976bf3 | 22 | Source1: %{name}.init |
23 | Source2: %{name}.logrotate | |
26d365b1 | 24 | Source3: %{name}-apache.conf |
265c2052 | 25 | Patch0: %{name}-DESTDIR.patch |
26 | Patch1: %{name}-apache.patch | |
39709ac0 | 27 | Patch2: %{name}-dglib_fix_so.patch |
38f3bc83 | 28 | Patch3: %{name}-pythonvm.patch |
e6621393 JB |
29 | Patch4: %{name}-pic.patch |
30 | Patch5: %{name}-nolibnsl.patch | |
26d365b1 | 31 | Patch6: %{name}-pnet.patch |
e6621393 | 32 | URL: http://www.dotgnu.org/dgee.html |
26d365b1 ER |
33 | %{?with_apache1:BuildRequires: %{apxs1}} |
34 | %{?with_apache2:BuildRequires: %{apxs2}} | |
35 | %{?with_apache2:BuildRequires: apache-devel} | |
36 | %{?with_apache1:BuildRequires: apache1-devel} | |
e6621393 JB |
37 | BuildRequires: autoconf >= 2.13 |
38 | BuildRequires: automake | |
265c2052 | 39 | BuildRequires: expat-devel |
679d15c5 | 40 | BuildRequires: gc-devel |
78bf856b | 41 | BuildRequires: goldwater-devel >= 0.3.4 |
00650e5a | 42 | BuildRequires: libffi-devel |
78bf856b | 43 | BuildRequires: phlib-devel >= 1.20 |
679d15c5 | 44 | BuildRequires: pnet-compiler-csharp |
78bf856b | 45 | BuildRequires: pnet-devel >= 0.6.0-2 |
679d15c5 | 46 | BuildRequires: pnetlib-base |
26d365b1 | 47 | BuildRequires: rpmbuild(macros) >= 1.268 |
e6621393 | 48 | Requires(post): /sbin/ldconfig |
d7f76255 | 49 | Requires(post,preun): /sbin/chkconfig |
26d365b1 | 50 | Requires(post,preun): rc-scripts |
e6621393 | 51 | Requires: goldwater |
265c2052 | 52 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
53 | ||
54 | %description | |
55 | The core DotGNU Execution Environment that provides the functionality | |
56 | of accepting, validating and satisfying web service requests. | |
57 | ||
d21906cb JR |
58 | %description -l pl.UTF-8 |
59 | Ten pakiet zawiera podstawę środowiska wykonawczego DotGNU (DotGNU | |
60 | Execution Environment) dostarczającą funkcjonalność przyjmowania, | |
61 | sprawdzania poprawności i wykonywania żądań usług WWW. | |
e6621393 | 62 | |
26d365b1 ER |
63 | %package -n apache1-mod_dgee |
64 | Summary: DGEE DSO module for Apache 1.3.x | |
d21906cb | 65 | Summary(pl.UTF-8): Moduł DSO DGEE dla Apache'a 1.3.x |
26d365b1 ER |
66 | Group: Networking/Daemons |
67 | Requires: %{name} = %{version}-%{release} | |
68 | Requires: apache1(EAPI) >= 1.3.33-2 | |
69 | Requires: apache1-mod_mime | |
70 | ||
71 | %description -n apache1-mod_dgee | |
72 | The DotGNU Execution Environment Core DSO module for Apache 1.3.x. | |
73 | ||
d21906cb JR |
74 | %description -n apache1-mod_dgee -l pl.UTF-8 |
75 | Moduł DSO podstawy środowiska wykonawczego DotGNU (DotGNU Execution | |
3e4e1903 JB |
76 | Environment) dla Apache'a 1.3.x. |
77 | ||
26d365b1 ER |
78 | %package -n apache-mod_dgee |
79 | Summary: DGEE DSO module for Apache 2.x | |
d21906cb | 80 | Summary(pl.UTF-8): Moduł DSO DGEE dla Apache'a 2.x |
26d365b1 ER |
81 | Group: Networking/Daemons |
82 | Requires: %{name} = %{version}-%{release} | |
83 | Requires: apache(modules-api) = %{apache_modules_api} | |
84 | Requires: apache-mod_mime | |
85 | ||
86 | %description -n apache-mod_dgee | |
87 | The DotGNU Execution Environment Core DSO module for Apache 2.x. | |
88 | ||
d21906cb JR |
89 | %description -n apache-mod_dgee -l pl.UTF-8 |
90 | Moduł DSO podstawy środowiska wykonawczego DotGNU (DotGNU Execution | |
3e4e1903 JB |
91 | Environment) dla Apache'a 1.3.x. |
92 | ||
265c2052 | 93 | %prep |
2030af0d | 94 | %setup -q -n %{name}-%{base_version} |
265c2052 | 95 | %patch0 -p1 |
96 | %patch1 -p1 | |
39709ac0 | 97 | %patch2 -p1 |
38f3bc83 | 98 | %patch3 -p1 |
e6621393 JB |
99 | %patch4 -p1 |
100 | %patch5 -p1 | |
26d365b1 | 101 | %{?with_i_have_checked_this_patch_works_not_just_compiles:%patch6 -p1} |
5a444393 | 102 | |
265c2052 | 103 | %build |
104 | %{__aclocal} | |
105 | %{__autoconf} | |
e6621393 | 106 | %{__autoheader} |
265c2052 | 107 | %{__automake} |
0bb6a55c | 108 | CFLAGS="%{rpmcflags} -I/usr/include/python2.4" |
679d15c5 | 109 | export CFLAGS |
265c2052 | 110 | %configure \ |
e6621393 | 111 | cflags=our \ |
265c2052 | 112 | --with-goldwater=%{_prefix} \ |
a3692708 | 113 | --with-pnet=%{_prefix} \ |
5a444393 | 114 | --with-repository=/var/lib/%{name} \ |
39709ac0 | 115 | --with-username=http \ |
116 | --with-usergroup=http \ | |
38f3bc83 | 117 | --with-python \ |
26d365b1 ER |
118 | %{?with_apache1:--with-apache=%{apxs1}} \ |
119 | %{?with_apache2:--with-apache2=%{apxs2}} | |
265c2052 | 120 | |
26d365b1 | 121 | %{__make} -j1 |
265c2052 | 122 | |
123 | %install | |
124 | rm -rf $RPM_BUILD_ROOT | |
e6621393 | 125 | |
d6258be9 | 126 | %{__make} install \ |
00650e5a | 127 | DESTDIR=$RPM_BUILD_ROOT |
e6621393 | 128 | |
5a444393 | 129 | # Thise files should be installed by Makefile (I can't fix it): |
130 | install cslib/DotGNU/DGEE/DotGNU.DGEE.dll \ | |
e6621393 | 131 | $RPM_BUILD_ROOT%{_libdir}/%{name} |
5a444393 | 132 | install cslib/System/Web/Services/System.Web.Services.dll \ |
e6621393 | 133 | $RPM_BUILD_ROOT%{_libdir}/%{name} |
5a444393 | 134 | install cslib/DotGNU/DGEE/Protocols/XmlRpc/XmlRpcService.exe \ |
e6621393 | 135 | $RPM_BUILD_ROOT%{_libdir}/%{name} |
5a444393 | 136 | |
137 | install -d $RPM_BUILD_ROOT/var/lib/%{name}/{index,data} | |
138 | install -d $RPM_BUILD_ROOT/var/log/%{name} | |
7d976bf3 | 139 | touch $RPM_BUILD_ROOT/var/log/%{name}/{%{name}.log,stdout,stderr} |
5a444393 | 140 | install -d $RPM_BUILD_ROOT/var/log/archiv/%{name} |
141 | install -d $RPM_BUILD_ROOT/etc/rc.d/init.d | |
142 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} | |
7d976bf3 | 143 | install -d $RPM_BUILD_ROOT/etc/logrotate.d |
144 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/logrotate.d/%{name} | |
145 | ||
26d365b1 ER |
146 | %if %{with apache1} |
147 | install -Dp %{SOURCE3} $RPM_BUILD_ROOT/etc/apache/conf.d/40_mod_dgee.conf | |
148 | %endif | |
149 | %if %{with apache2} | |
150 | install -Dp %{SOURCE3} $RPM_BUILD_ROOT/etc/httpd/httpd.conf/40_mod_dgee.conf | |
151 | %endif | |
152 | ||
e6621393 JB |
153 | %clean |
154 | rm -rf $RPM_BUILD_ROOT | |
d6258be9 | 155 | |
156 | %post | |
e6621393 | 157 | /sbin/ldconfig |
c6f3af49 | 158 | /sbin/chkconfig --add dgee |
26d365b1 | 159 | %service dgee restart "goltwater and dgee services" |
7d976bf3 | 160 | |
d6258be9 | 161 | %preun |
162 | if [ "$1" = "0" ]; then | |
26d365b1 | 163 | %service dgee stop |
d7f76255 | 164 | /sbin/chkconfig --del dgee |
d6258be9 | 165 | fi |
166 | ||
e6621393 | 167 | %postun -p /sbin/ldconfig |
265c2052 | 168 | |
26d365b1 ER |
169 | %post -n apache1-mod_dgee |
170 | %service -q apache restart | |
171 | ||
172 | %postun -n apache1-mod_dgee | |
173 | if [ "$1" = 0 ]; then | |
174 | %service -q apache restart | |
175 | fi | |
176 | ||
177 | %post -n apache-mod_dgee | |
178 | %service -q httpd restart | |
179 | ||
180 | %postun -n apache-mod_dgee | |
181 | if [ "$1" = 0 ]; then | |
182 | %service -q httpd restart | |
183 | fi | |
184 | ||
265c2052 | 185 | %files |
186 | %defattr(644,root,root,755) | |
e6621393 | 187 | %doc BINARYINSTALL INSTALL QUICKSTART README |
265c2052 | 188 | %attr(755,root,root) %{_bindir}/* |
e6621393 JB |
189 | %attr(755,root,root) %{_libdir}/libdgee.so.*.* |
190 | %attr(755,root,root) %{_libdir}/libdgxml.so.*.* | |
7d976bf3 | 191 | %dir %{_libdir}/%{name} |
192 | %attr(755,root,root) %{_libdir}/%{name}/* | |
00650e5a | 193 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}* |
265c2052 | 194 | %{_datadir}/%{name} |
5a444393 | 195 | /var/lib/%{name} |
196 | %attr(754,root,root) /etc/rc.d/init.d/%{name} | |
7d976bf3 | 197 | %attr(730,root,http) %dir /var/log/%{name} |
198 | %attr(660,root,http) /var/log/%{name}/* | |
5a444393 | 199 | %attr(750,root,root) %dir /var/log/archiv/%{name} |
00650e5a | 200 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/* |
26d365b1 ER |
201 | |
202 | %if %{with apache1} | |
203 | %files -n apache1-mod_dgee | |
204 | %defattr(644,root,root,755) | |
205 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/apache/conf.d/*_mod_%{name}.conf | |
206 | %attr(755,root,root) %{_libdir}/apache1/mod_%{name}.so | |
207 | %endif | |
208 | ||
209 | %if %{with apache2} | |
210 | %files -n apache-mod_dgee | |
211 | %defattr(644,root,root,755) | |
212 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/httpd/httpd.conf/*_mod_%{name}.conf | |
213 | %attr(755,root,root) %{_libdir}/apache/mod_%{name}.so | |
214 | %endif |