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