X-Git-Url: http://git.pld-linux.org/?p=packages%2Fddt.git;a=blobdiff_plain;f=ddt.spec;h=52ef6ecbe3db7e33b6d0f87f66a3aca2ab68126f;hp=e94c38e175f5ef9804d26a98ccc8f5ac089ff929;hb=HEAD;hpb=f9d687b7c1edd24ffc4a4a3953dc0ad0f4f52b48 diff --git a/ddt.spec b/ddt.spec index e94c38e..52ef6ec 100644 --- a/ddt.spec +++ b/ddt.spec @@ -1,90 +1,177 @@ -Summary: Dynamic DNS Tools Server -Summary(pl): Serwer dynamicznego DNSu +# TODO +# - postgres deps and headers not working. (i failed to solve it) +Summary: Dynamic DNS Tools server +Summary(pl.UTF-8): Serwer dynamicznego DNS-u Name: ddt -Version: 0.5 -Release: 1 -Group: Networking/Daemons +Version: 0.5.9 +Release: 3 License: GPL -URL: http://www.ddt.org/ -Source0: http://download.sourceforge.net/ddt/ddt-0.5.tar.gz +Group: Networking/Daemons +Source0: http://dl.sourceforge.net/ddt/%{name}-%{version}.tar.gz +# Source0-md5: 30bb784bde3eef1e1a6eb61ab77f4b90 +Source1: %{name}-client.init +Source2: %{name}-server.init Patch0: %{name}-am_ac.patch -Source1: %{name}.init -BuildRequires: opt -BuildRequires: openssl-devel -BuildRequires: bind-devel >= 9.2.1-10 -BuildRequires: cgilib-devel +Patch1: %{name}-cgi-to-cgic.patch +Patch2: %{name}-bind-includes-hack.patch +Patch3: %{name}-nobody.patch +Patch4: %{name}-postgresql.patch +URL: http://sourceforge.net/projects/ddt/ BuildRequires: autoconf BuildRequires: automake -Buildroot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) +BuildRequires: bind-devel >= 9.2.1-10 +BuildRequires: cgilibc-devel +BuildRequires: fhs-compliance +BuildRequires: libgcrypt-devel +BuildRequires: libpqxx-devel +BuildRequires: macrosystem-devel +BuildRequires: openssl-devel >= 0.9.7d +BuildRequires: opt +BuildRequires: regexx-devel +BuildRequires: sgml-tools +Requires(post,preun): /sbin/chkconfig +Requires: rc-scripts +BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description -DDT stands for Dynamic Dns Tools. The goal of the project is to +DDT stands for Dynamic DNS Tools. The goal of the project is to provide an open and free (in the GPL-sense) set of tools that will permit the deployment of secure and reliable dynamic DNS services. -%description -l pl -DDT oznacza Dynamiczne Narzêdzia DNS. Celem projektu jest dostarczenie -otwartego i wolnego (w sensie GPL) zestawu narzêdzi pozwalaj±cych -na stworzenie bezpiecznego i niezawodnego systemu dynamicznego DNS. +%description -l pl.UTF-8 +DDT oznacza Dynamiczne Narzędzia DNS-u. Celem projektu jest +dostarczenie otwartego i wolnego (w sensie GPL) zestawu narzędzi +pozwalających na stworzenie bezpiecznego i niezawodnego systemu +dynamicznego DNS-u. %package clients -Summary: Dynamic DNS Tools Client -Summary(pl): Klient Dynamicznego DNSu -Group: Applications/Networking +Summary: Dynamic DNS Tools client +Summary(pl.UTF-8): Klient dynamicznego DNS-u +Group: Applications/Networking +Requires(post,preun): /sbin/chkconfig +Requires: rc-scripts %description clients -Dynamic DNS Tools Client. +Dynamic DNS Tools client. + +%description clients -l pl.UTF-8 +Klient dynamicznego DNS-u. -%description -l pl clients -Klient Dynamicznego DNSu. +%package cgi +Summary: CGI scripts for Dynamic DNS Tools server +Summary(pl.UTF-8): Skrypty CGI do serwera dynamicznego DNS-u +Group: Applications/Networking +Requires: webserver + +%description cgi +CGI scripts for Dynamic DNS Tools server. + +%description cgi -l pl.UTF-8 +Skrypty CGI do serwera dynamicznego DNS-u. %prep %setup -q %patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 %build %{__aclocal} %{__autoconf} %{__automake} +CPPFLAGS="-I%{_includedir}/cgilibc -I%{_includedir}/postgresql/server"; export CPPFLAGS %configure \ --enable-docs \ --enable-server \ --enable-admin \ - --with-pgsql-lib=%{_libdir} \ - --with-pgsql-include=%{_includedir}/postgresql/server + --with-pgsql-incdir=%{_includedir} \ + --with-pgsql-libdir=%{_libdir} +# fixme +echo "all install:" > docs/Makefile + %{__make} %install rm -rf $RPM_BUILD_ROOT -install -d ${RPM_BUILD_ROOT}%{_sbindir} -install -d ${RPM_BUILD_ROOT}%{_mandir}/man8 -install -d ${RPM_BUILD_ROOT}%{_sysconfdir} -install -d ${RPM_BUILD_ROOT}/etc/rc.d/init.d -install -m640 client/ddtcd.conf $RPM_BUILD_ROOT/%{_sysconfdir} -install -m755 $RPM_SOURCE_DIR/ddtcd.init $RPM_BUILD_ROOT/etc/rc.d/init.d/ddtcd -install -m755 client/ddtc $RPM_BUILD_ROOT/%{_sbindir} -install -m755 client/ddtcd $RPM_BUILD_ROOT/%{_sbindir} -gzip client/ddtc.8 -gzip client/ddtcd.8 -install -m755 client/ddtc*[.]8.gz $RPM_BUILD_ROOT/%{_mandir}/man8 +install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8} \ + $RPM_BUILD_ROOT{%{_sysconfdir},/etc/rc.d/init.d} \ + $RPM_BUILD_ROOT{/etc/logrotate.d,/var/{lib/ddt-client,run/ddt}} \ + $RPM_BUILD_ROOT/srv/httpd/{cgi-bin,html/%{name}} + +%{__make} install \ + DESTDIR=$RPM_BUILD_ROOT + +install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-client +install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-server +install debian/ddt-client.logrotate $RPM_BUILD_ROOT/etc/logrotate.d/%{name}-client +install debian/ddt-server.logrotate $RPM_BUILD_ROOT/etc/logrotate.d/%{name}-server + +install admin/templates/* $RPM_BUILD_ROOT/srv/httpd/html/%{name} +install admin/*.{conf,cgi} $RPM_BUILD_ROOT/srv/httpd/cgi-bin %clean rm -rf $RPM_BUILD_ROOT %post -/sbin/chkconfig --add ddtcd +/sbin/chkconfig --add %{name}-server +if [ -f /var/lock/subsys/%{name}-server ]; then + /etc/rc.d/init.d/%{name}-server restart >&2 +else + echo "Run \"/etc/rc.d/init.d/%{name}-server start\" to start ddtd daemon." +fi %preun -if [ $1 = 0 ]; then - /sbin/chkconfig --del ddtcd +if [ "$1" = "0" ]; then + if [ -f /var/lock/subsys/%{name}-server ]; then + /etc/rc.d/init.d/%{name}-server stop >&2 + fi + /sbin/chkconfig --del %{name}-server +fi + +%post clients +/sbin/chkconfig --add %{name}-client +if [ -f /var/lock/subsys/%{name}-client ]; then + /etc/rc.d/init.d/%{name}-client restart >&2 +else + echo "Run \"/etc/rc.d/init.d/%{name}-client start\" to start ddtcd daemon." +fi + +%preun clients +if [ "$1" = "0" ]; then + if [ -f /var/lock/subsys/%{name}-client ]; then + /etc/rc.d/init.d/%{name}-client stop >&2 + fi + /sbin/chkconfig --del %{name}-client fi %files %defattr(644,root,root,755) -%config %{_sysconfdir}/ddtcd.conf -%doc AUTHORS README INSTALL COPYING THANKS ddt.lsm -%{_mandir}/man8/ddtc.8* -%{_mandir}/man8/ddtcd.8* +%doc AUTHORS BUGS NEWS README THANKS TODO +%doc docs/*.sgml docs/include/{named.conf,zonedb} +%doc server/*.sql +%attr(754,root,root) /etc/rc.d/init.d/%{name}-server +%attr(755,root,root) %{_sbindir}/ddtd +%{_mandir}/man8/ddtd.8* +%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ddtd.conf +%config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}-server +%dir /var/lib/ddt-client +%dir /var/run/ddt + +%files clients +%defattr(644,root,root,755) +%doc docs/DDT*.sgml +%attr(754,root,root) /etc/rc.d/init.d/%{name}-client %attr(755,root,root) %{_sbindir}/ddtc %attr(755,root,root) %{_sbindir}/ddtcd -/etc/rc.d/init.d/ddtcd +%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ddtcd.conf +%{_mandir}/man8/ddtc.8* +%{_mandir}/man8/ddtcd.8* +%config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}-client + +%files cgi +%defattr(644,root,root,755) +%attr(755,root,root) /srv/httpd/cgi-bin/*.cgi +/srv/httpd/cgi-bin/*.conf +%attr(755,root,root) /srv/httpd/html/%{name}