From 7b710946b152fabab0f3c838e5518576beb9020c Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Sun, 21 Aug 2022 11:23:54 +0200 Subject: Makefile: Use more GNU-style directory variables, explicit docdir for OpenSUSE It turns out that, while on most distributions "docdir" would be /usr/share/doc, it's /usr/share/doc/packages/ on OpenSUSE Tumbleweed. Use an explicit docdir as shown in: https://en.opensuse.org/openSUSE:Build_Service_cross_distribution_howto and don't unnecessarily hardcode directory variables in the Makefile. Otherwise, RPM builds for OpenSUSE will fail now that we have a README there. Signed-off-by: Stefano Brivio --- contrib/fedora/passt.spec | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'contrib') diff --git a/contrib/fedora/passt.spec b/contrib/fedora/passt.spec index 8bbe0d0..87c3e93 100644 --- a/contrib/fedora/passt.spec +++ b/contrib/fedora/passt.spec @@ -51,7 +51,11 @@ This package adds SELinux enforcement to passt(1) and pasta(1). %make_build %install +%if 0%{?suse_version} > 910 +%make_install DESTDIR=%{buildroot} prefix=%{_prefix} docdir=%{_prefix}/share/doc/packages/passt +%else %make_install DESTDIR=%{buildroot} prefix=%{_prefix} +%endif %ifarch x86_64 ln -sr %{buildroot}%{_mandir}/man1/passt.1 %{buildroot}%{_mandir}/man1/passt.avx2.1 ln -sr %{buildroot}%{_mandir}/man1/pasta.1 %{buildroot}%{_mandir}/man1/pasta.avx2.1 -- cgit v1.2.3