File: rules

package info (click to toggle)
balder2d 1.0-2
  • links: PTS
  • area: main
  • in suites: buster, stretch
  • size: 12,616 kB
  • sloc: cpp: 8,623; xml: 398; python: 364; ansic: 214; makefile: 69; sh: 9
file content (94 lines) | stat: -rwxr-xr-x 2,415 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

DESTDIR=$(CURDIR)/debian/tmp

CFLAGS = -Wall -g

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
	CFLAGS += -O0
else
	CFLAGS += -O2
endif

configure: configure-stamp
configure-stamp:
	rm -rf src/tinyxml
	touch configure-stamp

build-arch: build

build-indep: build

build: build-stamp

build-stamp: configure-stamp 
	scons
	touch build-stamp

clean: 
	rm -f build-stamp configure-stamp
	scons -c
	rm -f scons-signatures*
	dh_clean 

install: build install-indep install-arch

install-indep:
	dh_prep -i
	dh_installdirs -i
	# DESTDIR=$(CURDIR)/debian/tmp is defined above
	mkdir -p $(DESTDIR)/usr/share/games/balder2d
	cp -r $(CURDIR)/bin/* $(DESTDIR)/usr/share/games/balder2d/
	rm $(DESTDIR)/usr/share/games/balder2d/balder2d
	rm $(DESTDIR)/usr/share/games/balder2d/maps/balder2d_export.py
	rm $(DESTDIR)/usr/share/games/balder2d/scripts/test/*
	rmdir $(DESTDIR)/usr/share/games/balder2d/scripts/test
	dh_install -i

install-arch:
	dh_prep -s
	dh_installdirs -s
	# Add commands here to install the binary files to debian/tmp.
	# DESTDIR=$(CURDIR)/debian/tmp is defined above
	mkdir -p $(DESTDIR)/usr/lib/balder2d
	cp $(CURDIR)/bin/balder2d $(DESTDIR)/usr/lib/balder2d
	mkdir -p $(DESTDIR)/usr/games
	cp $(CURDIR)/run_balder.sh $(DESTDIR)/usr/games/balder2d
	mkdir -p $(DESTDIR)/usr/share/applications/
	cp $(CURDIR)/Balder2D.desktop $(DESTDIR)/usr/share/applications/
	mkdir -p $(DESTDIR)/usr/share/pixmaps/
	cp $(CURDIR)/bin/balder2d.xpm $(DESTDIR)/usr/share/pixmaps/
	dh_install -s
	
binary-indep: build install
	dh_installchangelogs -i
	dh_installdocs -i
	dh_compress -i
	dh_fixperms -i
	dh_installdeb -i
	dh_gencontrol -i
	dh_md5sums -i
	dh_builddeb -i
	
binary-arch: build install
	dh_installchangelogs history.txt -a
	dh_installdocs -a
	dh_installman debian/balder2d.6 -a
	dh_link -a
	dh_strip -a
	dh_compress -a
	dh_fixperms -a
	dh_installdeb -a
	dh_shlibdeps -a
	dh_gencontrol -a
	dh_md5sums -a
	dh_builddeb -a

binary: binary-indep binary-arch
.PHONY: build build-arch build-indep clean binary-indep binary-arch binary install configure