1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108
|
#!/usr/bin/make -f
#export DH_VERBOSE=1
include /usr/share/quilt/quilt.make
# These are used for cross-compiling and for saving the configure script
# from having to guess our platform (since we know it already)
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
REVISION := $(shell dpkg-parsechangelog | sed -ne 's/^Version: \(.*\)-.*/\1/p'| sed 's/+debian//')
ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
confflags += $(DEB_HOST_GNU_TYPE)
else
$(error Cannot cross-compile this package out-of-the-box)
endif
TOP=$(CURDIR)/debian/toshutils
CFLAGS=-Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
get-orig-source:
rm -rf get-orig-source toshutils_$(REVISION)+debian.orig.tar.gz
mkdir get-orig-source
wget -P get-orig-source http://www.buzzard.me.uk/toshiba/downloads/toshutils-$(REVISION).tar.gz
cd get-orig-source; tar -xzf toshutils-$(REVISION).tar.gz
mv get-orig-source/toshutils-$(REVISION) get-orig-source/toshutils-$(REVISION)+debian.orig
rm -r get-orig-source/toshutils-$(REVISION)+debian.orig/debian/
GZIP=--best tar czf toshutils_$(REVISION)+debian.orig.tar.gz -C get-orig-source toshutils-$(REVISION)+debian.orig
rm -rf get-orig-source
echo " "toshutils_$(REVISION)+debian.orig.tar.gz" created; move it to the right destination to build the package"
config.status: $(QUILT_STAMPFN)
dh_testdir
mv config.guess config.guess.upstream
cp /usr/share/misc/config.guess .
mv config.sub config.sub.upstream
cp /usr/share/misc/config.sub .
[ -f configure.upstream ] || cp configure configure.upstream
autoreconf
# Add here commands to configure the package.
CFLAGS="$(CFLAGS)" ./configure $(confflags) --prefix=/usr --mandir=/usr/share/man
build: build-stamp
build-stamp: config.status
dh_testdir
$(MAKE) depend
$(MAKE) all LDFLAGS='-Wl,--as-needed'
touch $@
clean: clean-patched unpatch
clean-patched:
dh_testdir
dh_testroot
if [ -e config.guess.upstream ] ; then mv config.guess.upstream config.guess ; fi
if [ -e config.sub.upstream ] ; then mv config.sub.upstream config.sub ; fi
if [ -e configure.upstream ] ; then mv configure.upstream configure ; fi
rm -f build-stamp
[ ! -f Makefile ] || $(MAKE) distclean
dh_clean src/Makefile aclocal.m4 Makefile
install: build
dh_testdir
dh_testroot
dh_prep
dh_installdirs usr/share/man/man1 usr/share/man/man8 usr/bin \
usr/share/pixmaps
cp pixmaps/fan*.xpm pixmaps/displayswitch.xpm pixmaps/tuxtime.xpm \
debian/toshutils/usr/share/pixmaps
$(MAKE) BINDESTDIR=$(TOP)/usr/bin MANDESTDIR=$(TOP)/usr/share/man install-doc install-prog
# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.
# Build architecture-dependent files that aren't kernel modules here.
binary-arch: build install
dh_testdir
dh_testroot
dh_installdocs README* TODO CONTRIBUTE FAQ src/fnfind
dh_installexamples
dh_installmenu
dh_installcron
dh_installinfo
dh_installchangelogs ChangeLog
dh_lintian
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
|