]>
Commit | Line | Data |
---|---|---|
b1de573b JB |
1 | %define apxs %{_sbindir}/apxs |
2 | Summary: mod_dnssd - Apache HTTPD module which adds Zeroconf support via DNS-SD using Avahi | |
3 | Summary(pl.UTF-8): mod_dnssd - moduł Apache HTTPD oddający obsługę Zeroconfa poprzez DNS-SD przy użyciu Avahi | |
4 | Name: apache-mod_dnssd | |
5 | Version: 0.6 | |
6 | Release: 1 | |
7 | License: Apache v2.0 | |
8 | Group: Networking/Daemons/HTTP | |
9 | Source0: http://0pointer.de/lennart/projects/mod_dnssd/mod_dnssd-%{version}.tar.gz | |
10 | # Source0-md5: bed3d95a98168bf0515922d1c05020c5 | |
11 | URL: http://0pointer.de/lennart/projects/mod_dnssd/ | |
12 | BuildRequires: %{apxs} | |
13 | BuildRequires: apache-devel >= 2.2 | |
14 | BuildRequires: apr-devel >= 1 | |
15 | BuildRequires: avahi-devel >= 0.6 | |
16 | BuildRequires: pkgconfig | |
17 | BuildRequires: rpmbuild(macros) >= 1.268 | |
18 | Requires: apache(modules-api) = %apache_modules_api | |
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_dnssd is an Apache HTTPD module which adds Zeroconf support via | |
26 | DNS-SD using Avahi. | |
27 | ||
28 | %description -l pl.UTF-8 | |
29 | mod_dnssd to moduł serwera Apache HTTPD dodający obsługę Zeroconfa | |
30 | poprzez DNS-SD przy użyciu Avahi. | |
31 | ||
32 | %prep | |
33 | %setup -q -n mod_dnssd-%{version} | |
34 | ||
35 | %build | |
36 | %configure \ | |
37 | --with-apxs=%{apxs} | |
38 | ||
39 | %{__make} | |
40 | ||
41 | %install | |
42 | rm -rf $RPM_BUILD_ROOT | |
43 | install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}} | |
44 | ||
45 | install -p src/.libs/mod_dnssd.so $RPM_BUILD_ROOT%{_pkglibdir} | |
46 | ||
47 | cat > $RPM_BUILD_ROOT%{_sysconfdir}/90_mod_dnssd.conf <<EOF | |
48 | LoadModule dnssd_module modules/mod_dnssd.so | |
49 | DNSSDEnable On | |
50 | # enable to automatically register all mod_userdir directories | |
51 | DNSSDAutoRegisterUserDir Off | |
52 | # enable to automatically register all local virtual hosts | |
53 | DNSSDAutoRegisterVHosts Off | |
54 | EOF | |
55 | ||
56 | %clean | |
57 | rm -rf $RPM_BUILD_ROOT | |
58 | ||
59 | %post | |
60 | %service -q httpd restart | |
61 | ||
62 | %postun | |
63 | if [ "$1" = "0" ]; then | |
64 | %service -q httpd restart | |
65 | fi | |
66 | ||
67 | %files | |
68 | %defattr(644,root,root,755) | |
69 | %doc README | |
70 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/90_mod_dnssd.conf | |
71 | %attr(755,root,root) %{_pkglibdir}/mod_dnssd.so |