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