File: rules

package info (click to toggle)
xmakemol 5.16-9
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 2,184 kB
  • ctags: 1,757
  • sloc: ansic: 19,092; sh: 2,977; perl: 98; makefile: 97
file content (56 lines) | stat: -rwxr-xr-x 1,861 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/make -f

#export DH_VERBOSE=1

COMMON_OPTIONS = --srcdir=.. --program-transform-name='s/\.pl//'
COMMON_OPTIONS_normal = --with-mesa --without-opengl
COMMON_OPTIONS_opengl = --without-mesa

export CPPFLAGS ?= $(shell dpkg-buildflags --get CPPFLAGS)
export CFLAGS   ?= $(shell dpkg-buildflags --get CFLAGS)
export CXXFLAGS ?= $(shell dpkg-buildflags --get CXXFLAGS)
export LDFLAGS  ?= $(shell dpkg-buildflags --get LDFLAGS) -Wl,-z,defs -Wl,--as-needed

%:
	dh $@ --with autotools_dev --parallel

override_dh_auto_configure: normal/config.status opengl/config.status

%/config.status: configure
	dh_testdir
	mkdir $(@D)
	dh_auto_configure --builddirectory=$(@D) -- $(COMMON_OPTIONS) \
	    $(if $(findstring $(@D),opengl),$(COMMON_OPTIONS_opengl),$(COMMON_OPTIONS_normal)) \
	    LDFLAGS="$(LDFLAGS)"

override_dh_auto_build:
	dh_auto_build --builddirectory=normal
	dh_auto_build --builddirectory=opengl

override_dh_auto_install:
	dh_auto_install --builddirectory=normal -- DESTDIR=$(CURDIR)/debian/xmakemol
	dh_auto_install --builddirectory=opengl -- DESTDIR=$(CURDIR)/debian/xmakemol-gl
	# When upstream adds the xmake_anim.pl.1 manpage to the man_MANS variable
	# we can remove the following steps - the --program-transform-name
	# configure option will do everything for us.
	install xmake_anim.pl.1 $(CURDIR)/debian/xmakemol/usr/share/man/man1/xmake_anim.1
	install xmake_anim.pl.1 $(CURDIR)/debian/xmakemol-gl/usr/share/man/man1/xmake_anim.1

override_dh_auto_clean:
	dh_auto_clean
	$(RM) -r normal/ opengl/

override_dh_clean:
	dh_clean config.h

override_dh_installchangelogs:
	dh_installchangelogs -A NEWS

override_dh_installdocs:
	dh_installdocs -A PROBLEMS README xmakemol.html xmakemol.txt

override_dh_install:
	dh_install -A debian/xmakemol.desktop usr/share/applications/

override_dh_installexamples:
	dh_installexamples -A examples/*