|
@@ -1,36 +1,43 @@
|
|
|
#!/usr/bin/make -f
|
|
|
-# Sample debian/rules that uses debhelper.
|
|
|
-# GNU copyright 1997 to 1999 by Joey Hess.
|
|
|
-
|
|
|
# Uncomment this to turn on verbose mode.
|
|
|
#export DH_VERBOSE=1
|
|
|
|
|
|
-# 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)
|
|
|
-
|
|
|
+DEB_HOST_GNU_TYPE ?=$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
|
|
|
+DEB_BUILD_GNU_TYPE ?=$(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
|
|
|
|
|
|
-ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
|
|
|
- CFLAGS += -g
|
|
|
-endif
|
|
|
-ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
|
|
|
- INSTALL_PROGRAM += -s
|
|
|
+ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
|
|
|
+confflags= --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
|
|
|
+else
|
|
|
+confflags= --build $(DEB_BUILD_GNU_TYPE)
|
|
|
endif
|
|
|
|
|
|
-config.status: configure
|
|
|
+CFLAGS = `dpkg-buildflags --get CFLAGS`
|
|
|
+CFLAGS += -g -Wall
|
|
|
+CXXFLAGS = `dpkg-buildflags --get CXXFLAGS` -g -Wall
|
|
|
+LDFLAGS = `dpkg-buildflags --get LDFLAGS`
|
|
|
+CPPFLAGS = `dpkg-buildflags --get CPPFLAGS`
|
|
|
+
|
|
|
+configure-stamp:
|
|
|
dh_testdir
|
|
|
+ dh_autoreconf
|
|
|
# Add here commands to configure the package.
|
|
|
- ./configure --host=$(DEB_HOST_GNU_TYPE) \
|
|
|
+ CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) \
|
|
|
--build=$(DEB_BUILD_GNU_TYPE) \
|
|
|
--prefix=/usr \
|
|
|
+ --enable-debug \
|
|
|
+ --enable-dynamic-link \
|
|
|
--mandir=\$${prefix}/share/man \
|
|
|
--infodir=\$${prefix}/share/info
|
|
|
|
|
|
+ touch configure-stamp
|
|
|
|
|
|
-build: build-stamp
|
|
|
+build: build-arch build-indep
|
|
|
|
|
|
-build-stamp: config.status
|
|
|
+build-arch: build-stamp
|
|
|
+
|
|
|
+build-indep: build-stamp
|
|
|
+
|
|
|
+build-stamp: configure-stamp
|
|
|
dh_testdir
|
|
|
|
|
|
# Add here commands to compile the package.
|
|
@@ -42,15 +49,11 @@ build-stamp: config.status
|
|
|
clean:
|
|
|
dh_testdir
|
|
|
dh_testroot
|
|
|
- rm -f build-stamp
|
|
|
+ rm -f build-stamp configure-stamp
|
|
|
|
|
|
# Add here commands to clean up after the build process.
|
|
|
[ ! -f Makefile ] || $(MAKE) distclean
|
|
|
- -test -r /usr/share/misc/config.sub && \
|
|
|
- cp -f /usr/share/misc/config.sub config.sub
|
|
|
- -test -r /usr/share/misc/config.guess && \
|
|
|
- cp -f /usr/share/misc/config.guess config.guess
|
|
|
-
|
|
|
+ dh_autoreconf_clean
|
|
|
|
|
|
dh_clean
|
|
|
|
|
@@ -72,31 +75,20 @@ binary-indep: build install
|
|
|
binary-arch: build install
|
|
|
dh_testdir
|
|
|
dh_testroot
|
|
|
-# dh_installdebconf
|
|
|
dh_installdocs
|
|
|
-# dh_installexamples
|
|
|
-# dh_installmenu
|
|
|
-# dh_installlogrotate
|
|
|
-# dh_installemacsen
|
|
|
-# dh_installpam
|
|
|
-# dh_installmime
|
|
|
-# dh_installinit
|
|
|
dh_installcron
|
|
|
dh_installman
|
|
|
-# dh_installinfo
|
|
|
-# dh_undocumented
|
|
|
dh_installchangelogs docs/CHANGELOG
|
|
|
dh_link
|
|
|
dh_strip
|
|
|
dh_compress
|
|
|
dh_fixperms
|
|
|
-# dh_makeshlibs
|
|
|
dh_installdeb
|
|
|
-# dh_perl
|
|
|
dh_shlibdeps
|
|
|
dh_gencontrol
|
|
|
dh_md5sums
|
|
|
dh_builddeb
|
|
|
|
|
|
binary: binary-indep binary-arch
|
|
|
-.PHONY: build clean binary-indep binary-arch binary install
|
|
|
+.PHONY: build clean binary-indep binary-arch binary install configure
|
|
|
+
|