Rework to build by autoconf/automake and new Debian scripts
Building in local machine:
$ sh autogen.sh
$ ./configure
$ make
$ sudo make install
Building Debian package:
$ debuild -uc -us -b
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
Change-Id: I76faa07c1586658d053a3e260ea231a19392f792
This commit is contained in:
38
debian/rules
vendored
Normal file → Executable file
38
debian/rules
vendored
Normal file → Executable file
@@ -1,40 +1,6 @@
|
||||
#!/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
|
||||
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
|
||||
|
||||
%:
|
||||
dh $@
|
||||
dh $@ --with autoreconf
|
||||
|
||||
Reference in New Issue
Block a user