]> git.pld-linux.org Git - packages/dnsmasq.git/blame_incremental - dnsmasq.spec
up to 2.81
[packages/dnsmasq.git] / dnsmasq.spec
... / ...
CommitLineData
1# TODO:
2# - subpackage DNSmasq webmin module (contrib/webmin)
3
4Summary: A lightweight caching server (DNS, DHCP)
5Summary(pl.UTF-8): Lekki buforujący serwer nazw (DNS) i DHCP
6Name: dnsmasq
7Version: 2.81
8Release: 1
9License: GPL v2
10Group: Networking/Daemons
11#Source0: http://thekelleys.org.uk/dnsmasq/test-releases/%{name}-%{version}%{_rc}.tar.gz
12Source0: http://thekelleys.org.uk/dnsmasq/%{name}-%{version}.tar.gz
13# Source0-md5: e43808177a773014b5892ccba238f7a8
14Source1: %{name}.init
15Source2: %{name}.sysconfig
16Source3: %{name}.service
17URL: http://www.thekelleys.org.uk/dnsmasq/doc.html
18BuildRequires: gettext-tools
19BuildRequires: gmp-devel
20BuildRequires: libidn-devel
21BuildRequires: nettle-devel
22BuildRequires: pkgconfig
23BuildRequires: rpmbuild(macros) >= 1.671
24Requires(post,preun): /sbin/chkconfig
25Requires(post,preun,postun): systemd-units >= 38
26Requires: systemd-units >= 38
27Requires: rc-scripts
28Provides: caching-nameserver
29BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31%define copts -DHAVE_DNSSEC
32
33%description
34Dnsmasq is a lightweight, easy to configure DNS forwarder and DHCP
35server. It is designed to provide DNS and, optionally, DHCP, to a
36small network. It can serve the names of local machines which are not
37in the global DNS. The DHCP server integrates with the DNS server and
38allows machines with DHCP-allocated addresses to appear in the DNS
39with names configured either in each host or in a central
40configuration file. Dnsmasq supports static and dynamic DHCP leases
41and BOOTP for network booting of diskless machines.
42
43Dnsmasq is targeted at home networks using NAT and connected to the
44Internet via a modem, cable-modem or ADSL connection but would be a
45good choice for any small network where low resource use and ease of
46configuration are important.
47
48%description -l pl.UTF-8
49dnsmasq jest lekkim, łatwym w konfiguracji forwarderem DNS i serwerem
50DHCP zaprojektowanym do serwowania usługi DNS i opcjonalnie DHCP dla
51małych sieci. Może on serwować także nazwy dla lokalnych maszyn nie
52znajdujących się w globalnym DNS-ie. Serwer DHCP integruje się z
53serwerem DNS, umożliwiając maszynom o adresach przydzielonych przez
54DHCP pojawienie się w DNS-ie z nazwami konfigurowanymi dla każdego
55hosta lub w centralnym pliku konfiguracyjnym. dnsmasq obsługuje
56statyczne i dynamiczne dzierżawy DHCP oraz BOOTP do uruchamiania z
57sieci maszyn bezdyskowych.
58
59dnsmasq jest przeznaczony głównie dla sieci domowych używających NAT-u
60i podłączonych do Internetu przez modem, modem kablowy lub łącze ADSL,
61ale jest dobrym wyborem dla dowolnej małej sieci, gdzie ważne jest
62małe wykorzystanie zasobów i łatwa konfiguracja.
63
64%prep
65%setup -q -n %{name}-%{version}
66
67%build
68%{__make} all-i18n \
69 CC="%{__cc}" \
70 CFLAGS="%{rpmcppflags} %{rpmcflags} -DHAVE_ISC_READER -D_GNU_SOURCE" \
71 LDFLAGS="%{rpmldflags}" \
72 COPTS="%{copts}" \
73 PREFIX=%{_prefix}
74
75%install
76rm -rf $RPM_BUILD_ROOT
77install -d $RPM_BUILD_ROOT{%{_sbindir},/etc/sysconfig,/etc/rc.d/init.d} \
78 $RPM_BUILD_ROOT{%{systemdunitdir},%{_mandir}/man8,%{_datadir}/dnsmasq}
79
80install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/dnsmasq
81install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/dnsmasq
82install dnsmasq.conf.example $RPM_BUILD_ROOT%{_sysconfdir}/dnsmasq.conf
83
84install contrib/port-forward/dnsmasq-portforward $RPM_BUILD_ROOT%{_sbindir}
85install contrib/port-forward/portforward $RPM_BUILD_ROOT%{_sysconfdir}
86
87install %{SOURCE3} $RPM_BUILD_ROOT%{systemdunitdir}/dnsmasq.service
88
89install -p trust-anchors.conf $RPM_BUILD_ROOT%{_datadir}/dnsmasq
90
91%{__make} install-i18n \
92 COPTS="%{copts}" \
93 DESTDIR=$RPM_BUILD_ROOT \
94 PREFIX=%{_prefix}
95
96mv -f $RPM_BUILD_ROOT%{_datadir}/locale/{no,nb}
97
98%find_lang %{name}
99
100%clean
101rm -rf $RPM_BUILD_ROOT
102
103%post
104/sbin/chkconfig --add dnsmasq
105%service dnsmasq restart
106%systemd_post dnsmasq.service
107
108%preun
109if [ "$1" = "0" ]; then
110 %service dnsmasq stop
111 /sbin/chkconfig --del dnsmasq
112fi
113%systemd_preun dnsmasq.service
114
115%postun
116%systemd_reload
117
118%triggerpostun -- dnsmasq < 2.68-1.1
119if [ -f /etc/sysconfig/dnsmasq ]; then
120 __OPT=
121 . /etc/sysconfig/dnsmasq
122 [ -n "$MAILHOSTNAME" ] && __OPT="-m $MAILHOSTNAME"
123 [ -n "$RESOLV_CONF" ] && __OPT="$__OPT -r $RESOLV_CONF"
124 [ -n "$DHCP_LEASE" ] && __OPT="$__OPT -l $DHCP_LEASE"
125 [ -n "$DOMAIN_SUFFIX" ] && __OPT="$__OPT -s $DOMAIN_SUFFIX"
126 [ -n "$INTERFACE" ] && __OPT="$__OPT -i $INTERFACE"
127 if [ -n "$__OPT" ]; then
128 %{__cp} -f /etc/sysconfig/dnsmasq{,.rpmsave}
129 echo >>/etc/sysconfig/dnsmasq
130 echo "# Added by rpm trigger" >>/etc/sysconfig/dnsmasq
131 echo "OPTIONS=\"$OPTIONS $__OPT\"" >>/etc/sysconfig/dnsmasq
132 fi
133fi
134%systemd_trigger dnsmasq.service
135
136%files -f %{name}.lang
137%defattr(644,root,root,755)
138%doc CHANGELOG FAQ *.html contrib/{dnslist,dynamic-dnsmasq}
139%attr(754,root,root) /etc/rc.d/init.d/dnsmasq
140%{systemdunitdir}/dnsmasq.service
141%attr(755,root,root) %{_sbindir}/dnsmasq*
142%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/dnsmasq
143%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dnsmasq.conf
144%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/portforward
145%{_mandir}/man8/*
146%lang(es) %{_mandir}/es/man8/*
147%lang(fr) %{_mandir}/fr/man8/*
148%dir %{_datadir}/dnsmasq
149%{_datadir}/dnsmasq/trust-anchors.conf
This page took 0.026984 seconds and 4 git commands to generate.