]>
Commit | Line | Data |
---|---|---|
1 | %define mod_name dynvhost | |
2 | %define apxs /usr/sbin/apxs1 | |
3 | Summary: Dynamic Virtual Hosting | |
4 | Summary(pl.UTF-8): Dynamiczne Serwery Wirtualne | |
5 | Name: apache1-mod_%{mod_name} | |
6 | Version: 1 | |
7 | Release: 4 | |
8 | License: GPL | |
9 | Group: Networking/Daemons | |
10 | Source0: http://funkcity.com/0101/projects/dynvhost/mod_%{mod_name}.tar.gz | |
11 | # Source0-md5: 7608ca6ce5c906bfe960cd0f92bdb6d8 | |
12 | URL: http://funkcity.com/0101/ | |
13 | BuildRequires: apache1-devel >= 1.3.39 | |
14 | BuildRequires: rpmbuild(macros) >= 1.268 | |
15 | BuildRequires: zlib-devel | |
16 | Requires(triggerpostun): %{apxs} | |
17 | Requires: apache1(EAPI) | |
18 | Obsoletes: apache-mod_dynvhost <= 1 | |
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) | |
23 | ||
24 | %description | |
25 | The "mod_dynvhost" module will create pseudo name based VirtualHosts | |
26 | on the fly. All you need is a directory with the fully qualified | |
27 | domain name (FQDN) of your virtual site and the module will take care | |
28 | of the rest. | |
29 | ||
30 | %description -l pl.UTF-8 | |
31 | Moduł "mod_dynvhost" pozwala na tworzenie pseudo serwerów wirtualnych | |
32 | (name based). Wszystko czego potrzebujesz to katalog o pełnej nazwie | |
33 | (FQDN) wirtualnego serwera - moduł zajmie się resztą. | |
34 | ||
35 | %prep | |
36 | %setup -q -n %{mod_name} | |
37 | ||
38 | %build | |
39 | %{apxs} -c mod_%{mod_name}.c -o mod_%{mod_name}.so | |
40 | ||
41 | %install | |
42 | rm -rf $RPM_BUILD_ROOT | |
43 | install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/conf.d} | |
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}/conf.d/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-2.1 | |
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 README ChangeLog | |
70 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf | |
71 | %attr(755,root,root) %{_pkglibdir}/* |