| 1 |
#!/usr/bin/make -f
|
| 2 |
# GNU copyright 2004 by Petter Reinholdtsen
|
| 3 |
|
| 4 |
# This is the debhelper compatibility version to use.
|
| 5 |
export DH_COMPAT=3
|
| 6 |
|
| 7 |
include /usr/share/dpatch/dpatch.make
|
| 8 |
|
| 9 |
TARBALL_VERSION = 2.4.1
|
| 10 |
|
| 11 |
DEB_TARBALL = sql-ledger-$(TARBALL_VERSION).tar.gz
|
| 12 |
|
| 13 |
build-tree = $(CURDIR)/BUILD
|
| 14 |
|
| 15 |
unpack: unpack-stamp
|
| 16 |
unpack-stamp: $(DEB_TARBALL)
|
| 17 |
touch unpack-stamp
|
| 18 |
|
| 19 |
$(DEB_TARBALL): $(DEB_TARBALL)-stamp
|
| 20 |
$(DEB_TARBALL)-stamp:
|
| 21 |
mkdir -p $(build-tree)
|
| 22 |
cd $(build-tree) && tar -zxf $(CURDIR)/$(DEB_TARBALL)
|
| 23 |
touch $@
|
| 24 |
|
| 25 |
configure: configure-stamp
|
| 26 |
configure-stamp: unpack patch-stamp
|
| 27 |
dh_testdir
|
| 28 |
# Add here commands to configure the package.
|
| 29 |
|
| 30 |
touch configure-stamp
|
| 31 |
|
| 32 |
build: build-stamp
|
| 33 |
|
| 34 |
build-stamp: configure-stamp
|
| 35 |
dh_testdir
|
| 36 |
|
| 37 |
# Add here commands to compile the package.
|
| 38 |
$(MAKE) -C $(build-tree)/sql-ledger
|
| 39 |
#/usr/bin/docbook-to-man debian/sql-ledger.sgml > sql-ledger.1
|
| 40 |
|
| 41 |
touch build-stamp
|
| 42 |
|
| 43 |
clean: unpatch
|
| 44 |
dh_testdir
|
| 45 |
dh_testroot
|
| 46 |
rm -f build-stamp configure-stamp unpack-stamp $(DEB_TARBALL)-stamp
|
| 47 |
rm -rf $(build-tree)
|
| 48 |
|
| 49 |
# Add here commands to clean up after the build process.
|
| 50 |
#-$(MAKE) -C $(build-tree)/sql-ledger clean
|
| 51 |
|
| 52 |
dh_clean
|
| 53 |
|
| 54 |
install: build
|
| 55 |
dh_testdir
|
| 56 |
dh_testroot
|
| 57 |
dh_clean -k
|
| 58 |
dh_installdirs
|
| 59 |
|
| 60 |
# Add here commands to install the package into debian/sql-ledger.
|
| 61 |
$(MAKE) -C $(build-tree)/sql-ledger install DESTDIR=$(CURDIR)/debian/sql-ledger
|
| 62 |
|
| 63 |
|
| 64 |
# Build architecture-independent files here.
|
| 65 |
binary-indep: build install
|
| 66 |
# We have nothing to do by default.
|
| 67 |
|
| 68 |
# Build architecture-dependent files here.
|
| 69 |
binary-arch: build install
|
| 70 |
dh_testdir
|
| 71 |
dh_testroot
|
| 72 |
# dh_installdebconf
|
| 73 |
dh_installdocs
|
| 74 |
dh_installexamples
|
| 75 |
dh_installmenu
|
| 76 |
# dh_installlogrotate
|
| 77 |
# dh_installinit
|
| 78 |
dh_installcron
|
| 79 |
dh_installman
|
| 80 |
dh_installinfo
|
| 81 |
dh_installchangelogs
|
| 82 |
dh_link
|
| 83 |
dh_strip
|
| 84 |
dh_compress
|
| 85 |
dh_fixperms
|
| 86 |
dh_installdeb
|
| 87 |
dh_perl
|
| 88 |
dh_shlibdeps
|
| 89 |
dh_gencontrol
|
| 90 |
dh_md5sums
|
| 91 |
dh_builddeb
|
| 92 |
|
| 93 |
binary: binary-indep binary-arch
|
| 94 |
|
| 95 |
# Generate new copyright file with the copyright info for each
|
| 96 |
# translation as well as the package itself.
|
| 97 |
debian/copyright: unpack patch-stamp
|
| 98 |
cat debian/copyright.pre > debian/copyright
|
| 99 |
set -e ; \
|
| 100 |
for file in $(build-tree)/sql-ledger/locale/*/COPYING ; do \
|
| 101 |
HEAD=$$(grep -n '# This program is free software' $$file |cut -f1 -d:); \
|
| 102 |
HEAD=`expr $$HEAD - 1`; \
|
| 103 |
head -$$HEAD $$file | tail +4 ; \
|
| 104 |
done | grep -v '^#$$' | sed -e 's/^# //' >> debian/copyright
|
| 105 |
cat debian/copyright.post >> debian/copyright
|
| 106 |
|
| 107 |
.PHONY: build clean binary-indep binary-arch binary install configure
|