File: rules

package info (click to toggle)
crafty 23.4-7
  • links: PTS
  • area: non-free
  • in suites: bookworm, bullseye, buster, stretch
  • size: 3,292 kB
  • ctags: 2,891
  • sloc: ansic: 30,650; cpp: 5,829; makefile: 901; sh: 178; perl: 30
file content (66 lines) | stat: -rwxr-xr-x 1,525 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
#!/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.

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

############# Start arch specific targets

DEB_BUILD_ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH)

TARGET := darwin

ifneq (,$(findstring i386,$(DEB_BUILD_ARCH)))
TARGET := darwin
endif

ifneq (,$(findstring amd64,$(DEB_BUILD_ARCH)))
TARGET := linux-amd64
endif


ifneq (,$(findstring kfreebsd-i386,$(DEB_BUILD_ARCH)))
TARGET := darwin
endif

ifneq (,$(findstring kfreebsd-amd64,$(DEB_BUILD_ARCH)))
TARGET := linux-amd64
endif


ifneq (,$(findstring hurd-i386,$(DEB_BUILD_ARCH)))
TARGET := darwin
endif
############# End arch specific targets

%:
	dh $@ 

override_dh_auto_build:
		$(MAKE) $(TARGET)


override_dh_auto_clean:
		$(MAKE) clean
		rm -f *.o crafty game* log* position* books.bin book.bin book.lrn *.gcno lala
	        rm -rf debian/tmp

override_dh_auto_test:
		@echo "Little Test"
		@echo "sd 15" > lala
		@echo "e4" >> lala
		@echo "end" >> lala
		@echo "input lala" | ./crafty

override_dh_installchangelogs:
		install -d debian/tmp
		grep '^ \*' main.c > debian/tmp/changelog
		dh_installchangelogs debian/tmp/changelog

override_dh_compress:
		dh_compress -Xcrafty.hlp