From 154fe9fbdb388e618a9b62cc61e8a3bbc3a4b82c Mon Sep 17 00:00:00 2001 From: Nick White Date: Wed, 12 Sep 2012 00:27:33 +0100 Subject: Add basic debhelper setup --- debian/changelog | 5 +++++ debian/compat | 1 + debian/control | 19 +++++++++++++++++++ debian/copyright | 10 ++++++++++ debian/getxbook.desktop | 9 +++++++++ debian/menu | 4 ++++ debian/rules | 17 +++++++++++++++++ debian/source/format | 1 + debian/watch | 2 ++ 9 files changed, 68 insertions(+) create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/getxbook.desktop create mode 100644 debian/menu create mode 100755 debian/rules create mode 100644 debian/source/format create mode 100644 debian/watch diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..d3f2ede --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +getxbook (1.0-1) unstable; urgency=low + + * Initial release + + -- Nick White Sun, 09 Sep 2012 10:38:58 +0100 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..7f8f011 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +7 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..3dfa875 --- /dev/null +++ b/debian/control @@ -0,0 +1,19 @@ +Source: getxbook +Section: net +Priority: optional +Maintainer: Nick White +Build-Depends: debhelper (>= 7.0.50~) +Standards-Version: 3.8.4 +Homepage: http://njw.me.uk/software/getxbook + +Package: getxbook +Architecture: any +Depends: tcl, tk +Description: A collection of tools to download books from websites. + getxbook is a collection of tools to download books from + Google Books' "Book Preview," Amazon's "Look Inside the + Book" and Barnes & Noble's "Book Viewer." + . + Each tool is written in around 200 lines of portable C code, + with no dependencies beyond libc and network sockets. There + is an optional graphical interface, using Tcl/Tk. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..9e268aa --- /dev/null +++ b/debian/copyright @@ -0,0 +1,10 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Source: http://njw.me.uk/software/getxbook + +Files: * +Copyright: 2011-2012 Nick White +License: ISC + Permission to use, copy, modify, and/or distribute this + software for any purpose with or without fee is hereby + granted, provided that the above copyright notice and this + permission notice appear in all copies. diff --git a/debian/getxbook.desktop b/debian/getxbook.desktop new file mode 100644 index 0000000..0abac21 --- /dev/null +++ b/debian/getxbook.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Terminal=false +Name=getxbook +Exec=getxbookgui +Categories=Network +Comment=Book downloader +Icon=getxbook diff --git a/debian/menu b/debian/menu new file mode 100644 index 0000000..560b267 --- /dev/null +++ b/debian/menu @@ -0,0 +1,4 @@ +?package(getxbook):needs="X11"\ + section="Applications/Network/File Transfer"\ + icon="/usr/share/pixmaps/getgbook.xpm"\ + title="getxbook" command="/usr/bin/getxbookgui" diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..c30cbf5 --- /dev/null +++ b/debian/rules @@ -0,0 +1,17 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +%: + dh $@ + +override_dh_auto_install: + $(MAKE) DESTDIR=$(CURDIR)/debian/getxbook PREFIX=/usr install + dh_install debian/getxbook.desktop usr/share/applications/ diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/watch b/debian/watch new file mode 100644 index 0000000..0b04ed0 --- /dev/null +++ b/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://njw.me.uk/software/getxbook getxbook-(.*)\.tar\.bz2 -- cgit v1.2.3 From 07c5ae6df24448559259de81eb8d0367553041a7 Mon Sep 17 00:00:00 2001 From: Nick White Date: Wed, 12 Sep 2012 00:44:48 +0100 Subject: First attempt to get debhelper-less thing working --- debian/compat | 1 - debian/rules | 27 +++++++++++++++++++++++++++ debian/source/format | 1 - 3 files changed, 27 insertions(+), 2 deletions(-) delete mode 100644 debian/compat delete mode 100644 debian/source/format diff --git a/debian/compat b/debian/compat deleted file mode 100644 index 7f8f011..0000000 --- a/debian/compat +++ /dev/null @@ -1 +0,0 @@ -7 diff --git a/debian/rules b/debian/rules index c30cbf5..18a0c50 100755 --- a/debian/rules +++ b/debian/rules @@ -1,4 +1,31 @@ #!/usr/bin/make -f + +package = getxbook +DESTDIR = debian/$(package) + +build: + $(MAKE) + +binary: binary-arch binary-indep + +binary-arch: build + +binary-indep: build + $(MAKE) DESTDIR=$(DESTDIR) PREFIX=/usr + mkdir -p $(DESTDIR)/share/applications + cp -f $(package).desktop $(DESTDIR)/usr/share/applications/ + mkdir -p $(DESTDIR)/usr/lib/menu + cp -f menu $(DESTDIR)/usr/lib/menu/$(package).menu + # TODO: gzip docs + # TODO: strip binaries + dpkg-deb -b $(DESTDIR) ../ + +clean: + make clean + rm -r debian/$(package) + +.PHONY: build binary binary-arch binary-indep clean + # -*- makefile -*- # Sample debian/rules that uses debhelper. # This file was originally written by Joey Hess and Craig Small. diff --git a/debian/source/format b/debian/source/format deleted file mode 100644 index 163aaf8..0000000 --- a/debian/source/format +++ /dev/null @@ -1 +0,0 @@ -3.0 (quilt) -- cgit v1.2.3 From 6d80eca2aba0b58fa5f985fd95b49b1662d29a79 Mon Sep 17 00:00:00 2001 From: Nick White Date: Wed, 12 Sep 2012 01:55:52 +0100 Subject: Get package much closer --- debian/control | 2 +- debian/menu | 2 +- debian/postinst | 3 +++ debian/postrm | 3 +++ debian/rules | 43 +++++++++++++++++-------------------------- debian/source/format | 1 + 6 files changed, 26 insertions(+), 28 deletions(-) create mode 100644 debian/postinst create mode 100644 debian/postrm create mode 100644 debian/source/format diff --git a/debian/control b/debian/control index 3dfa875..7f9418b 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: getxbook Section: net Priority: optional Maintainer: Nick White -Build-Depends: debhelper (>= 7.0.50~) +Build-Depends: Standards-Version: 3.8.4 Homepage: http://njw.me.uk/software/getxbook diff --git a/debian/menu b/debian/menu index 560b267..2f06818 100644 --- a/debian/menu +++ b/debian/menu @@ -1,4 +1,4 @@ ?package(getxbook):needs="X11"\ section="Applications/Network/File Transfer"\ - icon="/usr/share/pixmaps/getgbook.xpm"\ + icon="/usr/share/pixmaps/getxbook.xpm"\ title="getxbook" command="/usr/bin/getxbookgui" diff --git a/debian/postinst b/debian/postinst new file mode 100644 index 0000000..04346d0 --- /dev/null +++ b/debian/postinst @@ -0,0 +1,3 @@ +#!/bin/sh +test "$1" = "configure" && test -x /usr/bin/update-menus \ + && update-menus diff --git a/debian/postrm b/debian/postrm new file mode 100644 index 0000000..04346d0 --- /dev/null +++ b/debian/postrm @@ -0,0 +1,3 @@ +#!/bin/sh +test "$1" = "configure" && test -x /usr/bin/update-menus \ + && update-menus diff --git a/debian/rules b/debian/rules index 18a0c50..09f9f1d 100755 --- a/debian/rules +++ b/debian/rules @@ -9,36 +9,27 @@ build: binary: binary-arch binary-indep binary-arch: build + $(MAKE) DESTDIR=$(DESTDIR) PREFIX=/usr install + mkdir -p $(DESTDIR)/usr/share/applications + cp -f debian/$(package).desktop $(DESTDIR)/usr/share/applications/ + mkdir -p $(DESTDIR)/usr/share/menu + cp -f debian/menu $(DESTDIR)/usr/share/menu/$(package) + mkdir -p $(DESTDIR)/usr/share/doc/$(package) + cp -f debian/copyright debian/changelog $(DESTDIR)/usr/share/doc/$(package) + for i in getabook getbnbook getgbook; \ + do strip $(DESTDIR)/usr/bin/$$i; done + for i in getabook getbnbook getgbook getxbook getxbookgui; \ + do gzip -9 $(DESTDIR)/usr/share/man/man1/$$i.1; done + mkdir -p $(DESTDIR)/DEBIAN + cp -f debian/postinst debian/postrm $(DESTDIR)/DEBIAN/ + chmod 755 $(DESTDIR)/DEBIAN/post* + dpkg-gencontrol -P$(DESTDIR) + dpkg-deb -b $(DESTDIR) ../ binary-indep: build - $(MAKE) DESTDIR=$(DESTDIR) PREFIX=/usr - mkdir -p $(DESTDIR)/share/applications - cp -f $(package).desktop $(DESTDIR)/usr/share/applications/ - mkdir -p $(DESTDIR)/usr/lib/menu - cp -f menu $(DESTDIR)/usr/lib/menu/$(package).menu - # TODO: gzip docs - # TODO: strip binaries - dpkg-deb -b $(DESTDIR) ../ clean: make clean - rm -r debian/$(package) + rm -rf debian/$(package) .PHONY: build binary binary-arch binary-indep clean - -# -*- makefile -*- -# Sample debian/rules that uses debhelper. -# This file was originally written by Joey Hess and Craig Small. -# As a special exception, when this file is copied by dh-make into a -# dh-make output file, you may use that output file without restriction. -# This special exception was added by Craig Small in version 0.37 of dh-make. - -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - -%: - dh $@ - -override_dh_auto_install: - $(MAKE) DESTDIR=$(CURDIR)/debian/getxbook PREFIX=/usr install - dh_install debian/getxbook.desktop usr/share/applications/ diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) -- cgit v1.2.3 From bea67306d73bc7f18e131be2f1377076fd77e28f Mon Sep 17 00:00:00 2001 From: Nick White Date: Wed, 12 Sep 2012 14:07:05 +0100 Subject: Make lintian clean --- debian/control | 18 +++++++++--------- debian/postinst | 4 ++-- debian/postrm | 4 ++-- debian/rules | 8 ++++++-- 4 files changed, 19 insertions(+), 15 deletions(-) diff --git a/debian/control b/debian/control index 7f9418b..e6c988f 100644 --- a/debian/control +++ b/debian/control @@ -3,17 +3,17 @@ Section: net Priority: optional Maintainer: Nick White Build-Depends: -Standards-Version: 3.8.4 +Standards-Version: 3.9.1 Homepage: http://njw.me.uk/software/getxbook Package: getxbook Architecture: any -Depends: tcl, tk +Depends: ${shlibs:Depends}, tcl, tk Description: A collection of tools to download books from websites. - getxbook is a collection of tools to download books from - Google Books' "Book Preview," Amazon's "Look Inside the - Book" and Barnes & Noble's "Book Viewer." - . - Each tool is written in around 200 lines of portable C code, - with no dependencies beyond libc and network sockets. There - is an optional graphical interface, using Tcl/Tk. + getxbook is a collection of tools to download books from + Google Books' "Book Preview," Amazon's "Look Inside the + Book" and Barnes & Noble's "Book Viewer." + . + Each tool is written in around 200 lines of portable C code, + with no dependencies beyond libc and network sockets. There + is an optional graphical interface, using Tcl/Tk. diff --git a/debian/postinst b/debian/postinst index 04346d0..f5ccda3 100644 --- a/debian/postinst +++ b/debian/postinst @@ -1,3 +1,3 @@ #!/bin/sh -test "$1" = "configure" && test -x /usr/bin/update-menus \ - && update-menus +set -e +if test -x /usr/bin/update-menus; then update-menus; fi diff --git a/debian/postrm b/debian/postrm index 04346d0..f5ccda3 100644 --- a/debian/postrm +++ b/debian/postrm @@ -1,3 +1,3 @@ #!/bin/sh -test "$1" = "configure" && test -x /usr/bin/update-menus \ - && update-menus +set -e +if test -x /usr/bin/update-menus; then update-menus; fi diff --git a/debian/rules b/debian/rules index 09f9f1d..292ee7f 100755 --- a/debian/rules +++ b/debian/rules @@ -15,7 +15,9 @@ binary-arch: build mkdir -p $(DESTDIR)/usr/share/menu cp -f debian/menu $(DESTDIR)/usr/share/menu/$(package) mkdir -p $(DESTDIR)/usr/share/doc/$(package) - cp -f debian/copyright debian/changelog $(DESTDIR)/usr/share/doc/$(package) + cp -f debian/copyright $(DESTDIR)/usr/share/doc/$(package)/ + cp -f debian/changelog $(DESTDIR)/usr/share/doc/$(package)/changelog.Debian + gzip -9 $(DESTDIR)/usr/share/doc/$(package)/changelog.Debian for i in getabook getbnbook getgbook; \ do strip $(DESTDIR)/usr/bin/$$i; done for i in getabook getbnbook getgbook getxbook getxbookgui; \ @@ -23,6 +25,8 @@ binary-arch: build mkdir -p $(DESTDIR)/DEBIAN cp -f debian/postinst debian/postrm $(DESTDIR)/DEBIAN/ chmod 755 $(DESTDIR)/DEBIAN/post* + dpkg-shlibdeps $(DESTDIR)/usr/bin/getabook \ + $(DESTDIR)/usr/bin/getbnbook $(DESTDIR)/usr/bin/getgbook dpkg-gencontrol -P$(DESTDIR) dpkg-deb -b $(DESTDIR) ../ @@ -30,6 +34,6 @@ binary-indep: build clean: make clean - rm -rf debian/$(package) + rm -rf debian/$(package) debian/files debian/substvars .PHONY: build binary binary-arch binary-indep clean -- cgit v1.2.3