File: rules

package info (click to toggle)
hedgewars 1.0.3-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 219,040 kB
  • sloc: pascal: 54,830; cpp: 27,224; ansic: 22,809; java: 8,210; haskell: 6,797; xml: 3,076; sh: 580; objc: 113; python: 105; makefile: 32
file content (40 lines) | stat: -rwxr-xr-x 1,187 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

%:
	dh $@

DEJAVU_DIRECTORY := $(shell dirname `readlink -f /usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf`)

ifeq ($(shell dpkg -s fp-compiler | grep -o installed), installed)
 BUILD_ENGINE_C := NO
else
 BUILD_ENGINE_C := YES
endif

HEDGEWARS_OPTIONS= \
 -DCMAKE_INSTALL_PREFIX=/usr/lib/hedgewars \
 -DDATA_INSTALL_DIR=/usr/share/games/hedgewars \
 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DPHYSFS_SYSTEM=ON \
 -DFONTS_DIRS='/usr/share/fonts/truetype/wqy;$(DEJAVU_DIRECTORY)' \
 -DNOVERSIONINFOUPDATE=ON \
 -DBUILD_ENGINE_C=$(BUILD_ENGINE_C)

override_dh_clean:
	rm -rf tmp-icon
	dh_clean

override_dh_install:
	mv debian/tmp/usr/lib/hedgewars/share/pixmaps/ debian/tmp/usr/share/
	rm -Rf debian/tmp/usr/lib/hedgewars/share/
	dh_install

override_dh_auto_configure:
	for icon in `find debian/hicolor-icons -type f`; do \
		dirname=`dirname $$icon`; \
		dirname=`dirname $$dirname`; \
		dirname=`basename $$dirname`; \
		basename=`basename $$icon .xpm`; \
		mkdir -p tmp-icon/$$dirname/apps; \
		convert $$icon +set date:create +set date:modify -define png:exclude-chunk=time tmp-icon/$$dirname/apps/$$basename.png; \
	done
	dh_auto_configure -- $(HEDGEWARS_OPTIONS)