File: rules

package info (click to toggle)
ukui-interface 1.0.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 2,700 kB
  • sloc: ansic: 19,281; cpp: 11,472; makefile: 468; xml: 270; sh: 4
file content (43 lines) | stat: -rwxr-xr-x 1,737 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
#!/usr/bin/make -f

#export DH_VERBOSE = 1
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
#export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
QT_INSTALL_DIR:=$(shell pwd)/debian/tmp/
LOG4QT_BUILD_DIR:=$(shell pwd)/src/log4qt/build

%:
	dh $@

override_dh_auto_clean:
	dh_auto_clean
	rm -fr $(LOG4QT_BUILD_DIR)

override_dh_install:
	mkdir -p $(QT_INSTALL_DIR) && \
	make install INSTALL_ROOT=$(QT_INSTALL_DIR) -C $(LOG4QT_BUILD_DIR)
	dh_install
	sed -i "/dependency_libs/ s/'.*'/''/" `find . -name '*.la'`

override_dh_auto_configure:
	./autogen.sh
	dh_auto_configure -- \
		--includedir=/usr/include/ukuisdk --bindir=/usr/libexec

override_dh_auto_build:
	dh_auto_build
	mkdir -p $(LOG4QT_BUILD_DIR)
	cd $(LOG4QT_BUILD_DIR) && qmake -makefile "QMAKE_CFLAGS_RELEASE=-g -O2 -fdebug-prefix-map=$(LOG4QT_BUILD_DIR)=. \
		-fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2" \
		"QMAKE_CFLAGS_DEBUG=-g -O2 -fdebug-prefix-map=$(LOG4QT_BUILD_DIR)=. -fstack-protector-strong \
		-Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2" \
		"QMAKE_CXXFLAGS_RELEASE=-g -O2 -fdebug-prefix-map=$(LOG4QT_BUILD_DIR)=. -fstack-protector-strong \
		-Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2" \
		"QMAKE_CXXFLAGS_DEBUG=-g -O2 -fdebug-prefix-map=$(LOG4QT_BUILD_DIR)=. \
		-fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2" \
		"QMAKE_LFLAGS_RELEASE=-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now" \
		"QMAKE_LFLAGS_DEBUG=-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now" QMAKE_STRIP=: PREFIX=/usr ..
	make -C $(LOG4QT_BUILD_DIR)