Priority: extra
Maintainer: Joachim Breitner <nomeata@debian.org>
Build-Depends:
- debhelper (>= 7),
+ debhelper (>= 8.1.3),
pkg-config,
libnl-dev,
-# Disable multilib until libnl supports it
-# gcc-multilib [sparc i386 kfreebsd-amd64 amd64 mips mipsel powerpc s390]
Standards-Version: 3.8.4
Homepage: http://www.joachim-breitner.de/projects#libnss-gw-name
VCS-Git: git://git.nomeata.de/libnss-gw-name.git
Package: libnss-gw-name
Architecture: linux-any
+Multi-Arch: same
Depends: ${shlibs:Depends}, ${misc:Depends}
-Suggests: ${alternatelibs:Suggests}
+Pre-Depends: ${misc:Pre-Depends}
Description: nss module that names the current gateway’s IP address
This Name Service Switch (NSS) module resolves the name “gateway.localhost” to
the IP of the current default gateways of the system. This allows easy access
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
-DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
+DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
CFLAGS = -Wall -g -Wextra -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith
ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
MAKEFLAGS += -j$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
endif
-ALSODO =
-# life would be to simple if there was something to work everywhere....
-ABIFLAG_32=-m32
-ABIFLAG_64=-m64
-# Disable until we have multilib support in libnl
-ifeq (dis,abled)
-# do not forget to update Build-depends when changing something here:
-ifeq ($(DEB_HOST_ARCH),sparc)
-ALSODO = 64
-else ifeq ($(DEB_HOST_ARCH),i386)
-ALSODO = 64
-else ifeq ($(DEB_HOST_ARCH),kfreebsd-amd64)
-ALSODO = 32
-else ifeq ($(DEB_HOST_ARCH),amd64)
-ALSODO = 32
-else ifeq ($(DEB_HOST_ARCH),mips)
-ABIFLAG_32=-mabi=n32
-ABIFLAG_64=-mabi=64
-ALSODO = 64 32
-else ifeq ($(DEB_HOST_ARCH),mipsel)
-ABIFLAG_32=-mabi=n32
-ABIFLAG_64=-mabi=64
-ALSODO = 64 32
-else ifeq ($(DEB_HOST_ARCH),powerpc)
-ALSODO = 64
-else ifeq ($(DEB_HOST_ARCH),s390)
-ALSODO = 64
-endif
-endif
-
-build-arch: build-arch-stamp $(foreach bits,$(ALSODO),build-arch-$(bits)-stamp)
+build-arch: build-arch-stamp
build-indep:
build: build-arch-stamp
-build-arch-%-stamp:
- $(MAKE) BITSOFS=$* CC="$(DEB_HOST_GNU_TYPE)-gcc" CFLAGS="$(ABIFLAG_$*) $(CFLAGS)"
- touch $@
-
build-arch-stamp:
dh_testdir
- $(MAKE) CC="$(DEB_HOST_GNU_TYPE)-gcc" CFLAGS="$(CFLAGS)"
+ $(MAKE) CFLAGS="$(CFLAGS)"
touch build-arch-stamp
clean:
dh_testroot
dh_prep
dh_installdirs
- $(MAKE) install DESTDIR=$(CURDIR)/debian/libnss-gw-name
- for also in $(ALSODO) ; do \
- $(MAKE) BITSOFS=$${also} install DESTDIR=$(CURDIR)/debian/libnss-gw-name ; \
- done
+ $(MAKE) install libprefix=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) DESTDIR=$(CURDIR)/debian/libnss-gw-name
dh_lintian
dh_installchangelogs
dh_installdocs
dh_link
dh_strip
- [ "$(ALSODO)" = "" ] || \
- dpkg-shlibdeps -Tdebian/libnss-gw-name.substvars \
- -palternatelibs -dSuggests \
- $(foreach bits,$(ALSODO), debian/libnss-gw-name/usr/lib$(bits)/$(LIBNAME))
- dh_shlibdeps $(foreach bits,$(ALSODO), -X/usr/lib$(bits)/$(LIBNAME))
+ dh_makeshlibs
+ dh_shlibdeps
dh_compress
dh_fixperms
dh_installdeb