Skip to content
Snippets Groups Projects
Commit 165e6ca9 authored by Jan Včelák's avatar Jan Včelák :rocket:
Browse files

drop outdated sources for RPM package

parent 6c06da20
No related branches found
No related tags found
No related merge requests found
[Unit]
Description=Knot DNS daemon
After=syslog.target network.target auditd.service
[Service]
EnvironmentFile=/etc/sysconfig/knot
ExecReload=/usr/sbin/knotc reload
ExecStart=/usr/sbin/knotd $KNOTARGS
Restart=on-abort
[Install]
WantedBy=multi-user.target
Summary: KNOT DNS daemon
Name: knot
Version: 0.9.1
Release: 1
License: GPL
Group: Networking/Daemons
Source: http://public.nic.cz/files/knot-dns/knot-%{version}.tar.gz
Source1: %{name}.sysconfig
Source2: %{name}.service
Patch: %{name}.diff
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-build
Url: http://www.knot-dns.cz
BuildRequires: flex userspace-rcu-devel openssl-devel bison
%description
KNOT DNS is a high-performance authoritative DNS server implementation.
%prep
%setup -n %{name}-%{version}
%patch -p1
%build
./configure --prefix=%{_prefix} --sysconfdir=%{_sysconfdir}/%{name} --localstatedir=%{_var}/lib --libexecdir=%{_libexecdir}/%{name}
make -C samples %{name}.sample.conf
make
%install
rm -rf %{buildroot}/*
make install prefix=%{buildroot}/%{_prefix} sysconfdir=%{buildroot}/%{_sysconfdir}/%{name} localstatedir=%{buildroot}/%{_var}/lib mandir=%{buildroot}/%{_mandir} libexecdir=%{buildroot}/%{_libexecdir}/%{name}
install -d %{buildroot}/%{_sysconfdir}/sysconfig
install $RPM_SOURCE_DIR/%{name}.sysconfig %{buildroot}/%{_sysconfdir}/sysconfig/%{name}
install -d %{buildroot}/%{_var}/lib/%{name}
install -d %{buildroot}/lib/systemd/system/
install $RPM_SOURCE_DIR/%{name}.service %{buildroot}/lib/systemd/system/%{name}.service
%post
# run after an installation
if [ $1 -eq 1 ] ; then
# Initial installation
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi
%preun
# run before a package is removed
if [ $1 -eq 0 ]; then
/bin/systemctl --no-reload disable %{name}.service >/dev/null 2>&1 || :
/bin/systemctl stop %{name}.service > /dev/null 2>&1 || :
fi
%postun
# run after a package is removed
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ]; then
/bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || :
fi
%triggerun -- knot < 0.9
# Save the current service runlevel info
# User must manually run systemd-sysv-convert --apply %{name}
# to migrate them to systemd targets
/usr/bin/systemd-sysv-convert --save %{name}
/sbin/chkconfig --del %{name} >/dev/null 2>&1 || :
/bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || :
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
%files
%defattr(-,root,root,-)
%config %attr(644,root,root) %{_sysconfdir}/%{name}/*
%{_sbindir}/*
%{_libexecdir}/%{name}/*
%dir %{_var}/lib/%{name}/
%doc %{_mandir}/man8/*
%attr(0644,root,root) /lib/systemd/system/%{name}.service
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
%changelog
* Mon Jan 16 2012 - feela@network.cz
- Support for systemd.
- Specfile cleanup
* Thu Nov 3 2011 - feela@network.cz
- Initial version
# Settings for the KNOT DNS daemon.
# KNOTARGS= : any extra command-line startup arguments for knot dns
KNOTARGS=
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment