File: rules

package info (click to toggle)
pkgconf 1.6.3-5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 2,396 kB
  • sloc: ansic: 6,293; sh: 5,526; makefile: 199; python: 132; perl: 33
file content (48 lines) | stat: -rwxr-xr-x 1,639 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#! /usr/bin/make -f

include /usr/share/dpkg/architecture.mk

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
   SET_PKG_CONFIG = PKG_CONFIG=$(DEB_HOST_GNU_TYPE)-pkg-config
   GCC = $(DEB_HOST_GNU_TYPE)-gcc
else
   GCC = gcc
endif

SYSTEM_LIBDIRS := $(shell for opt in '' $$($${CC-$(GCC)} -print-multi-lib | sed -n -e's/.*;@/-/p'); do \
     $(GCC) $$opt -print-search-dirs | sed -n -e's/^libraries: =//p' \
     | sed -e's/:/\n/g' | xargs -n1 readlink -f | grep -v 'gcc\|/[0-9.]\+$$'; \
    done | LC_ALL=C sort -u | tr '\n' : | sed 's/:$$//')

%:
	dh $@

override_dh_auto_configure:
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
	$(SET_PKG_CONFIG) dh_auto_configure -- --prefix=/usr \
		--mandir=\$${prefix}/share/man \
		--infodir=\$${prefix}/share/info \
		--with-pkg-config-dir=/usr/local/lib/$(DEB_HOST_MULTIARCH)/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig \
		--with-system-libdir=$(SYSTEM_LIBDIRS)

override_dh_auto_install:
	dh_auto_install
	chmod +x debian/pkg-config-crosswrapper debian/pkgconf-dpkghook
	rm debian/tmp/usr/lib/*/*.la
	echo $(DEB_HOST_MULTIARCH) > debian/pkgconf/usr/lib/pkgconf.multiarch

override_dh_installchangelogs:
	dh_installchangelogs NEWS

override_dh_auto_test:

.PHONY: override_dh_auto_configure override_dh_auto_install