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