diff options
author | John Thacker <johnthacker@gmail.com> | 2022-01-07 00:28:55 -0500 |
---|---|---|
committer | A Wireshark GitLab Utility <gerald+gitlab-utility@wireshark.org> | 2022-01-07 14:40:58 +0000 |
commit | 7027242c27b5846d8b7d78f156ae6772d24ec21e (patch) | |
tree | 44e025ef7ab487ee31cfc6d9df142c37d6a83b59 /packaging | |
parent | cac5c086ed423a9e95b368f728e46a4c24e7c82c (diff) |
packaging: Let SUSE build with /usr prefix
There's a couple places where /usr/local is hardcoded in the
spec file that need to be replaced with %{_prefix} in order for
RPMs to build correctly on OpenSUSE with prefixes other than
/usr/local
Diffstat (limited to 'packaging')
-rw-r--r-- | packaging/rpm/wireshark.spec.in | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/packaging/rpm/wireshark.spec.in b/packaging/rpm/wireshark.spec.in index 16cadd8754..e652504cf6 100644 --- a/packaging/rpm/wireshark.spec.in +++ b/packaging/rpm/wireshark.spec.in @@ -386,7 +386,9 @@ cd - # SUSE's packaging conventions # (https://en.opensuse.org/openSUSE:Packaging_Conventions_RPM_Macros#.25suse_update_desktop_file) # require this: -install -Dm 0644 %{buildroot}/usr/local/share/applications/org.wireshark.Wireshark.desktop %{buildroot}/usr/share/applications/org.wireshark.Wireshark.desktop +%if "%{_prefix}" != "/usr" +install -Dm 0644 %{buildroot}%{_prefix}/share/applications/org.wireshark.Wireshark.desktop %{buildroot}/usr/share/applications/org.wireshark.Wireshark.desktop +%endif %suse_update_desktop_file org.wireshark.Wireshark %else # Fedora's packaging guidelines (https://fedoraproject.org/wiki/Packaging:Guidelines) @@ -422,7 +424,7 @@ update-mime-database %{_datadir}/mime &> /dev/null || : %if 0%{?suse_version} # Before packing, we need to restore the bindir to the wireshark one -%define _bindir /usr/local/bin +%define _bindir %{_prefix}/bin %endif %defattr(-,root,root) |