]>
Commit | Line | Data |
---|---|---|
1 | # TODO | |
2 | # - postgres deps and headers not working. (i failed to solve it) | |
3 | Summary: Dynamic DNS Tools server | |
4 | Summary(pl.UTF-8): Serwer dynamicznego DNS-u | |
5 | Name: ddt | |
6 | Version: 0.5.9 | |
7 | Release: 3 | |
8 | License: GPL | |
9 | Group: Networking/Daemons | |
10 | Source0: http://dl.sourceforge.net/ddt/%{name}-%{version}.tar.gz | |
11 | # Source0-md5: 30bb784bde3eef1e1a6eb61ab77f4b90 | |
12 | Source1: %{name}-client.init | |
13 | Source2: %{name}-server.init | |
14 | Patch0: %{name}-am_ac.patch | |
15 | Patch1: %{name}-cgi-to-cgic.patch | |
16 | Patch2: %{name}-bind-includes-hack.patch | |
17 | Patch3: %{name}-nobody.patch | |
18 | Patch4: %{name}-postgresql.patch | |
19 | URL: http://sourceforge.net/projects/ddt/ | |
20 | BuildRequires: autoconf | |
21 | BuildRequires: automake | |
22 | BuildRequires: bind-devel >= 9.2.1-10 | |
23 | BuildRequires: cgilibc-devel | |
24 | BuildRequires: fhs-compliance | |
25 | BuildRequires: libgcrypt-devel | |
26 | BuildRequires: libpqxx-devel | |
27 | BuildRequires: macrosystem-devel | |
28 | BuildRequires: openssl-devel >= 0.9.7d | |
29 | BuildRequires: opt | |
30 | BuildRequires: regexx-devel | |
31 | BuildRequires: sgml-tools | |
32 | Requires(post,preun): /sbin/chkconfig | |
33 | Requires: rc-scripts | |
34 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
35 | ||
36 | %description | |
37 | DDT stands for Dynamic DNS Tools. The goal of the project is to | |
38 | provide an open and free (in the GPL-sense) set of tools that will | |
39 | permit the deployment of secure and reliable dynamic DNS services. | |
40 | ||
41 | %description -l pl.UTF-8 | |
42 | DDT oznacza Dynamiczne Narzędzia DNS-u. Celem projektu jest | |
43 | dostarczenie otwartego i wolnego (w sensie GPL) zestawu narzędzi | |
44 | pozwalających na stworzenie bezpiecznego i niezawodnego systemu | |
45 | dynamicznego DNS-u. | |
46 | ||
47 | %package clients | |
48 | Summary: Dynamic DNS Tools client | |
49 | Summary(pl.UTF-8): Klient dynamicznego DNS-u | |
50 | Group: Applications/Networking | |
51 | Requires(post,preun): /sbin/chkconfig | |
52 | Requires: rc-scripts | |
53 | ||
54 | %description clients | |
55 | Dynamic DNS Tools client. | |
56 | ||
57 | %description clients -l pl.UTF-8 | |
58 | Klient dynamicznego DNS-u. | |
59 | ||
60 | %package cgi | |
61 | Summary: CGI scripts for Dynamic DNS Tools server | |
62 | Summary(pl.UTF-8): Skrypty CGI do serwera dynamicznego DNS-u | |
63 | Group: Applications/Networking | |
64 | Requires: webserver | |
65 | ||
66 | %description cgi | |
67 | CGI scripts for Dynamic DNS Tools server. | |
68 | ||
69 | %description cgi -l pl.UTF-8 | |
70 | Skrypty CGI do serwera dynamicznego DNS-u. | |
71 | ||
72 | %prep | |
73 | %setup -q | |
74 | %patch0 -p1 | |
75 | %patch1 -p1 | |
76 | %patch2 -p1 | |
77 | %patch3 -p1 | |
78 | %patch4 -p1 | |
79 | ||
80 | %build | |
81 | %{__aclocal} | |
82 | %{__autoconf} | |
83 | %{__automake} | |
84 | CPPFLAGS="-I%{_includedir}/cgilibc -I%{_includedir}/postgresql/server"; export CPPFLAGS | |
85 | %configure \ | |
86 | --enable-docs \ | |
87 | --enable-server \ | |
88 | --enable-admin \ | |
89 | --with-pgsql-incdir=%{_includedir} \ | |
90 | --with-pgsql-libdir=%{_libdir} | |
91 | # fixme | |
92 | echo "all install:" > docs/Makefile | |
93 | ||
94 | %{__make} | |
95 | ||
96 | %install | |
97 | rm -rf $RPM_BUILD_ROOT | |
98 | install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8} \ | |
99 | $RPM_BUILD_ROOT{%{_sysconfdir},/etc/rc.d/init.d} \ | |
100 | $RPM_BUILD_ROOT{/etc/logrotate.d,/var/{lib/ddt-client,run/ddt}} \ | |
101 | $RPM_BUILD_ROOT/srv/httpd/{cgi-bin,html/%{name}} | |
102 | ||
103 | %{__make} install \ | |
104 | DESTDIR=$RPM_BUILD_ROOT | |
105 | ||
106 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-client | |
107 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-server | |
108 | install debian/ddt-client.logrotate $RPM_BUILD_ROOT/etc/logrotate.d/%{name}-client | |
109 | install debian/ddt-server.logrotate $RPM_BUILD_ROOT/etc/logrotate.d/%{name}-server | |
110 | ||
111 | install admin/templates/* $RPM_BUILD_ROOT/srv/httpd/html/%{name} | |
112 | install admin/*.{conf,cgi} $RPM_BUILD_ROOT/srv/httpd/cgi-bin | |
113 | ||
114 | %clean | |
115 | rm -rf $RPM_BUILD_ROOT | |
116 | ||
117 | %post | |
118 | /sbin/chkconfig --add %{name}-server | |
119 | if [ -f /var/lock/subsys/%{name}-server ]; then | |
120 | /etc/rc.d/init.d/%{name}-server restart >&2 | |
121 | else | |
122 | echo "Run \"/etc/rc.d/init.d/%{name}-server start\" to start ddtd daemon." | |
123 | fi | |
124 | ||
125 | %preun | |
126 | if [ "$1" = "0" ]; then | |
127 | if [ -f /var/lock/subsys/%{name}-server ]; then | |
128 | /etc/rc.d/init.d/%{name}-server stop >&2 | |
129 | fi | |
130 | /sbin/chkconfig --del %{name}-server | |
131 | fi | |
132 | ||
133 | %post clients | |
134 | /sbin/chkconfig --add %{name}-client | |
135 | if [ -f /var/lock/subsys/%{name}-client ]; then | |
136 | /etc/rc.d/init.d/%{name}-client restart >&2 | |
137 | else | |
138 | echo "Run \"/etc/rc.d/init.d/%{name}-client start\" to start ddtcd daemon." | |
139 | fi | |
140 | ||
141 | %preun clients | |
142 | if [ "$1" = "0" ]; then | |
143 | if [ -f /var/lock/subsys/%{name}-client ]; then | |
144 | /etc/rc.d/init.d/%{name}-client stop >&2 | |
145 | fi | |
146 | /sbin/chkconfig --del %{name}-client | |
147 | fi | |
148 | ||
149 | %files | |
150 | %defattr(644,root,root,755) | |
151 | %doc AUTHORS BUGS NEWS README THANKS TODO | |
152 | %doc docs/*.sgml docs/include/{named.conf,zonedb} | |
153 | %doc server/*.sql | |
154 | %attr(754,root,root) /etc/rc.d/init.d/%{name}-server | |
155 | %attr(755,root,root) %{_sbindir}/ddtd | |
156 | %{_mandir}/man8/ddtd.8* | |
157 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ddtd.conf | |
158 | %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}-server | |
159 | %dir /var/lib/ddt-client | |
160 | %dir /var/run/ddt | |
161 | ||
162 | %files clients | |
163 | %defattr(644,root,root,755) | |
164 | %doc docs/DDT*.sgml | |
165 | %attr(754,root,root) /etc/rc.d/init.d/%{name}-client | |
166 | %attr(755,root,root) %{_sbindir}/ddtc | |
167 | %attr(755,root,root) %{_sbindir}/ddtcd | |
168 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ddtcd.conf | |
169 | %{_mandir}/man8/ddtc.8* | |
170 | %{_mandir}/man8/ddtcd.8* | |
171 | %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}-client | |
172 | ||
173 | %files cgi | |
174 | %defattr(644,root,root,755) | |
175 | %attr(755,root,root) /srv/httpd/cgi-bin/*.cgi | |
176 | /srv/httpd/cgi-bin/*.conf | |
177 | %attr(755,root,root) /srv/httpd/html/%{name} |