]> git.pld-linux.org Git - packages/pdns.git/blob - pdns.spec
- initial revision
[packages/pdns.git] / pdns.spec
1 %define name            pdns
2 %define version         2.9.4
3 %define release         0.1
4
5 Summary:        PowerDNS is a Versatile Database Driven Nameserver
6 Summary(pl):    PowerDNS to wielofunkcyjny serwer nazw korzystaj±cy z relacyjnych baz danych
7 Name:           %{name}
8 Version:        %{version}
9 Release:        %{release}
10 License:        GPL
11 Group:          Networking/Daemons
12 URL:            http://www.powerdns.com/
13 Source0:        http://downloads.powerdns.com/releases/%{name}-%{version}.tar.gz
14 Source1:        http://downloads.powerdns.com/documentation/%{name}.pdf
15 Source2:        %{name}.init
16 Source3:        %{name}.conf
17
18 BuildRequires:  bison
19 BuildRequires:  flex
20 BuildRequires:  mysql-devel
21 BuildRequires:  postgresql-c++-devel
22 BuildRequires:  libstdc++-devel
23 BuildRequires:  zlib-devel
24 Requires(pre):  /bin/id
25 Requires(pre):  /usr/sbin/useradd
26 Requires(pre):  /usr/sbin/groupadd
27 Requires(pre):  /bin/id
28 Requires(postun):       /usr/sbin/userdel
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 Provides:       nameserver pdns powerdns
31 Obsoletes:      nameserver pdns powerdns
32
33 %description
34 PowerDNS is a versatile nameserver which supports a large number of
35 different backends ranging from simple zonefiles to relational
36 databases and load balancing/failover algorithms.
37
38 %description -l pl
39 PowerDNS to wielofunkcyjny serwer nazw posiadaj±cy du¿± liczbê wtyczek
40 od prostych stref (a'la BIND) pocz±wszy, a na relacyjnych bazach danych
41 skoñczywszy oraz zawieraj±cy algorytmy zrównowa¿enia obci±¿enia i 
42 prze³±czania w wypadku awarii.
43
44 %package devel
45 Summary:        PowerDNS developement libraries
46 Summary(pl):    Biblioteki PowerDNS
47 Group:          Development/Libraries
48
49 %description devel 
50 Developement libraries for PowerDNS.
51
52 %description devel -l pl
53 Pliki bibliotek dla PowerDNS.
54
55 %package static
56 Summary:        PowerDNS static libs
57 Summary(pl):    Biblioteki statyczne PowerDNS
58 Group:          Development/Libraries
59
60 %description static
61 Static PowerDNS libraries.
62
63 %description static -l pl
64 Statyczne biblioteki PowerDNS.
65
66 %prep
67
68 %setup -q 
69
70 %build
71
72 %configure \
73     --libexecdir=%{_libexecdir} \
74     --libdir=%{_libdir}/%{name} \
75     --bindir=%{_sbindir} \
76     --sbindir=%{_sbindir} \
77     --sysconfdir=%{_sysconfdir}/%{name} \
78     --with-socketdir=/var/run \
79     --with-dynmodules="gmysql gpgsql pipe" \
80     --with-modules="" \
81     --with-pgsql-includes=/usr/include \
82     --enable-mysql \
83     --enable-pgsql 
84
85 %{__make}
86
87 %install
88 rm -rf $RPM_BUILD_ROOT
89
90 %{__make} install \
91         DESTDIR="%{buildroot}" 
92
93 install -d %{buildroot}/%{_initrddir}
94 install -d %{buildroot}/%{_sysconfdir}/%{name}
95 install -m644 %{SOURCE1} %{buildroot}/%{name}.pdf
96 install -m754 %{SOURCE2} %{buildroot}/%{_initrddir}/%{name}
97 install -m600 %{SOURCE3} %{buildroot}/%{_sysconfdir}/%{name}/%{name}.conf
98
99 %pre
100 if [ -n "`getgid djbdns`" ]; then
101         if [ "`getgid djbdns`" != "32" ]; then
102                 echo "Error: group djbdns doesn't have gid=32. Correct this before installing pdns." 1>&2
103                 exit 1
104         fi
105 else
106         /usr/sbin/groupadd -g 32 -r -f djbdns
107 fi
108 if [ -n "`id -u pdns 2>/dev/null`" ]; then
109         if [ "`id -u pdns`" != "30" ]; then
110                 echo "Error: user pdns doesn't have uid=30. Correct this before installing pdns." 1>&2
111                 exit 1
112         fi
113 else
114         /usr/sbin/useradd -u 30 -r -d /dev/null -s /bin/false -c "pdns User" -g djbdns pdns 1>&2
115 fi
116
117 %post
118 /sbin/chkconfig --add pdns
119
120 %preun
121 /sbin/chkconfig --del pdns
122
123 %postun
124 if [ "$1" = "0" ]; then
125         /usr/sbin/userdel pdns
126 fi
127
128 %clean
129 [ -n "%{buildroot}" -a "%{buildroot}" != / ] && rm -rf %{buildroot}
130
131 %files
132 %defattr(644,root,root,755)
133 %doc ChangeLog HACKING INSTALL README TODO WARNING %{name}.pdf
134 %config(noreplace) %attr(0600,root,root) %{_sysconfdir}/%{name}/%{name}.conf
135 %config(noreplace) %attr(0754,root,root) %{_initrddir}/%{name}
136 %dir %{_sysconfdir}%{name}
137 %attr(755,root,root) %{_sbindir}/*
138 %{_libdir}%{name}/*
139 %{_mandir}/man8/*
140
141 %files devel
142 %attr(755,root,root) %{_libdir}/%{name}/*.so
143 %attr(644,root,root) %{_libdir}/%{name}/*.la
144
145 %files static
146 %attr(644,root,root) %{_libdir}/%{name}/*.a
This page took 0.046622 seconds and 4 git commands to generate.