summaryrefslogtreecommitdiffstats
path: root/usbview.spec
blob: ff22894b12aef8ec5d068cd48c6775b5b19a2888 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
Name:           usbview
Version:        1.1
Release:        2%{?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
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  gtk2-devel

Source1:        usbview_icon.png
Source2:        usbview.desktop


BuildRequires:  desktop-file-utils


%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
# 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
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT

#install desktop icon
install -Dp -m 0755 %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/pixmaps/usbview_icon.png

#install desktop file
desktop-file-install                                    \
--add-category="Development"                            \
--dir=$RPM_BUILD_ROOT%{_datadir}/applications           \
%{SOURCE2}

%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc ChangeLog COPYING* README TODO
%{_bindir}/usbview
%{_mandir}/man8/usbview*
%{_datadir}/pixmaps/usbview_icon.png
%{_datadir}/applications/usbview.desktop

%changelog
* 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