diff options
author | Jeff Morriss <jeff.morriss.ws@gmail.com> | 2013-02-27 16:12:19 +0000 |
---|---|---|
committer | Jeff Morriss <jeff.morriss.ws@gmail.com> | 2013-02-27 16:12:19 +0000 |
commit | 98ce5836a46e7fb03ed90eebb7bc47ec653ef65b (patch) | |
tree | f01610f7910c3dcf28cba4ce6f1b93e467dd7f4c /packaging/rpm | |
parent | d48920d42adc350691d14c5f85d09eab3c7feb7b (diff) |
Add a %prefix option for users who want to (easily) configure Wireshark to
install in a non-standard location.
Assume the desktop-integration stuff goes in /usr (regardless of our prefix).
This (with r47914) fixes RPM generation when someone uses a prefix other than
/usr .
Also: run desktop-file-validate on the wireshark.desktop file (just in case it
wasn't installed with desktop-file-install).
svn path=/trunk/; revision=47916
Diffstat (limited to 'packaging/rpm')
-rw-r--r-- | packaging/rpm/SPECS/wireshark.spec.in | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/packaging/rpm/SPECS/wireshark.spec.in b/packaging/rpm/SPECS/wireshark.spec.in index 7dfece9ed4..6bc950873e 100644 --- a/packaging/rpm/SPECS/wireshark.spec.in +++ b/packaging/rpm/SPECS/wireshark.spec.in @@ -2,6 +2,8 @@ # $Id$ # @configure_input@ +%global prefix /usr + # Set these to 1 if you want to ensure your package inclues support for them: %global with_adns 0 %global with_lua 1 @@ -90,6 +92,7 @@ BuildRequires: gtk2-devel >= @GTK2_MIN_VERSION@ Requires: wireshark = %{version}-%{release} Requires: xdg-utils Requires: hicolor-icon-theme +BuildRequires: desktop-file-utils %if %{with_portaudio} BuildRequires: portaudio-devel Requires: portaudio @@ -120,7 +123,8 @@ Contains the Gnome (GTK+) Wireshark GUI and desktop integration files. %setup -q -n %{name}-%{version} %configure \ - --libdir=%{_libdir} \ + --prefix=%{prefix} \ + --libdir=%{_libdir} \ --with-gnu-ld \ %if %{with_adns} --with-adns \ @@ -142,6 +146,9 @@ make %{?_smp_mflags} rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install make DESTDIR=$RPM_BUILD_ROOT install_desktop_files +# Fedora's packaging guidelines (https://fedoraproject.org/wiki/Packaging:Guidelines) +# require this (at least if desktop-file-install was not used to install it). +desktop-file-validate %{buildroot}/%{_datadir}/applications/wireshark.desktop %clean rm -rf $RPM_BUILD_ROOT @@ -163,19 +170,19 @@ touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : %postun gnome update-desktop-database &> /dev/null ||: -update-mime-database %{_datadir}/mime &> /dev/null || : +update-mime-database /usr/share/mime &> /dev/null || : if [ $1 -eq 0 ] ; then - touch --no-create %{_datadir}/icons/gnome &>/dev/null - gtk-update-icon-cache %{_datadir}/icons/gnome &>/dev/null || : + touch --no-create /usr/share/icons/gnome &>/dev/null + gtk-update-icon-cache /usr/share/icons/gnome &>/dev/null || : - touch --no-create %{_datadir}/icons/hicolor &>/dev/null - gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : + touch --no-create /usr/share/icons/hicolor &>/dev/null + gtk-update-icon-cache /usr/share/icons/hicolor &>/dev/null || : fi # Is this really needed? %posttrans -gtk-update-icon-cache %{_datadir}/icons/gnome &>/dev/null || : -gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : +gtk-update-icon-cache /usr/share/icons/gnome &>/dev/null || : +gtk-update-icon-cache /usr/share/icons/hicolor &>/dev/null || : %files @@ -224,10 +231,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %files gnome %defattr(-,root,root) -%{_datadir}/applications/wireshark.desktop -%{_datadir}/icons/hicolor/*/apps/* -%{_datadir}/icons/gnome/*/mimetypes/* -%{_datadir}/mime/packages/wireshark.xml +/usr/share/applications/wireshark.desktop +/usr/share/icons/hicolor/*/apps/* +/usr/share/icons/gnome/*/mimetypes/* +/usr/share/mime/packages/wireshark.xml %{_bindir}/wireshark %{_mandir}/man1/wireshark.* |