summaryrefslogtreecommitdiffhomepage
path: root/pkg/rpm/unit.module.spec.in
diff options
context:
space:
mode:
authorAndrei Belov <defan@nginx.com>2019-03-01 18:30:09 +0300
committerAndrei Belov <defan@nginx.com>2019-03-01 18:30:09 +0300
commit3c3720cba7154bc168cbd00c74817626bb53e140 (patch)
treeda1500f7c6bd5e90ecf45299b6f4b19a29d521cd /pkg/rpm/unit.module.spec.in
parent315a864c27aa27a48c013c4a1ef67a099ffea894 (diff)
parentdf02b03824065389c73213b19736140442cf63bc (diff)
downloadunit-3c3720cba7154bc168cbd00c74817626bb53e140.tar.gz
unit-3c3720cba7154bc168cbd00c74817626bb53e140.tar.bz2
Merged with the default branch.
Diffstat (limited to 'pkg/rpm/unit.module.spec.in')
-rw-r--r--pkg/rpm/unit.module.spec.in17
1 files changed, 17 insertions, 0 deletions
diff --git a/pkg/rpm/unit.module.spec.in b/pkg/rpm/unit.module.spec.in
index d86469f4..ab55d2a4 100644
--- a/pkg/rpm/unit.module.spec.in
+++ b/pkg/rpm/unit.module.spec.in
@@ -48,6 +48,10 @@ This package contains %%SUMMARY%%.
%debug_package
%endif
+%if 0%{?fedora}
+%define _debugsource_template %{nil}
+%endif
+
%prep
%setup -qcTn %{name}-%{unit_version}
tar --strip-components=1 -zxf %{SOURCE0}
@@ -72,16 +76,29 @@ make %%MODULE_MAKEARGS%%
%install
%{__rm} -rf %{buildroot}
%{__mkdir} -p %{buildroot}%{_datadir}/doc/%%NAME%%
+if [ `basename %{SOURCE100}` == COPYRIGHT.%{name} ]; then
+%{__install} -m 644 -p %{SOURCE100} \
+ %{buildroot}%{_datadir}/doc/%%NAME%%/COPYRIGHT
+else
%{__install} -m 644 -p NOTICE \
%{buildroot}%{_datadir}/doc/%%NAME%%/COPYRIGHT
+fi
%%MODULE_PREINSTALL%%
%{__ln_s} build-debug build
DESTDIR=%{buildroot} make %%MODULE_INSTARGS%%
%{__rm} -f build
%{__ln_s} build-nodebug build
DESTDIR=%{buildroot} make %%MODULE_INSTARGS%%
+%%MODULE_POSTINSTALL%%
%check
+%{__rm} -rf %{buildroot}/usr/src
+cd %{bdir}
+grep -v 'usr/src' debugfiles.list > debugfiles.list.new && mv debugfiles.list.new debugfiles.list
+cat /dev/null > debugsources.list
+%if 0%{?suse_version} >= 1500
+cat /dev/null > debugsourcefiles.list
+%endif
%clean
%{__rm} -rf %{buildroot}