]> git.saurik.com Git - apt.git/blobdiff - debian/rules
the previously used VERSION didn't work everywhere so we are switching
[apt.git] / debian / rules
index 6a5c95d22c7c4286bb526d778f04dd8d7a09a185..00e6bd4b7e5aaa159285d4b4cd4b63375fdf8bc8 100755 (executable)
@@ -19,6 +19,8 @@ endif
 
 ifneq (,$(shell which dpkg-buildflags))
   export CXXFLAGS = $(shell dpkg-buildflags --get CXXFLAGS)
+  export LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS)
+  export CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS)
 else
   ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
     export CXXFLAGS = -O0 -g -Wall
@@ -33,7 +35,7 @@ build:
 PKG=apt
 DEB_BUILD_PROG:=debuild --preserve-envvar PATH --preserve-envvar CCACHE_DIR -us -uc $(DEB_BUILD_PROG_OPTS)
 APT_DEBVER=$(shell dpkg-parsechangelog |sed -n -e '/^Version:/s/^Version: //p' | sed -e 's/\+.*$$//')
-APT_CONFVER=$(shell sed -n -e 's/^AC_DEFINE_UNQUOTED(VERSION,"\(.*\)")/\1/p' configure.in)
+APT_CONFVER=$(shell sed -n -e 's/^AC_DEFINE_UNQUOTED(PACKAGE_VERSION,"\(.*\)")/\1/p' configure.in)
 APT_CVSTAG=$(shell echo "$(APT_DEBVER)" | sed -e 's/^/v/' -e 's/\./_/g')
 
 # Determine the build directory to use
@@ -92,7 +94,7 @@ build/configure-stamp: configure
        dh_testdir
        -mkdir build
        cp COPYING debian/copyright
-       cd build && CXXFLAGS="$(CXXFLAGS)" ../configure $(confflags)
+       cd build && CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" CPPFLAGS="$(CPPFLAGS)" ../configure $(confflags)
        touch $@
 
 build/build-stamp: build/configure-stamp
@@ -125,25 +127,8 @@ clean:
 debian/%.install: debian/%.install.in
        sed 's/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/g' $< > $@
 
-binary-indep: libapt-common apt-doc libapt-pkg-doc
+binary-indep: apt-doc libapt-pkg-doc
 # Build architecture-independent files here.
-libapt-common: build
-       dh_testdir -p$@
-       dh_testroot -p$@
-       dh_prep -p$@
-       dh_installdirs -p$@
-
-       dh_install -p$@ --sourcedir=$(BLD)
-       dh_installdocs -p$@
-       dh_installchangelogs -p$@
-       dh_strip -p$@
-       dh_compress -p$@
-       dh_fixperms -p$@
-       dh_installdeb -p$@
-       dh_gencontrol -p$@
-       dh_md5sums -p$@
-       dh_builddeb -p$@
-
 libapt-pkg-doc: build-doc
        dh_testdir -p$@
        dh_testroot -p$@