File: rules

package info (click to toggle)
drawxtl 5.5-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, jessie, jessie-kfreebsd, sid, stretch, wheezy
  • size: 8,084 kB
  • ctags: 2,371
  • sloc: cpp: 44,125; makefile: 162
file content (54 lines) | stat: -rwxr-xr-x 1,637 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
#!/usr/bin/make -f
# -*- makefile -*-

#export DH_VERBOSE=1

PACKAGE  := drawxtl

CPPFLAGS ?= $(shell dpkg-buildflags --get CPPFLAGS)
CXXFLAGS ?= -g -Wall
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CXXFLAGS += -O0
else
CXXFLAGS += -O2
endif
LDFLAGS  ?= $(shell dpkg-buildflags --get LDFLAGS) -Wl,-z,defs -Wl,--as-needed

STRIPPED_UVERSION := $(shell dpkg-parsechangelog | awk '/^Version/ { print $$2 }' | awk -F- '{print $$1}' | sed -e 's/\+dfsg.*$$//p' | sed 's/\.//g')

%:
	dh $@ --buildsystem=makefile --parallel

override_dh_auto_build:
	dh_auto_build -- -C source/DRAWxtl$(STRIPPED_UVERSION)/ \
	                 OS=Linux \
	                 prefix=/usr \
	                 includedir=/usr/include \
	                 libdir=/usr/lib/ \
	                 LINKFLTKGL="-lfltk_gl -lfltk -lgl2ps $(LDFLAGS)" \
	                 OPTIM="$(CPPFLAGS) $(CXXFLAGS) -Wunused -fno-exceptions"

override_dh_auto_clean:
	dh_auto_clean -- -C source/DRAWxtl$(STRIPPED_UVERSION)/

override_dh_auto_install:

override_dh_install:
	dh_install exe/DRAWxtl$(STRIPPED_UVERSION) usr/bin/

override_dh_installchangelogs:
	dh_installchangelogs docs/readme.txt

override_dh_installdocs:
	dh_installdocs docs/DRAWxtl$(STRIPPED_UVERSION).pdf

override_dh_installexamples:
	dh_installexamples examples/*

override_dh_link:
	dh_link usr/bin/DRAWxtl$(STRIPPED_UVERSION) usr/bin/drawxtl \
		usr/share/doc/drawxtl/DRAWxtl$(STRIPPED_UVERSION).pdf usr/share/doc/drawxtl/DRAWxtl.pdf \
	        usr/share/man/man1/drawxtl.1.gz usr/share/man/man1/DRAWxtl$(STRIPPED_UVERSION).1.gz

override_dh_compress:
	dh_compress -X*.gz -Ausr/share/doc/$(PACKAGE)/examples/*.*