]>
Commit | Line | Data |
---|---|---|
5480de49 ER |
1 | # TODO |
2 | # - postgres deps and headers not working. (i failed to solve it) | |
8323af21 | 3 | Summary: Dynamic DNS Tools server |
f8936e2b | 4 | Summary(pl.UTF-8): Serwer dynamicznego DNS-u |
f9d687b7 | 5 | Name: ddt |
d17139a5 | 6 | Version: 0.5.9 |
410d928e | 7 | Release: 3 |
f9d687b7 | 8 | License: GPL |
395aae37 | 9 | Group: Networking/Daemons |
98931788 | 10 | Source0: http://dl.sourceforge.net/ddt/%{name}-%{version}.tar.gz |
8ca95ea2 | 11 | # Source0-md5: 30bb784bde3eef1e1a6eb61ab77f4b90 |
8323af21 | 12 | Source1: %{name}-client.init |
13 | Source2: %{name}-server.init | |
f9d687b7 | 14 | Patch0: %{name}-am_ac.patch |
0a44dcba | 15 | Patch1: %{name}-cgi-to-cgic.patch |
e23f924a | 16 | Patch2: %{name}-bind-includes-hack.patch |
6838533f | 17 | Patch3: %{name}-nobody.patch |
3c4c749e | 18 | Patch4: %{name}-postgresql.patch |
3ac128bf | 19 | URL: http://sourceforge.net/projects/ddt/ |
f9d687b7 AM |
20 | BuildRequires: autoconf |
21 | BuildRequires: automake | |
395aae37 | 22 | BuildRequires: bind-devel >= 9.2.1-10 |
0a44dcba | 23 | BuildRequires: cgilibc-devel |
a92ad1a6 | 24 | BuildRequires: fhs-compliance |
d17139a5 | 25 | BuildRequires: libgcrypt-devel |
98931788 | 26 | BuildRequires: libpqxx-devel |
e23f924a | 27 | BuildRequires: macrosystem-devel |
46deeffc | 28 | BuildRequires: openssl-devel >= 0.9.7d |
395aae37 | 29 | BuildRequires: opt |
802073ef | 30 | BuildRequires: regexx-devel |
e23f924a | 31 | BuildRequires: sgml-tools |
25842b8b | 32 | Requires(post,preun): /sbin/chkconfig |
98931788 | 33 | Requires: rc-scripts |
58193e55 | 34 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
f9d687b7 AM |
35 | |
36 | %description | |
8323af21 | 37 | DDT stands for Dynamic DNS Tools. The goal of the project is to |
f9d687b7 AM |
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 | ||
2fe2e126 JR |
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 | |
8323af21 | 45 | dynamicznego DNS-u. |
f9d687b7 AM |
46 | |
47 | %package clients | |
8323af21 | 48 | Summary: Dynamic DNS Tools client |
f8936e2b | 49 | Summary(pl.UTF-8): Klient dynamicznego DNS-u |
395aae37 | 50 | Group: Applications/Networking |
25842b8b | 51 | Requires(post,preun): /sbin/chkconfig |
98931788 | 52 | Requires: rc-scripts |
f9d687b7 AM |
53 | |
54 | %description clients | |
8323af21 | 55 | Dynamic DNS Tools client. |
f9d687b7 | 56 | |
2fe2e126 | 57 | %description clients -l pl.UTF-8 |
8323af21 | 58 | Klient dynamicznego DNS-u. |
f9d687b7 | 59 | |
f627a068 | 60 | %package cgi |
8323af21 | 61 | Summary: CGI scripts for Dynamic DNS Tools server |
f8936e2b | 62 | Summary(pl.UTF-8): Skrypty CGI do serwera dynamicznego DNS-u |
1c322268 | 63 | Group: Applications/Networking |
f627a068 AM |
64 | Requires: webserver |
65 | ||
66 | %description cgi | |
8323af21 | 67 | CGI scripts for Dynamic DNS Tools server. |
f627a068 | 68 | |
2fe2e126 | 69 | %description cgi -l pl.UTF-8 |
8323af21 | 70 | Skrypty CGI do serwera dynamicznego DNS-u. |
f627a068 | 71 | |
f9d687b7 AM |
72 | %prep |
73 | %setup -q | |
74 | %patch0 -p1 | |
0a44dcba | 75 | %patch1 -p1 |
e23f924a | 76 | %patch2 -p1 |
6838533f | 77 | %patch3 -p1 |
3c4c749e | 78 | %patch4 -p1 |
f9d687b7 AM |
79 | |
80 | %build | |
81 | %{__aclocal} | |
82 | %{__autoconf} | |
83 | %{__automake} | |
3c4c749e | 84 | CPPFLAGS="-I%{_includedir}/cgilibc -I%{_includedir}/postgresql/server"; export CPPFLAGS |
f9d687b7 AM |
85 | %configure \ |
86 | --enable-docs \ | |
87 | --enable-server \ | |
88 | --enable-admin \ | |
e23f924a AM |
89 | --with-pgsql-incdir=%{_includedir} \ |
90 | --with-pgsql-libdir=%{_libdir} | |
91 | # fixme | |
92 | echo "all install:" > docs/Makefile | |
93 | ||
f9d687b7 AM |
94 | %{__make} |
95 | ||
96 | %install | |
97 | rm -rf $RPM_BUILD_ROOT | |
802073ef PG |
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}} \ | |
410d928e | 101 | $RPM_BUILD_ROOT/srv/httpd/{cgi-bin,html/%{name}} |
395aae37 | 102 | |
e23f924a AM |
103 | %{__make} install \ |
104 | DESTDIR=$RPM_BUILD_ROOT | |
da8a71e7 | 105 | |
e23f924a AM |
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 | |
f9d687b7 | 110 | |
410d928e | 111 | install admin/templates/* $RPM_BUILD_ROOT/srv/httpd/html/%{name} |
112 | install admin/*.{conf,cgi} $RPM_BUILD_ROOT/srv/httpd/cgi-bin | |
ec7a7875 | 113 | |
f9d687b7 AM |
114 | %clean |
115 | rm -rf $RPM_BUILD_ROOT | |
116 | ||
117 | %post | |
e23f924a AM |
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 | |
395aae37 | 121 | else |
e23f924a | 122 | echo "Run \"/etc/rc.d/init.d/%{name}-server start\" to start ddtd daemon." |
395aae37 | 123 | fi |
f9d687b7 AM |
124 | |
125 | %preun | |
395aae37 | 126 | if [ "$1" = "0" ]; then |
e23f924a AM |
127 | if [ -f /var/lock/subsys/%{name}-server ]; then |
128 | /etc/rc.d/init.d/%{name}-server stop >&2 | |
395aae37 | 129 | fi |
e23f924a AM |
130 | /sbin/chkconfig --del %{name}-server |
131 | fi | |
132 | ||
f627a068 | 133 | %post clients |
e23f924a AM |
134 | /sbin/chkconfig --add %{name}-client |
135 | if [ -f /var/lock/subsys/%{name}-client ]; then | |
1620308d | 136 | /etc/rc.d/init.d/%{name}-client restart >&2 |
e23f924a | 137 | else |
1620308d | 138 | echo "Run \"/etc/rc.d/init.d/%{name}-client start\" to start ddtcd daemon." |
e23f924a AM |
139 | fi |
140 | ||
f627a068 | 141 | %preun clients |
e23f924a | 142 | if [ "$1" = "0" ]; then |
1620308d | 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 | |
f9d687b7 AM |
147 | fi |
148 | ||
149 | %files | |
150 | %defattr(644,root,root,755) | |
e23f924a | 151 | %doc AUTHORS BUGS NEWS README THANKS TODO |
ec7a7875 AM |
152 | %doc docs/*.sgml docs/include/{named.conf,zonedb} |
153 | %doc server/*.sql | |
e23f924a AM |
154 | %attr(754,root,root) /etc/rc.d/init.d/%{name}-server |
155 | %attr(755,root,root) %{_sbindir}/ddtd | |
156 | %{_mandir}/man8/ddtd.8* | |
98931788 | 157 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ddtd.conf |
3ac128bf JB |
158 | %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}-server |
159 | %dir /var/lib/ddt-client | |
160 | %dir /var/run/ddt | |
e23f924a | 161 | |
f627a068 | 162 | %files clients |
e23f924a AM |
163 | %defattr(644,root,root,755) |
164 | %doc docs/DDT*.sgml | |
165 | %attr(754,root,root) /etc/rc.d/init.d/%{name}-client | |
f9d687b7 AM |
166 | %attr(755,root,root) %{_sbindir}/ddtc |
167 | %attr(755,root,root) %{_sbindir}/ddtcd | |
98931788 | 168 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ddtcd.conf |
395aae37 | 169 | %{_mandir}/man8/ddtc.8* |
170 | %{_mandir}/man8/ddtcd.8* | |
3ac128bf | 171 | %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}-client |
e23f924a AM |
172 | |
173 | %files cgi | |
174 | %defattr(644,root,root,755) | |
410d928e | 175 | %attr(755,root,root) /srv/httpd/cgi-bin/*.cgi |
3ac128bf | 176 | /srv/httpd/cgi-bin/*.conf |
410d928e | 177 | %attr(755,root,root) /srv/httpd/html/%{name} |