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