File: rules

package info (click to toggle)
pkg-config 0.26-1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 1,784 kB
  • sloc: sh: 11,126; ansic: 3,897; makefile: 75
file content (23 lines) | stat: -rwxr-xr-x 956 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
#! /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 $@

override_dh_auto_configure:
	./configure --prefix=/usr \
		--with-installed-popt \
		--mandir=\$${prefix}/share/man \
		--infodir=\$${prefix}/share/info --disable-shared \
		--with-pc-path=/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-library-path=$(SYSTEM_LIBDIRS)

override_dh_auto_clean:
	[ ! -f Makefile ] || $(MAKE) distclean DIST_SUBDIRS="popt check"
	chmod +x debian/pkg-config-crosswrapper