File: rules

package info (click to toggle)
pinball 0.3.20201218-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 8,452 kB
  • sloc: cpp: 15,230; makefile: 840; sh: 381; xml: 24
file content (55 lines) | stat: -rwxr-xr-x 1,744 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
#!/usr/bin/make -f
export DH_VERBOSE = 1

DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
DEB_HOST_MULTIARCH  ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

ifneq (,$(findstring alpha,$(DEB_BUILD_GNU_TYPE)))
	CFLAGS += -mieee
	CXXFLAGS += -mieee
endif

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
CFLAGS += -Wall

%:
	dh $@

.PHONY: clean
clean:
	dh clean
	rm -rf libltdl

.PHONY: override_dh_auto_configure
override_dh_auto_configure: bootstrap
	${<D}/${<F}
	dh_auto_configure -- --bindir=/usr/games --datadir=/usr/share/games --with-cflags="$(CFLAGS)" --with-cxxflags="$(CXXFLAGS)"

.PHONY: override_dh_autoreconf
override_dh_autoreconf: bootstrap
	dh_autoreconf ${<D}/${<F}

.PHONY: override_dh_install
override_dh_install:
	rm -rf ${CURDIR}/debian/tmp/var/games/pinball/*/highscores
	rm -rf ${CURDIR}/debian/tmp/usr/lib/*/pinball/libModule*.so
	rm -rf ${CURDIR}/debian/tmp/usr/lib/*/pinball/libModule*.a
	sed -i "/dependency_libs/s/'.*'/''/" $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/pinball/*.la
	install -d $(CURDIR)/debian/tmp/usr/share/applications
	install -d $(CURDIR)/debian/tmp/usr/share/pixmaps
	install -m 644 pinball.desktop $(CURDIR)/debian/tmp/usr/share/applications
	install -m 644 data/pinball.xpm $(CURDIR)/debian/tmp/usr/share/pixmaps
	onsgmls debian/pinball.sgml | sgmlspl sgmlspl-specs/docbook2man-spec.pl
	dh_install

.PHONY: override_dh_fixperms-arch
override_dh_fixperms-arch:
	dh_fixperms
	chown root:games debian/pinball/usr/games/pinball
	chmod 2755 debian/pinball/usr/games/pinball

.PHONY: override_dh_makeshlibs
override_dh_makeshlibs: