From 74447d63892e37b8c69b5456de3836b745552ed0 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 1 Dec 2014 16:00:47 -0800 Subject: Add Ubuntu packaging instructions These files knowingly (one might say, intentionally) violate the spirit and letter of the Debian / Ubuntu packaging rules. They are intended to be able to create our own packages that include their own libdivecomputer, libgit2 and (later) libmarble. Especially for daily builds this is WAY easier than fighting with whatever may be the current version of these packages in Ubuntu (especially since this allows us to use our private libdivecomputer branch). This assumes that the user runs the make-package.sh script from a directory below which we have subsurface/ <- Subsurface checked out git tree subsurface/libdivecomputer <- desired libdivecomputer sources subsurface/libgit2 <- desired libgit2 source Signed-off-by: Dirk Hohndel --- packaging/ubuntu/changelog.txt | 3 +++ packaging/ubuntu/control | 42 +++++++++++++++++++++++++++++++ packaging/ubuntu/copyright | 32 +++++++++++++++++++++++ packaging/ubuntu/make-package.sh | 36 ++++++++++++++++++++++++++ packaging/ubuntu/rules | 31 +++++++++++++++++++++++ packaging/ubuntu/source.lintian-overrides | 8 ++++++ 6 files changed, 152 insertions(+) create mode 100644 packaging/ubuntu/changelog.txt create mode 100644 packaging/ubuntu/control create mode 100644 packaging/ubuntu/copyright create mode 100644 packaging/ubuntu/make-package.sh create mode 100755 packaging/ubuntu/rules create mode 100644 packaging/ubuntu/source.lintian-overrides diff --git a/packaging/ubuntu/changelog.txt b/packaging/ubuntu/changelog.txt new file mode 100644 index 000000000..e1fb94cb0 --- /dev/null +++ b/packaging/ubuntu/changelog.txt @@ -0,0 +1,3 @@ + + * Daily build - check git revision for full changelog + diff --git a/packaging/ubuntu/control b/packaging/ubuntu/control new file mode 100644 index 000000000..0a953e5d9 --- /dev/null +++ b/packaging/ubuntu/control @@ -0,0 +1,42 @@ +Source: subsurface-4.2.90 +Section: utils +Priority: optional +Maintainer: Dirk Hohndel +Build-Depends: asciidoc, + debhelper (>= 9), + libqt4-dev, + libqtwebkit-dev, + libgconf2-dev, + libtool, + libxml2-dev, + libxslt-dev, + libsoup2.4-dev, + pkg-config, + txt2html, + libzip-dev, + libsqlite3-dev, + libmarble-dev, + autoconf, + automake, + cmake, + dpkg-dev (>= 1.16.1.1), + libusb-dev, + dh-autoreconf, + libz-dev, + libssl-dev, + git +# libgit2-dev, +Standards-Version: 3.9.5 +Homepage: http://subsurface-divelog.hohndel.org +#Vcs-Git: git://git.debian.org/collab-maint/subsurface-4.2.90.git +#Vcs-Browser: http://git.debian.org/?p=collab-maint/subsurface-4.2.90.git;a=summary + +Package: subsurface-4.2.90 +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Dive log program + Subsurface is an open source divelog program that runs on Windows, Mac and Linux. + Subsurface is able to track single- and multi-tank dives using air, Nitrox or + TriMix. It also allows logging of weights and exposure protection used, dive + masters and dive buddies and enables the user to rate dives and provide + additional dive notes. diff --git a/packaging/ubuntu/copyright b/packaging/ubuntu/copyright new file mode 100644 index 000000000..75e69b368 --- /dev/null +++ b/packaging/ubuntu/copyright @@ -0,0 +1,32 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: subsurface-4.2.90 +Source: + +Files: * +Copyright: 2011-2014 Dirk Hohndel, Linus Torvalds, Tomaz Canabrava and others +License: GPL-2.0 + +Files: debian/* +Copyright: 2014 Dirk Hohndel +License: GPL-2.0 + +License: GPL-2.0 + This package is free software; you can redistribute it and/or modify + it under the terms of version 2 of the GNU General Public License as published + by the Free Software Foundation + . + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License + along with this program. If not, see + . + On Debian systems, the complete text of the GNU General + Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". + +# Please also look if there are files or directories which have a +# different copyright/license attached and list them here. +# Please avoid to pick license terms that are more restrictive than the +# packaged work, as it may make Debian's contributions unacceptable upstream. diff --git a/packaging/ubuntu/make-package.sh b/packaging/ubuntu/make-package.sh new file mode 100644 index 000000000..994b00b4b --- /dev/null +++ b/packaging/ubuntu/make-package.sh @@ -0,0 +1,36 @@ +#!/bin/bash +# start from the directory above the combined subsurface & subsurface/libdivecomputer directory +VERSION=$(cd subsurface ; git describe | sed -e 's/-g.*$// ; s/^v//') +echo "building Subsurface" $VERSION +if [[ -d subsurface-$VERSION ]]; then + rm -rf subsurface-$VERSION.bak.prev + mv subsurface-$VERSION.bak subsurface-$VERSION.bak.prev + mv subsurface-$VERSION subsurface-$VERSION.bak +fi +mkdir subsurface-$VERSION +(cd subsurface ; tar cf - . .git ) | (cd subsurface-$VERSION ; tar xf - ) +cd subsurface-$VERSION +dh_make --email dirk@hohndel.org -c gpl2 --createorig --single --yes +rm debian/*.ex debian/*.EX debian/README.* +cp ../subsurface/packaging/ubuntu/control debian/control +cp ../subsurface/packaging/ubuntu/copyright debian/copyright +cp ../subsurface/packaging/ubuntu/rules debian/rules +cp ../subsurface/packaging/ubuntu/source.lintian-overrides debian/source.lintian-overrides +# do something clever with changelog +mv debian/changelog debian/autocl +head -1 debian/autocl | sed -e 's/unstable/trusty/' > debian/changelog +cat ../subsurface/packaging/ubuntu/changelog.txt >> debian/changelog +tail -1 debian/autocl >> debian/changelog +rm -f debian/autocl + +debuild -S + + + + +exit +cd subsurface-$VERSION/libdivecomputer +autoreconf --install +./configure +make + diff --git a/packaging/ubuntu/rules b/packaging/ubuntu/rules new file mode 100755 index 000000000..bc5831655 --- /dev/null +++ b/packaging/ubuntu/rules @@ -0,0 +1,31 @@ +#!/usr/bin/make -f +# -*- makefile -*- + +# Uncomment this to turn on verbose mode. +export DH_VERBOSE=1 + + +%: + dh $@ + +override_dh_auto_clean: + (cd libdivecomputer ; make clean || true) + make clean || true + rm -rf libgit2/build + rm -f ssrf-version.h + rm -f subsurface + rm -f Makefile + +override_dh_auto_configure: + (cd libdivecomputer ; autoreconf --install ; ./configure ; make) + (mkdir libgit2/build ; cd libgit2/build ; cmake .. ; make ) + qmake LIBDCDEVEL=./libdivecomputer LIBGIT2DEVEL=./libgit2 subsurface.pro + +override_dh_installchangelogs: + dh_installchangelogs + dh_installchangelogs ReleaseNotes.txt + txt2html Documentation/user-manual.txt > Documentation/user-manual.html + mkdir -p debian/subsurface/usr/share/doc/subsurface + cp Documentation/user-manual.txt debian/subsurface/usr/share/doc/subsurface/ + cp Documentation/user-manual.html debian/subsurface/usr/share/doc/subsurface/html + diff --git a/packaging/ubuntu/source.lintian-overrides b/packaging/ubuntu/source.lintian-overrides new file mode 100644 index 000000000..a2065afeb --- /dev/null +++ b/packaging/ubuntu/source.lintian-overrides @@ -0,0 +1,8 @@ +# We use the package +subsurface source: source-is-missing theme/jqplot.canvasAxisTickRenderer.min.js +subsurface source: source-is-missing theme/jqplot.canvasTextRenderer.min.js +subsurface source: source-is-missing theme/jqplot.highlighter.min.js +subsurface source: source-is-missing theme/jquery.jqplot.min.js +subsurface source: source-is-missing theme/jquery.min.js + + -- cgit v1.2.3-70-g09d2