> Please send the patches to the bug. I'll leave this until aafter the
> release.
No prob.
Below are my debian/* patches against 2.0-2.
These include a pointer to the git repo I'm using for development, which
you will likely want to remove.
My tweaks to the upstream build system are orthogonal, and don't
actually affect the program's functionality or buildability. Unless
they fix some architecture-specific build issue or something like that,
I don't see any particular reason to maintain them as debian patches,
which is why I have not attached them.
Cheers,
--Barak.
>From 55970d5bb841bf2d0ce140f1caf560f6524863fa Mon Sep 17 00:00:00 2001
From: "Barak A. Pearlmutter" <[email protected]>
Date: Thu, 5 Feb 2015 15:26:48 +0000
Subject: [PATCH 1/5] simplify debian packaging scripts
Shorten debian/rules via dh9.
Remove debian/usbview.dirs.
Bump policy.
And add autoconf-related build dependencies.
---
debian/control | 9 +++++--
debian/rules | 73 ++---------------------------------------------------
debian/usbview.dirs | 1 -
3 files changed, 9 insertions(+), 74 deletions(-)
delete mode 100644 debian/usbview.dirs
diff --git a/debian/control b/debian/control
index 34208f9..70dec32 100644
--- a/debian/control
+++ b/debian/control
@@ -2,9 +2,14 @@ Source: usbview
Section: x11
Priority: optional
Maintainer: Mark Brown <[email protected]>
-Standards-Version: 3.9.4
+Standards-Version: 3.9.6
Homepage: http://www.kroah.com/linux-usb/
-Build-Depends: debhelper (>= 9), libgtk-3-dev, dpkg-dev (>= 1.16.1)
+Build-Depends: debhelper (>= 9),
+ dh-autoreconf, autoconf-archive,
+ libgtk-3-dev
+Vcs-Git: git://github.com/barak/usbview.git
+Vcs-Browser: https://github.com/barak/usbview
+X-Vcs-Upstream-Git: git://github.com/gregkh/usbview.git
Package: usbview
Architecture: any
diff --git a/debian/rules b/debian/rules
index 1753f8f..b718cd5 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,73 +1,4 @@
#!/usr/bin/make -f
-# Sample debian/rules that uses debhelper.
-# GNU copyright 1997 to 1999 by Joey Hess.
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
-
-DPKG_EXPORT_BUILFLAGS=1
-include /usr/share/dpkg/buildflags.mk
-
-CFLAGS += $(CPPFLAGS)
-
-build-arch: build
-build-indep:
-build: build-stamp
-build-stamp:
- dh_testdir
- mv ChangeLog changelog
- # Prevent regeneration of any of the auto* gunk.
- touch configure aclocal.m4 Makefile.in
- touch config.h.in
- ./configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info
- make CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
-
- touch build-stamp
-
-clean:
- dh_testdir
- dh_testroot
- rm -f build-stamp
- if [ -f changelog ]; then \
- mv changelog ChangeLog; \
- fi
- if [ -f Makefile ]; then $(MAKE) clean ; fi
- if [ -f Makefile ]; then $(MAKE) distclean ; fi
-
- dh_clean
-
-install: build
- dh_testdir
- dh_testroot
- dh_prep
- dh_installdirs
-
- $(MAKE) DESTDIR=`pwd`/debian/usbview install
-
-# Build architecture-independent files here.
-binary-indep: build install
-
-# Build architecture-dependent files here.
-binary-arch: build install
- dh_testdir
- dh_testroot
- dh_installdocs
- dh_installexamples
- dh_installmenu
-
- cp debian/usbview.desktop debian/usbview/usr/share/applications
-
- dh_installman
- dh_installchangelogs
- dh_link
- dh_strip
- dh_compress
- dh_fixperms
- dh_installdeb
- dh_shlibdeps
- dh_gencontrol
- dh_md5sums
- dh_builddeb
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install
+%:
+ dh $@ --with autoreconf --parallel
diff --git a/debian/usbview.dirs b/debian/usbview.dirs
deleted file mode 100644
index 9ecda26..0000000
--- a/debian/usbview.dirs
+++ /dev/null
@@ -1 +0,0 @@
-usr/share/applications
--
2.1.4
>From 5667f2477ce61074ea85b8bf74b0ba82df4c06b0 Mon Sep 17 00:00:00 2001
From: "Barak A. Pearlmutter" <[email protected]>
Date: Thu, 5 Feb 2015 16:34:24 +0000
Subject: [PATCH 2/5] single-debian-patch source option to allow painless use
of git
---
debian/source/local-options | 1 +
1 file changed, 1 insertion(+)
create mode 100644 debian/source/local-options
diff --git a/debian/source/local-options b/debian/source/local-options
new file mode 100644
index 0000000..7423a2d
--- /dev/null
+++ b/debian/source/local-options
@@ -0,0 +1 @@
+single-debian-patch
--
2.1.4
>From 5a39e69f94f06d54db67f7a4b122a14630794960 Mon Sep 17 00:00:00 2001
From: "Barak A. Pearlmutter" <[email protected]>
Date: Thu, 5 Feb 2015 16:14:31 +0000
Subject: [PATCH 3/5] git ignore debian debris
---
debian/.gitignore | 7 +++++++
1 file changed, 7 insertions(+)
create mode 100644 debian/.gitignore
diff --git a/debian/.gitignore b/debian/.gitignore
new file mode 100644
index 0000000..8386cab
--- /dev/null
+++ b/debian/.gitignore
@@ -0,0 +1,7 @@
+/*.debhelper
+/*.debhelper.log
+/*.substvars
+/autoreconf.after
+/autoreconf.before
+/files
+/usbview/
--
2.1.4
>From 78c17289d3a5b6dcc38f33117e0a40f8e7c31fe5 Mon Sep 17 00:00:00 2001
From: "Barak A. Pearlmutter" <[email protected]>
Date: Thu, 5 Feb 2015 15:49:36 +0000
Subject: [PATCH 4/5] update menu and desktop files
Invoke command as root in menu entries.
Satisfy desktop-file-validate.
Silence lintian tag su-wrapper-not-su-to-root.
Silence lintian tag desktop-entry-lacks-keywords-entry.
Install and enable upstream 64x64 icon, in original and 32x32 resolutions.
---
debian/.gitignore | 1 +
debian/clean | 2 ++
debian/control | 1 +
debian/rules | 11 +++++++++++
debian/usbview.desktop | 8 +++++---
debian/usbview.install | 3 +++
debian/usbview.menu | 4 ++--
7 files changed, 25 insertions(+), 5 deletions(-)
create mode 100644 debian/clean
create mode 100644 debian/usbview.install
diff --git a/debian/.gitignore b/debian/.gitignore
index 8386cab..d6708ef 100644
--- a/debian/.gitignore
+++ b/debian/.gitignore
@@ -4,4 +4,5 @@
/autoreconf.after
/autoreconf.before
/files
+/icons/
/usbview/
diff --git a/debian/clean b/debian/clean
new file mode 100644
index 0000000..53eadb7
--- /dev/null
+++ b/debian/clean
@@ -0,0 +1,2 @@
+debian/icons/32x32/usbview.xpm
+debian/icons/64x64/usbview.xpm
diff --git a/debian/control b/debian/control
index 70dec32..f3500c5 100644
--- a/debian/control
+++ b/debian/control
@@ -6,6 +6,7 @@ Standards-Version: 3.9.6
Homepage: http://www.kroah.com/linux-usb/
Build-Depends: debhelper (>= 9),
dh-autoreconf, autoconf-archive,
+ imagemagick,
libgtk-3-dev
Vcs-Git: git://github.com/barak/usbview.git
Vcs-Browser: https://github.com/barak/usbview
diff --git a/debian/rules b/debian/rules
index b718cd5..6944017 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,3 +2,14 @@
%:
dh $@ --with autoreconf --parallel
+
+override_dh_install: debian/icons/32x32/usbview.xpm debian/icons/64x64/usbview.xpm
+ dh_install
+
+debian/icons/64x64/usbview.xpm: usb_icon.xpm
+ mkdir -p $$(dirname $@)
+ cp $< $@
+
+debian/icons/32x32/usbview.xpm: usb_icon.xpm
+ mkdir -p $$(dirname $@)
+ convert -geometry 32x32 $< $@
diff --git a/debian/usbview.desktop b/debian/usbview.desktop
index 385aebb..ec44efd 100644
--- a/debian/usbview.desktop
+++ b/debian/usbview.desktop
@@ -1,7 +1,9 @@
[Desktop Entry]
-Name=usbview
+Name=USBView
Comment=View USB devices attached to system
-Exec=/usr/bin/usbview
+Exec=su-to-root -X -c /usr/bin/usbview
+Icon=usbview
Terminal=false
Type=Application
-Categories=GTK;System;HardwareSettings
+Keywords=USB;devices;connected;removable;
+Categories=GTK;HardwareSettings;Settings;
diff --git a/debian/usbview.install b/debian/usbview.install
new file mode 100644
index 0000000..4f9f4a2
--- /dev/null
+++ b/debian/usbview.install
@@ -0,0 +1,3 @@
+debian/usbview.desktop /usr/share/applications/
+debian/icons/32x32/usbview.xpm /usr/share/icons/hicolor/32x32/apps/
+debian/icons/64x64/usbview.xpm /usr/share/icons/hicolor/64x64/apps/
diff --git a/debian/usbview.menu b/debian/usbview.menu
index afe2718..e7b36d2 100644
--- a/debian/usbview.menu
+++ b/debian/usbview.menu
@@ -1,3 +1,3 @@
?package(usbview):needs="X11" section="Applications/System/Hardware" \
- title="USB View" command="/usr/bin/usbview"
-
+ title="USB View" command="su-to-root -X -c /usr/bin/usbview" \
+ icon="/usr/share/icons/hicolor/32x32/apps/usbview.xpm"
--
2.1.4
>From e4ee9414d1261ca223e4add872a0e85ab65c86d9 Mon Sep 17 00:00:00 2001
From: "Barak A. Pearlmutter" <[email protected]>
Date: Tue, 10 Feb 2015 14:45:39 +0000
Subject: [PATCH 5/5] create and install scalable icon
Scalable (svg format) icon based on upstream icon in xpm format;
pretty much exactly the same, except for slightly more rounded
corners.
Import and paste
https://upload.wikimedia.org/wikipedia/commons/f/fd/USB_Icon.svg
for the USB graphic in the centre.
Generate installed bitmap icons from svg icon.
Switch 64x64 icon from xpm to png.
---
debian/clean | 3 +--
debian/rules | 12 ++++-----
debian/usbview.install | 3 ++-
debian/usbview.svg | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 78 insertions(+), 10 deletions(-)
create mode 100644 debian/usbview.svg
diff --git a/debian/clean b/debian/clean
index 53eadb7..ce7f268 100644
--- a/debian/clean
+++ b/debian/clean
@@ -1,2 +1 @@
-debian/icons/32x32/usbview.xpm
-debian/icons/64x64/usbview.xpm
+debian/icons/*/*
diff --git a/debian/rules b/debian/rules
index 6944017..e47e5d0 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,13 +3,11 @@
%:
dh $@ --with autoreconf --parallel
-override_dh_install: debian/icons/32x32/usbview.xpm debian/icons/64x64/usbview.xpm
- dh_install
+bitmaps=debian/icons/32x32/usbview.xpm debian/icons/64x64/usbview.png
-debian/icons/64x64/usbview.xpm: usb_icon.xpm
- mkdir -p $$(dirname $@)
- cp $< $@
+override_dh_install: $(bitmaps)
+ dh_install
-debian/icons/32x32/usbview.xpm: usb_icon.xpm
+$(bitmaps): debian/usbview.svg
mkdir -p $$(dirname $@)
- convert -geometry 32x32 $< $@
+ convert -geometry $$(basename $$(dirname $@)) $< $@
diff --git a/debian/usbview.install b/debian/usbview.install
index 4f9f4a2..f386049 100644
--- a/debian/usbview.install
+++ b/debian/usbview.install
@@ -1,3 +1,4 @@
debian/usbview.desktop /usr/share/applications/
debian/icons/32x32/usbview.xpm /usr/share/icons/hicolor/32x32/apps/
-debian/icons/64x64/usbview.xpm /usr/share/icons/hicolor/64x64/apps/
+debian/icons/64x64/usbview.png /usr/share/icons/hicolor/64x64/apps/
+debian/usbview.svg /usr/share/icons/hicolor/scalable/apps/
diff --git a/debian/usbview.svg b/debian/usbview.svg
new file mode 100644
index 0000000..da3295b
--- /dev/null
+++ b/debian/usbview.svg
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="64px"
+ height="64px"
+ id="svg2985"
+ version="1.1"
+ inkscape:version="0.48.5 r10040"
+ sodipodi:docname="New document 2">
+ <defs
+ id="defs2987" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="7.1276363"
+ inkscape:cx="8.9147202"
+ inkscape:cy="26.700074"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ inkscape:document-units="px"
+ inkscape:grid-bbox="true"
+ inkscape:snap-global="false"
+ inkscape:window-width="1600"
+ inkscape:window-height="834"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1" />
+ <metadata
+ id="metadata2990">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ id="layer1"
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer">
+ <rect
+ style="fill:#67bfef;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.95700002;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ id="rect3111"
+ width="62.055035"
+ height="62.055035"
+ x="1.1009438"
+ y="1.124616"
+ ry="12.767206" />
+ <path
+ id="path1334"
+ d="m 59.757253,31.012666 -6.076826,-3.509323 0,2.50338 -31.060353,0 6.047801,-6.389553 c 0.514692,-0.412553 1.188114,-0.701962 1.880845,-0.717993 2.802382,0 4.466566,-7.28e-4 5.079145,-0.0019 0.415225,1.183011 1.530592,2.036904 2.856546,2.036904 1.677422,0 3.038717,-1.361174 3.038717,-3.039203 0,-1.678759 -1.361174,-3.039447 -3.038717,-3.039447 -1.325954,0 -2.441321,0.853407 -2.856546,2.035447 l -5.019635,-8.51e-4 c -1.360447,0 -2.785988,0.746412 -3.693316,1.621436 0.02478,-0.02599 0.05052,-0.05368 -0.0014,4.86e-4 -0.01919,0.02162 -6.416513,6.778424 -6.416513,6.778424 -0.513597,0.411947 -1.186655,0.699533 -1.878901,0.716051 l -3.513696,0 c -0.465749,-2.321211 -2.515525,-4.070043 -4.974335,-4.070043 -2.8033537,0 -5.0757426,2.272388 -5.0757426,5.074892 0,2.803354 2.2723889,5.075864 5.0757426,5.075864 2.459296,0 4.509072,-1.750289 4.97482,-4.073443 l 3.452123,0 c 0.0089,0 0.01773,4.85e-4 0.02672,0 l 7.635474,0 c 0.69091,0.01761 1.363117,0.30556 1.87623,0.717993 0,0 6.395868,6.756321 6.415664,6.778182 0.05125,0.05429 0.02575,0.02599 4.85e-4,4.85e-4 0.907329,0.874902 2.333477,1.620827 3.694166,1.620827 l 4.837463,-0.0011 0,2.03751 6.078407,0 0,-6.077797 -6.078407,0 0,2.034839 c 0,0 -1.274098,-0.0023 -4.896729,-0.0023 -0.692854,-0.01591 -1.367005,-0.304953 -1.881452,-0.717507 l -6.049142,-6.390725 23.464591,0 0,2.507388 6.076827,-3.508837 z"
+ inkscape:connector-curvature="0"
+ style="fill:#ffffff;fill-opacity:1" />
+ </g>
+</svg>
--
2.1.4