Search
j0ke.net Open Build Service
>
Projects
>
server:dns
>
pdns33
> Changes
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
Changes of Revision 3
[-]
[+]
Changed
pdns.spec
@@ -78,6 +78,11 @@ %if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} BuildRequires: shadow-utils %endif +%if 0%{?suse_version} >= 1210 +BuildRequires: systemd +%{?systemd_requires} +%define has_systemd 1 +%endif # Url: http://www.powerdns.com/ Source: %{name}-%{version}.tar.bz2 @@ -304,6 +309,7 @@ --with-sqlite-lib=%{_libdir} \ --with-pgsql-lib=%{_libdir} \ --with-mysql-lib=%{_libdir} \ + --enable-tools \ --with-modules="" \ --with-dynmodules="\ pipe \ @@ -379,7 +385,12 @@ %endif %{__ln_s} -f ../../etc/init.d/%{pkg_name} %{buildroot}%{_sbindir}/rc%{pkg_name} %{__rm} -rfv %{buildroot}%{_libdir}/pdns/*.la - +%if 0%{?has_systemd} +%{__install} -D -m 0644 contrib/systemd-pdns.service %{buildroot}%{_unitdir}/pdns.service +%if 0%{?with_pdns_recursor} +%{__install} -D -m 0644 contrib/systemd-pdns-recursor.service %{buildroot}%{_unitdir}/pdns-recursor.service +%endif +%endif %clean %{__rm} -rf %{buildroot} @@ -387,30 +398,45 @@ /usr/sbin/groupadd -r pdns &>/dev/null || : /usr/sbin/useradd -o -g pdns -s /bin/false -r -c "pdns" -d %{home} pdns &>/dev/null || : +%if 0%{?has_systemd} +%service_add_pre nginx.service +%endif + %post %if 0%{?suse_version} %{fillup_and_insserv pdns} %endif +%if 0%{?has_systemd} +%service_add_post pdns.service +%endif %preun %if 0%{?suse_version} %stop_on_removal pdns %endif +%if 0%{?has_systemd} +%service_del_preun pdns.service +%endif %postun %if 0%{?suse_version} %restart_on_update pdns %insserv_cleanup %endif - +%if 0%{?has_systemd} +%service_del_postun pdns.service +%endif %files %defattr (-,root,root,-) -%doc ChangeLog HACKING INSTALL README* TODO +%doc HACKING INSTALL README* TODO #%if 0%{?suse_version} #%doc pdns/docs/html #%endif %config(noreplace) /etc/init.d/%{pkg_name} +%if 0%{?has_systemd} +%{_unitdir}/pdns.service +%endif %dir %attr(750,root,pdns) %{_sysconfdir}/%{pkg_name} %config(noreplace) %attr(640,root,pdns) %{_sysconfdir}/%{pkg_name}/%{pkg_name}.conf %{_bindir}/pdns_control @@ -437,6 +463,9 @@ %files -n pdns-recursor %defattr (-,root,root,-) %{_sbindir}/pdns_recursor +%if 0%{?has_systemd} +%{_unitdir}/pdns-recursor.service +%endif %endif %files backend-mysql