File: rules

package info (click to toggle)
simutrans 111.2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 13,504 kB
  • ctags: 12,645
  • sloc: cpp: 101,849; ansic: 3,466; makefile: 694; sh: 44
file content (76 lines) | stat: -rwxr-xr-x 2,399 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
#!/usr/bin/make -f
# -*- makefile -*-
# debian/rules file for simutrans

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

export DEB_BUILD_MAINT_OPTIONS=hardening=+all
export CFLAGS   = $(shell dpkg-buildflags --get CFLAGS)
export CCFLAGS  = $(CFLAGS)
export CXXFLAGS = $(shell dpkg-buildflags --get CXXFLAGS)
export LDFLAGS  = $(shell dpkg-buildflags --get LDFLAGS)

TARGETS := binary binary-arch binary-indep build build-arch build-indep clean
.PHONY: $(TARGETS)
$(TARGETS):
	dh $@ --parallel

override_dh_auto_build:
	dh_auto_build
	$(MAKE) -C makeobj
	$(MAKE) -C nettools

	convert simutrans.ico -alpha on debian/simutrans.xpm

	[ -d skin ] || mkdir skin
	./build/default/makeobj/makeobj pak ./skin/ ./skins.src/

override_dh_auto_clean:
	dh_auto_clean
	$(MAKE) -C makeobj clean
	$(MAKE) -C nettools clean
	$(RM) -r skin

# These languages will be excluded
BROKEN_LANG = ce cn id tr

override_dh_install:
	dh_install

	install -m 755 build/default/sim $(CURDIR)/debian/simutrans/usr/games/simutrans
	install -m 755 build/default/nettool/nettool $(CURDIR)/debian/simutrans/usr/games/simutrans-nettool

	for lang in $(BROKEN_LANG); do \
	  $(RM) $(CURDIR)/debian/simutrans-data/usr/share/games/simutrans/text/$$lang.tab ; \
	done

override_dh_installchangelogs:
	dh_installchangelogs simutrans/history.txt

override_dh_builddeb:
	dh_builddeb -- -Zxz

# SVN revision and package version to use when building .orig.tar.gz
SVNREV  = 5583
VERSION = 111.2.2
SVNROOT = svn://tron.homeunix.org/simutrans/simutrans/trunk

get-orig-source:
	svn export --username anon --password "" -r $(SVNREV) $(SVNROOT) simutrans-$(VERSION)

	# source is skins.src/*, only removed to make sure we rebuild it.
	$(RM) simutrans-$(VERSION)/simutrans/skin/menu.WindowSkin.pak
	# freeware, cf. http://www.packetizer.com/security/sha1/ [2011-02-15]
	$(RM) simutrans-$(VERSION)/utils/sha1.cc simutrans-$(VERSION)/utils/sha1.h

	tar c simutrans-$(VERSION) | xz >simutrans_$(VERSION).orig.tar.xz
	$(RM) -r simutrans-$(VERSION)

update-translations:
	dh_testdir
	wget --post-data "version=0&choice=all&submit=Export!" --delete-after "http://simutrans-germany.com/translator/script/main.php?page=wrap"
	wget -N http://simutrans-germany.com/translator/data/tab/language_pack-Base+texts.zip
	unzip -o -d debian/translations language_pack-Base+texts.zip "*.tab"
	$(RM) language_pack-Base+texts.zip