File: rules

package info (click to toggle)
tupi 0.2%2Bgit08-4
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye
  • size: 33,892 kB
  • sloc: cpp: 79,762; xml: 1,519; ruby: 1,029; sh: 123; makefile: 44
file content (64 lines) | stat: -rwxr-xr-x 1,996 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

export QT_SELECT=5
QM_FILES := $(patsubst %.ts, %.qm, $(wildcard src/shell/data/translations/*.ts))

%:
	dh $@

override_dh_auto_clean:
	$(RM) -v configure.tests/*/Makefile $(QM_FILES)
	dh_auto_clean

override_dh_auto_configure:
	# override qonf/defaults.rb
	ruby configure.rb \
            --without-debug \
            --prefix=/usr \
            --bindir=/usr/lib/tupi/bin \
            --libdir=/usr/lib/tupi \
            --sharedir=/usr/share/tupi \
            --includedir=/usr/include/tupi
	# force qmake-generated Makefiles to respect dpkg-provided flags and don't strip
	perl -0pi -e 's[(CXXFLAGS\s*=)][$$1 $$ENV{CFLAGS} $$ENV{CPPFLAGS}]; \
                      s[(LFLAGS\s*=)][$$1 $$ENV{LDFLAGS}]; \
                      s[(CFLAGS\s*=)][$$1 $$ENV{CFLAGS}]; \
                      s[(STRIP\s*=)\s*\w+][$$1 true];' \
                     $$(find . -name Makefile)

$(QM_FILES):
	# rebuild translations
	lupdate tupi.pro -locations none -silent -ts $(@:.qm=.ts)
	lrelease $(@:.qm=.ts)

override_dh_auto_build: $(QM_FILES)
	convert -monitor launcher/icons/tupi_32x32.png debian/tupi_32x32.xpm
	cd src/components/help/man && gzip -9 -c tupi.man > tupi.1.gz
	dh_auto_build

override_dh_fixperms:
	dh_fixperms
	if [ -d "$(CURDIR)/debian/tupi-data" ]; then \
            find $(CURDIR)/debian/tupi-data/usr/share/tupi/data/xml/ \
                -type f -executable -exec chmod -c a-x '{}' \;\
        ;fi

override_dh_install:
	dh_install
	# De-duplication (http://wiki.debian.org/dedup.debian.net):
	rdfind -outputname /dev/null -makesymlinks true debian/tupi-data
	symlinks -rsc debian/tupi-data

PDIR     := $(CURDIR)/debian/tupi
override_dh_shlibdeps:
	LD_LIBRARY_PATH="$(PDIR)/usr/lib/tupi:$(PDIR)/usr/lib/tupi/plugins:$(LD_LIBRARY_PATH)" dh_shlibdeps

override_dh_makeshlibs:
	dh_makeshlibs --noscripts

override_dh_strip:
	dh_strip --dbgsym-migration='tupi-dbg (<< 0.2+git07~)'