summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Shadura <bugzilla@tut.by>2011-11-17 20:17:04 +0100
committerAndrew Shadura <bugzilla@tut.by>2011-11-17 20:17:04 +0100
commit376df37ad3c01b8b239b7b03a5d17728af159d30 (patch)
treea47d45f719904a4a2404fc9a9bb9b6dd801d46c7
parent9c3a2036b32120aa47c917779762954ea5ed8bcf (diff)
use straight dh
-rwxr-xr-xdebian/rules70
1 files changed, 6 insertions, 64 deletions
diff --git a/debian/rules b/debian/rules
index 11be2e8..0695e33 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,71 +1,13 @@
#!/usr/bin/make -f
-#export DH_VERBOSE=1
+export CFLAGS := $(shell dpkg-buildflags --get CFLAGS)
+export LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS) -Wl,--version-script=$(CURDIR)/debian/version-script
-include /usr/share/dpatch/dpatch.make
+%:
+ dh $@ --with=autotools-dev
-DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
-
-CFLAGS = -Wall -g
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
- CFLAGS += -O0
-else
- CFLAGS += -O2
-endif
-
-config.status: patch-stamp
- dh_testdir
-ifneq "$(wildcard /usr/share/misc/config.sub)" ""
- cp -f /usr/share/misc/config.sub config.sub
-endif
-ifneq "$(wildcard /usr/share/misc/config.guess)" ""
- cp -f /usr/share/misc/config.guess config.guess
-endif
- ./configure --host=$(DEB_HOST_GNU_TYPE) \
- --build=$(DEB_BUILD_GNU_TYPE) \
- --prefix=/usr \
- CFLAGS="$(CFLAGS)" \
- LDFLAGS="-Wl,-z,defs"
-
-build: build-stamp
-build-stamp: config.status
- dh_testdir
- $(MAKE)
- touch $@
-
-clean: unpatch
- dh_testdir
- dh_testroot
- rm -f build-stamp config.guess config.sub
+override_dh_clean:
[ ! -f buildsys.mk ] || $(MAKE) distclean
dh_clean
-install: build
- dh_testdir
- dh_testroot
- dh_clean -k
- dh_installdirs
- $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
-
-binary-indep: build install
-binary-arch: build install
- dh_testdir
- dh_testroot
- dh_installchangelogs
- dh_installdocs
- dh_installexamples
- dh_install --sourcedir=debian/tmp
- dh_link
- dh_strip --dbg-package=libmowgli2-dbg
- dh_compress -Xusr/share/doc/libmowgli-dev/examples
- dh_makeshlibs -V 'libmowgli2 (>= 0.7.0)'
- 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 install configure
+.PHONY: override_dh_clean