Hello, I tried this form on top of the new debian upload.
I'm not sure what is preferred, since this is a debian native package. I thought about only changing d/rules, but then I would break CPPFLAGS because the one provided by dpkg-buildflags would not have the MAJOR_VER and MINOR_VER defines. I ended up with the below, which I think would still work as originally planned if you just run "make", but also inherit the flags set by d/rules when building a package. Please let me know what you think. I haven't run the new DEP8 test yet. Once the builds are published in my ppa[1], I'll trigger the autopkgtests. 1. https://launchpad.net/~ahasenack/+archive/ubuntu/authbind/+packages
diff --git a/Makefile b/Makefile index bb2b7a0..7d399f7 100644 --- a/Makefile +++ b/Makefile @@ -36,16 +36,11 @@ INSTALL_DIR ?= install -o root -g root -m 755 -d STRIP ?= strip OPTIMISE= -O2 -LDFLAGS= -g +LDFLAGS ?= -g LIBS= -ldl -lc -CFLAGS= -g $(OPTIMISE) \ +CFLAGS ?= -g $(OPTIMISE) \ -Wall -Wwrite-strings -Wpointer-arith -Wimplicit \ -Wnested-externs -Wmissing-prototypes -Wstrict-prototypes -CPPFLAGS= -DMAJOR_VER='"$(MAJOR)"' -DMINOR_VER='"$(MINOR)"' \ - -DLIBAUTHBIND='"$(lib_dir)/$(LIBCANON)"' \ - -DHELPER='"$(libexec_dir)/$(HELPER)"' -DCONFIGDIR='"$(etc_dir)"' \ - -D_GNU_SOURCE - MAJOR=1 MINOR=0 LIBCANON= libauthbind.so.$(MAJOR) @@ -57,6 +52,11 @@ TARGETS= $(BINTARGETS) $(HELPER) $(LIBTARGET) MANPAGES_1= authbind.1 MANPAGES_8= authbind-helper.8 +CPPFLAGS := $(CPPFLAGS) -DMAJOR_VER='"$(MAJOR)"' -DMINOR_VER='"$(MINOR)"' \ + -DLIBAUTHBIND='"$(lib_dir)/$(LIBCANON)"' \ + -DHELPER='"$(libexec_dir)/$(HELPER)"' -DCONFIGDIR='"$(etc_dir)"' \ + -D_GNU_SOURCE + all: $(TARGETS) install: $(TARGETS) diff --git a/debian/rules b/debian/rules index 4555376..5ec4e5d 100755 --- a/debian/rules +++ b/debian/rules @@ -36,6 +36,8 @@ export INSTALL_SCRIPT export INSTALL_DIR export STRIP +DPKG_EXPORT_BUILDFLAGS = 1 +include /usr/share/dpkg/buildflags.mk %: dh $@