Gordons Projects

--> Projects Top-Level GIT

Introduce a proper Debian source package build system
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 12 Sep 2015 17:13:42 +0000 (17:13 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 12 Sep 2015 19:38:21 +0000 (20:38 +0100)
It's not perfect - there is no symbol versioning, and I have had to
make some (perhaps false) assumptions about library ABI stability, but
it does produce something vaguely resembling what would be expected
from a library package found in Debian, and it does so using the
standard Debian source format.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
12 files changed:
debian/.gitignore [new file with mode: 0644]
debian/changelog [new file with mode: 0644]
debian/compat [new file with mode: 0644]
debian/control [new file with mode: 0644]
debian/copyright [new file with mode: 0644]
debian/libwiringpi-dev.dirs [new file with mode: 0644]
debian/libwiringpi-dev.install [new file with mode: 0644]
debian/libwiringpi2.install [new file with mode: 0644]
debian/libwiringpi2.shlibs [new file with mode: 0644]
debian/rules [new file with mode: 0755]
debian/wiringpi.dirs [new file with mode: 0644]
debian/wiringpi.install [new file with mode: 0644]

diff --git a/debian/.gitignore b/debian/.gitignore
new file mode 100644 (file)
index 0000000..6296064
--- /dev/null
@@ -0,0 +1,9 @@
+*.debhelper.log
+*.substvars
+tmp
+wiringpi
+libwiringpi2
+libwiringpi-dev
+files
+*.postinst.debhelper
+*.postrm.debhelper
diff --git a/debian/changelog b/debian/changelog
new file mode 100644 (file)
index 0000000..7f04ad5
--- /dev/null
@@ -0,0 +1,6 @@
+wiringpi (2.26~iwj) rpi-unstable; urgency=low
+
+  * Initial version with real Debian source package build.
+
+ -- Ian Jackson <ijackson@chiark.greenend.org.uk>  Sat, 12 Sep 2015 18:31:35 +0100
+
diff --git a/debian/compat b/debian/compat
new file mode 100644 (file)
index 0000000..45a4fb7
--- /dev/null
@@ -0,0 +1 @@
+8
diff --git a/debian/control b/debian/control
new file mode 100644 (file)
index 0000000..1d6d228
--- /dev/null
@@ -0,0 +1,29 @@
+Source: wiringpi
+Section: electronics
+Priority: optional
+Maintainer: Ian Jackson <ijackson@chiark.greenend.org.uk>
+Standards-Version: 3.8.0
+Homepage: http://wiringpi.com/
+Build-Depends: debhelper (>= 8)
+
+Package: libwiringpi2
+Section: libs
+Architecture: armhf
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: GPIO librariees for Raspberry Pi (runtime).
+ Runtime for the popular wiringPi library.
+
+Package: wiringpi
+Architecture: armhf
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: gpio utility for Raspberry Pi
+ The wiringPi gpio command line utility, for GPIO access on a
+ Raspberry Pi from the command line.
+
+Package: libwiringpi-dev
+Architecture: armhf
+Depends: libwiringpi2 (= ${binary:Version}), libc6-dev, ${misc:Depends}
+Suggests: wiringpi
+Description: GPIO development library for Raspberry Pi
+ Development libraries to allow GPIO access on a Raspberry Pi from C
+ and C++ programs.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644 (file)
index 0000000..de82701
--- /dev/null
@@ -0,0 +1,15 @@
+wiringPi is Copyright (C) 2012-2015 Gordon Henderson.
+
+wiringPi is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License, as published
+by the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+wiringPi 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 Lesser General Public License for more details.
+
+On all Debian and Raspbian systems, a copy of the GNU Lesser General
+Public License version 3 can be found in
+`/usr/share/common-licenses/LGPL-3'.
diff --git a/debian/libwiringpi-dev.dirs b/debian/libwiringpi-dev.dirs
new file mode 100644 (file)
index 0000000..4418816
--- /dev/null
@@ -0,0 +1,2 @@
+usr/lib
+usr/include
diff --git a/debian/libwiringpi-dev.install b/debian/libwiringpi-dev.install
new file mode 100644 (file)
index 0000000..d7ea901
--- /dev/null
@@ -0,0 +1,3 @@
+debian/tmp/usr/include
+debian/tmp/usr/lib/*.so
+examples               usr/share/doc/libwiringpi-dev
diff --git a/debian/libwiringpi2.install b/debian/libwiringpi2.install
new file mode 100644 (file)
index 0000000..c45ebcf
--- /dev/null
@@ -0,0 +1 @@
+debian/tmp/usr/lib/lib*.so.*
diff --git a/debian/libwiringpi2.shlibs b/debian/libwiringpi2.shlibs
new file mode 100644 (file)
index 0000000..0be8db1
--- /dev/null
@@ -0,0 +1,2 @@
+libwiringPi 2 libwiringpi2
+libwiringPiDev 2 libwiringpi2
diff --git a/debian/rules b/debian/rules
new file mode 100755 (executable)
index 0000000..423a473
--- /dev/null
@@ -0,0 +1,49 @@
+#!/usr/bin/make -f
+
+.PHONY: build
+
+VERSION:=$(shell cat VERSION)
+export VERSION
+
+soname:=$(shell echo $${VERSION%%.*})
+WIRINGPI_SONAME_SUFFIX:=.$(soname)
+export soname
+export WIRINGPI_SONAME_SUFFIX
+
+build:
+       dh $@
+
+override_dh_auto_configure:
+
+override_dh_prep:
+       dh_prep -Xdebian/tmp
+
+dirs:
+       dh_installdirs -A
+       mkdir debian/tmp
+       set -e; for p in `dh_listpackages`; do \
+               (cd debian/$$p; find -type d) | \
+               (cd debian/tmp; xargs mkdir -p) \
+       done
+
+override_dh_clean:
+       dh_clean
+       WIRINGPI_SUDO= bash -xe ./build clean
+
+override_dh_auto_build: dirs
+       V=1 LDCONFIG=: WIRINGPI_SUDO= WIRINGPI_SUID=0 \
+           DESTDIR=`pwd`/debian/tmp/usr \
+           PREFIX= WIRINGPI_SUDO= \
+           bash -xe ./build
+
+override_dh_auto_install:
+       dh_install
+       set -ex; for l in libwiringPi libwiringPiDev; do \
+               ln -sf $$l.so.$${VERSION} \
+                       debian/libwiringpi$$soname/usr/lib/$$l.so.$$soname; \
+               ln -sf $$l.so.$${VERSION} \
+                       debian/libwiringpi-dev/usr/lib/$$l.so; \
+       done
+
+%:
+       dh $@
diff --git a/debian/wiringpi.dirs b/debian/wiringpi.dirs
new file mode 100644 (file)
index 0000000..e772481
--- /dev/null
@@ -0,0 +1 @@
+usr/bin
diff --git a/debian/wiringpi.install b/debian/wiringpi.install
new file mode 100644 (file)
index 0000000..41ae22d
--- /dev/null
@@ -0,0 +1,4 @@
+debian/tmp/usr/bin
+debian/tmp/usr/man     usr/share
+README.TXT             usr/share/doc/wiringpi
+People                 usr/share/doc/wiringpi