From 6d5822857827341c5349bf30efbb03efff4c0d70 Mon Sep 17 00:00:00 2001 From: Tomasz Torcz Date: Sun, 26 Feb 2017 13:16:23 +0100 Subject: [PATCH] Resolves: #1426929 - package systemd unit file --- nghttp2.spec | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/nghttp2.spec b/nghttp2.spec index 65117e7..2d42a42 100644 --- a/nghttp2.spec +++ b/nghttp2.spec @@ -14,9 +14,11 @@ BuildRequires: CUnit-devel BuildRequires: c-ares-devel BuildRequires: libev-devel BuildRequires: openssl-devel +BuildRequires: systemd-devel BuildRequires: zlib-devel Requires: libnghttp2%{?_isa} = %{version}-%{release} +%{?systemd_requires} %description This package contains the HTTP/2 client, server and proxy programs. @@ -64,6 +66,8 @@ make %{?_smp_mflags} V=1 %install %make_install +install -D -m0444 -p contrib/nghttpx.service \ + "$RPM_BUILD_ROOT%{_unitdir}/nghttpx.service" # not needed on Fedora/RHEL rm -f "$RPM_BUILD_ROOT%{_libdir}/libnghttp2.la" @@ -72,8 +76,10 @@ rm -f "$RPM_BUILD_ROOT%{_libdir}/libnghttp2.la" rm -f "$RPM_BUILD_ROOT%{_datadir}/doc/nghttp2/README.rst" %post -n libnghttp2 -p /sbin/ldconfig +%systemd_post nghttpx.service %postun -n libnghttp2 -p /sbin/ldconfig +%systemd_postun nghttpx.service %check @@ -92,6 +98,7 @@ make %{?_smp_mflags} check %{_mandir}/man1/nghttp.1* %{_mandir}/man1/nghttpd.1* %{_mandir}/man1/nghttpx.1* +%{_unitdir}/nghttpx.service %files -n libnghttp2 %{_libdir}/libnghttp2.so.* @@ -107,6 +114,7 @@ make %{?_smp_mflags} check %changelog * Sun Feb 26 2017 Tomasz Torcz - 1.20.0-1 +- package systemd unit file (#1426929) - update to latest upstream release * Fri Feb 10 2017 Fedora Release Engineering - 1.19.0-2