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