File: Makefile

package info (click to toggle)
freedink-data 1.08.20100103-3
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 122,632 kB
  • ctags: 948
  • sloc: ansic: 18,022; makefile: 71
file content (68 lines) | stat: -rw-r--r-- 1,998 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
DESTDIR=
PREFIX=/usr/local
DATADIR=$(PREFIX)/share
version=1.08.`date +%Y%m%d`
releasedir=freedink-data-$(version)

all:
	@echo "No default action"

install:
#	Copy game data

#	The final directory is '$PREFIX/share/dink/dink' ('dink'
#	twice), as there can be site-wide D-Mods such as
#	'$PREFIX/share/dink/island'
	install -d -m 755 $(DESTDIR)$(DATADIR)/dink

#	'-a' will preserve timestamps, which some distros prefer. It
#	will also preserve symlinks, which may be useful as there are
#	a few duplicate musics. Use a .zip archive for woe releases,
#	it will duplicate files but avoid creating empty files instead
#	of symlinks.
	cp -a dink $(DESTDIR)$(DATADIR)/dink/

#	Tidy permissions
	find $(DESTDIR)$(DATADIR)/dink/dink/ -type d -print0 | xargs -0r chmod 755
	find $(DESTDIR)$(DATADIR)/dink/dink/ -type f -print0 | xargs -0r chmod 644

# Release:
# (Do this from a fresh Git checkout to avoid packaging temporary files)
dist: update-gmo
##	Source release
	mkdir $(releasedir)
	cp -a *.txt *.spec Makefile dink/ doc/ licenses/ soundtest/ src/ $(releasedir)

#	Clean-up:
#	git files
	find $(releasedir) -name ".gitignore" -print0 | xargs -0r rm
#	backup files
	find $(releasedir) -name "*~" -print0 | xargs -0r rm
#	savegames
	find $(releasedir) -iname "save*.dat" -print0 | xargs -0r rm
#	cheat^wDebugging tool
	rm -f $(releasedir)/dink/Story/key-67.c
#	debug mode output
	rm -f $(releasedir)/dink/DEBUG.TXT

#	Tarball:
	tar czf $(releasedir).tar.gz $(releasedir)

##	Derived release (doesn't include Audacity and Rosegarden
##	projects, original Ogg Vorbis files, etc.):
	cd $(releasedir) && \
	make install DESTDIR=`pwd`/t && \
	cd t/usr/local/share/ && \
	tar czf ../../../../../freedink-data-$(version)-nosrc.tar.gz dink
	rm -rf $(releasedir)/t

	rm -rf $(releasedir)

# Compile translation strings catalogs
update-gmo:
	cd dink/l10n; \
	for i in da de fr nl mk es; do \
		mkdir -p $$i/LC_MESSAGES; \
		echo -n "$$i: "; \
		msgfmt --statistics $$i.po -o $$i/LC_MESSAGES/dink.mo; \
	done