File: rules

package info (click to toggle)
pkgconf 0.9.7-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 660 kB
  • ctags: 354
  • sloc: ansic: 3,287; sh: 3,179; makefile: 82
file content (30 lines) | stat: -rwxr-xr-x 1,180 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
#! /usr/bin/make -f

DEB_HOST_MULTIARCH     := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

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 | sort -u | tr '\n' : | sed 's/:$$//')

%:
	dh $@ --with=autoreconf

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
	dh_auto_configure -- --prefix=/usr \
		--mandir=\$${prefix}/share/man \
		--infodir=\$${prefix}/share/info --disable-shared \
		--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

.PHONY: override_dh_auto_configure override_dh_auto_install