File: rules

package info (click to toggle)
libqt4pas 2.5-6
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 5,564 kB
  • sloc: cpp: 50,187; pascal: 12,592; makefile: 20; sh: 13
file content (35 lines) | stat: -rwxr-xr-x 1,443 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
#!/usr/bin/make -f
# -*- mode: makefile; coding: utf-8 -*-

#export DH_VERBOSE=1

export DEB_BUILD_HARDENING=1

# Define install target dir
INSTALLDIR = $(CURDIR)/debian/tmp

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

%:
	dh $@ --parallel

override_dh_auto_configure:
	dh_auto_configure -- QMAKE_CFLAGS_RELEASE="$(shell dpkg-buildflags --get CFLAGS) $(shell dpkg-buildflags --get CPPFLAGS)" \
			QMAKE_CFLAGS_DEBUG="$(shell dpkg-buildflags --get CFLAGS) $(shell dpkg-buildflags --get CPPFLAGS)" \
			QMAKE_CXXFLAGS_RELEASE="$(shell dpkg-buildflags --get CFLAGS) $(shell dpkg-buildflags --get CPPFLAGS)" \
			QMAKE_CXXFLAGS_DEBUG="$(shell dpkg-buildflags --get CFLAGS) $(shell dpkg-buildflags --get CPPFLAGS)" \
			QMAKE_LFLAGS_RELEASE="$(shell dpkg-buildflags --get LDFLAGS)" \
			QMAKE_LFLAGS_DEBUG="$(shell dpkg-buildflags --get LDFLAGS)"

override_dh_auto_install:
	# Install Pascal binding source & fix permissions
	mkdir -p $(INSTALLDIR)/usr/share/pascal/qt4
	install $(CURDIR)/qt4.pas $(INSTALLDIR)/usr/share/pascal/qt4/
	for type in pas p txt ; do find $(INSTALLDIR)/usr/share/ -type f -name "*$$type" -exec chmod -x '{}' \; ; done
	# Now install the lib
	dh_auto_install --destdir=$(INSTALLDIR)
	# If we don't have a multiarch-Qt, copy lib to multiarch path anyway
	$(CURDIR)/debian/fix-multiarch.sh TARGET=$(INSTALLDIR) HOST_MULTIARCH=$(DEB_HOST_MULTIARCH)

override_dh_install:
	dh_install --list-missing