File: rules

package info (click to toggle)
qtchooser 66-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 260 kB
  • sloc: cpp: 900; makefile: 167; sh: 82
file content (38 lines) | stat: -rwxr-xr-x 1,546 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
#!/usr/bin/make -f

export DEB_CXXFLAGS_MAINT_APPEND := $(shell DEB_BUILD_MAINT_OPTIONS=future=+lfs dpkg-buildflags --get CPPFLAGS)
export LFLAGS := $(shell dpkg-buildflags --get LDFLAGS)

include /usr/share/dpkg/architecture.mk
ifeq ($(origin CXX),default)
	CXX = $(DEB_HOST_GNU_TYPE)-g++
endif

%:
	dh $@

override_dh_auto_build:
	make QTCHOOSER_GLOBAL_DIR=/usr/share:/usr/lib/$(DEB_HOST_MULTIARCH):/usr/lib/$(DEB_HOST_MULTIARCH)/qt-default CXX=$(CXX)

override_dh_auto_install:
	make install INSTALL_ROOT=$(CURDIR)/debian/qtchooser

	mkdir -p $(CURDIR)/debian/qtchooser/usr/share/qtchooser
	mkdir -p $(CURDIR)/debian/qtchooser/usr/lib/$(DEB_HOST_MULTIARCH)/qtchooser

	echo "/usr/lib/$(DEB_HOST_MULTIARCH)/qt4/bin" > $(CURDIR)/debian/qtchooser/usr/share/qtchooser/qt4-$(DEB_HOST_MULTIARCH).conf
	echo "/usr/lib/qt5/bin" > $(CURDIR)/debian/qtchooser/usr/share/qtchooser/qt5-$(DEB_HOST_MULTIARCH).conf
	for ver in 4 5; do \
		echo "/usr/lib/$(DEB_HOST_MULTIARCH)" >> $(CURDIR)/debian/qtchooser/usr/share/qtchooser/qt$${ver}-$(DEB_HOST_MULTIARCH).conf; \
		ln -s /usr/share/qtchooser/qt$${ver}-$(DEB_HOST_MULTIARCH).conf \
			$(CURDIR)/debian/qtchooser/usr/lib/$(DEB_HOST_MULTIARCH)/qtchooser/$${ver}.conf; \
		ln -s /usr/share/qtchooser/qt$${ver}-$(DEB_HOST_MULTIARCH).conf \
			$(CURDIR)/debian/qtchooser/usr/lib/$(DEB_HOST_MULTIARCH)/qtchooser/qt$${ver}.conf; \
	done

override_dh_auto_test:
ifeq (,$(filter stage1,$(DEB_BUILD_PROFILES)))
ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
	make check QMAKE=/usr/lib/qt5/bin/qmake
endif
endif