File: rules

package info (click to toggle)
openrct2-title-sequences 0.4.26-1
  • links: PTS, VCS
  • area: contrib
  • in suites: forky, sid
  • size: 103,816 kB
  • sloc: makefile: 17
file content (27 lines) | stat: -rwxr-xr-x 924 bytes parent folder | download | duplicates (5)
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
#!/usr/bin/make -f

include /usr/share/dpkg/pkg-info.mk

BUILD_DATE := $(shell date -u -d "@$(SOURCE_DATE_EPOCH)" "+%Y-%m-%d %H:%M:%S %z")

%:
	dh $@

# Upstream relies on a powershell script to create the zip archives.
# Implement equivalent logic here in d/rules

override_dh_auto_clean:
	dh_auto_clean
	rm -rf artifacts

override_dh_auto_build:
	chmod 644 title/*/*
	mkdir artifacts
	for SEQUENCE in "rct1" "rct1aa" "rct1aall" "rct2"; do \
	  cd title/$$SEQUENCE/ && touch --no-dereference --date='$(BUILD_DATE)' * && TZ=UTC zip -9 -roX ../../artifacts/$$SEQUENCE.parkseq * && cd ../../; \
	done
	TITLE_SEQUENCES_VERSION=$$(echo '$(DEB_VERSION_UPSTREAM)' | sed -e 's/[a-z]$$//'); \
	cd title/v$$TITLE_SEQUENCES_VERSION/ && touch --no-dereference --date='$(BUILD_DATE)' * && TZ=UTC zip -9 -roX ../../artifacts/openrct2.parkseq * && cd ../../

override_dh_auto_install:
	dh_install artifacts/* usr/share/openrct2/sequence/