usbview/usbview.spec
Hans de Goede 1e4989902b New upstream release 2.0
- Drop patches (all upstreamed)
- Fix usbview not working with newer kernels due to debugfs permission changes
  by using pxexec. Ideally usbview would be rewritten to use the public parts
  of sysfs instead.
2013-04-06 20:28:08 +02:00

124 lines
3.8 KiB
RPMSpec

Name: usbview
Version: 2.0
Release: 1%{?dist}
Summary: USB topology and device viewer
Group: Applications/System
License: GPLv2
URL: http://www.kroah.com/linux-usb/
Source0: http://www.kroah.com/linux-usb/%{name}-%{version}.tar.gz
Source1: %{name}.desktop
Source2: org.fedoraproject.usbview.policy
BuildRequires: gtk3-devel automake desktop-file-utils
Requires: hicolor-icon-theme polkit
%description
Display information about the topology of the devices connected to the USB bus
on a Linux machine. It also displays detailed information on the individual
devices.
%prep
%setup -q
# For aarch64 support
autoreconf -f -i
# Convert to utf-8
for file in ChangeLog; do
iconv -f ISO-8859-1 -t UTF-8 -o $file.new $file && \
touch -r $file $file.new && \
mv $file.new $file
done
%build
%configure
make %{?_smp_mflags}
%install
make install DESTDIR=$RPM_BUILD_ROOT
#setup pkxexec
mv $RPM_BUILD_ROOT%{_bindir}/usbview $RPM_BUILD_ROOT%{_bindir}/usbview.bin
cat > $RPM_BUILD_ROOT%{_bindir}/usbview << EOF
#!/bin/sh
exec pkexec %{_bindir}/usbview.bin
EOF
chmod +x $RPM_BUILD_ROOT%{_bindir}/usbview
mkdir -p $RPM_BUILD_ROOT%{_datadir}/polkit-1/actions
install -p -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/polkit-1/actions
#install desktop icon
install -Dp -m 0644 usb_icon.xpm \
$RPM_BUILD_ROOT%{_datadir}/icons/hicolor/64x64/apps/%{name}.xpm
#install desktop file
desktop-file-install \
%if 0%{?fedora} && 0%{?fedora} < 19
--vendor fedora \
%endif
--add-category="System" \
--dir=$RPM_BUILD_ROOT%{_datadir}/applications \
%{SOURCE1}
%post
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
%postun
if [ $1 -eq 0 ] ; then
touch --no-create %{_datadir}/icons/hicolor &>/dev/null
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi
%posttrans
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%files
%doc ChangeLog COPYING* README TODO
%{_bindir}/usbview*
%{_mandir}/man8/usbview*
%{_datadir}/polkit-1/actions/org.fedoraproject.usbview.policy
%{_datadir}/icons/hicolor/64x64/apps/%{name}.xpm
%{_datadir}/applications/*%{name}.desktop
%changelog
* Sat Apr 6 2013 Hans de Goede <hdegoede@redhat.com> - 2.0-1
- New upstream release 2.0
- Drop patches (all upstreamed)
- Fix usbview not working with newer kernels due to debugfs permission changes
by using pxexec. Ideally usbview would be rewritten to use the public parts
of sysfs instead.
* Sat Feb 09 2013 Parag Nemade <paragn AT fedoraproject DOT org> - 1.1-10
- Remove vendor tag from desktop file as per https://fedorahosted.org/fesco/ticket/1077
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Thu Jun 14 2012 Hans de Goede <hdegoede@redhat.com> - 1.1-8
- Fix usbview not working due to missing usbfs (rhbz#806595)
- Port to gtk3
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Tue Dec 06 2011 Adam Jackson <ajax@redhat.com> - 1.1-6
- Rebuild for new libpng
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Tue Dec 15 2009 Itamar Reis Peixoto <itamar@ispbrasil.com.br> - 1.1-4
- include --vendor fedora in desktop-file-install (required for EL-5)
* Fri Dec 11 2009 Itamar Reis Peixoto <itamar@ispbrasil.com.br> - 1.1-3
- increasy usage of macros, fix icon permission
* Fri Dec 11 2009 Itamar Reis Peixoto <itamar@ispbrasil.com.br> - 1.1-2
- install desktop icon
* Sun Nov 29 2009 Itamar Reis Peixoto <itamar@ispbrasil.com.br> - 1.1-1
- Initial RPM for fedora