]> git.pld-linux.org Git - packages/apache1-mod_sqlinclude.git/blob - apache1-mod_sqlinclude.spec
- update config dir macro
[packages/apache1-mod_sqlinclude.git] / apache1-mod_sqlinclude.spec
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}
6 Version:        1.4
7 Release:        5
8 License:        BSD
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)
20
21 %define         _pkglibdir      %(%{apxs} -q LIBEXECDIR 2>/dev/null)
22 %define         _sysconfdir     %(%{apxs} -q SYSCONFDIR 2>/dev/null)/conf.d
23
24 %description
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).
28
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.
33
34 %prep
35 %setup -q -n mod_%{mod_name}-%{version}
36
37 %build
38 %{__make} \
39         APXS=%{apxs}
40
41 %install
42 rm -rf $RPM_BUILD_ROOT
43 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}}
44
45 install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
46
47 echo 'LoadModule %{mod_name}_module     modules/mod_%{mod_name}.so' > \
48         $RPM_BUILD_ROOT%{_sysconfdir}/90_mod_%{mod_name}.conf
49
50 %clean
51 rm -rf $RPM_BUILD_ROOT
52
53 %post
54 %service -q apache restart
55
56 %postun
57 if [ "$1" = "0" ]; then
58         %service -q apache restart
59 fi
60
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
65 fi
66
67 %files
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}/*
This page took 0.095726 seconds and 3 git commands to generate.