1 %define mod_name sqlinclude
2 %define apxs /usr/sbin/apxs1
3 Summary: Apache module: mySQL based "Include"-alike configuration command
4 Summary(pl.UTF-8): Moduł do apache: bazująca na mySQL komenda konfiguracji ala "Include"
5 Name: apache1-mod_%{mod_name}
9 Group: Networking/Daemons
10 Source0: http://dl.sourceforge.net/mod-sqlinclude/mod_sqlinclude-%{version}.tgz
11 # Source0-md5: ecb1fd5d5a89c55e7dda4a9a456b0c13
12 URL: http://sourceforge.net/projects/mod-sqlinclude/
13 BuildRequires: apache1-devel >= 1.3.39
14 BuildRequires: mysql-devel
15 BuildRequires: rpmbuild(macros) >= 1.268
16 Requires(triggerpostun): %{apxs}
17 Requires: apache1(EAPI)
18 Obsoletes: apache-mod_sqlinclude <= 1.4
19 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21 %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
22 %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)/conf.d
25 mod_sqlinclude is an Apache Web server module which implements mySQL
26 based "Include"-alike configuration command. This lets you keep your
27 httpd config in database (i.e. VHosts etc).
29 %description -l pl.UTF-8
30 Moduł do serwera Apache implementujący bazującą na mySQL komendę
31 konfiguracyjną typu "Include". Dzięki temu możesz trzymać swoją
32 konfigurację w bazie SQL.
35 %setup -q -n mod_%{mod_name}-%{version}
42 rm -rf $RPM_BUILD_ROOT
43 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}}
45 install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
47 echo 'LoadModule %{mod_name}_module modules/mod_%{mod_name}.so' > \
48 $RPM_BUILD_ROOT%{_sysconfdir}/90_mod_%{mod_name}.conf
51 rm -rf $RPM_BUILD_ROOT
54 %service -q apache restart
57 if [ "$1" = "0" ]; then
58 %service -q apache restart
61 %triggerpostun -- apache1-mod_%{mod_name} < 1.4-1.2
62 # check that they're not using old apache.conf
63 if grep -q '^Include conf\.d' /etc/apache/apache.conf; then
64 %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
68 %defattr(644,root,root,755)
69 %doc CHANGE* README* *.sql
70 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*_mod_%{mod_name}.conf
71 %attr(755,root,root) %{_pkglibdir}/*