File: rules

package info (click to toggle)
aegisub 3.2.2+dfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 22,448 kB
  • sloc: cpp: 57,006; ansic: 16,457; asm: 3,618; sh: 3,522; makefile: 407; python: 350; perl: 274; cs: 205; xml: 196; objc: 47
file content (63 lines) | stat: -rwxr-xr-x 2,350 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
#!/usr/bin/make -f
include /usr/share/dpkg/pkg-info.mk
DEB_DEBIAN_DIR=$(dir $(firstword $(MAKEFILE_LIST)))
DEB_UPSTREAM_VERSION=$(DEB_VERSION_EPOCH_UPSTREAM)
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_LDFLAGS_MAINT_APPEND := -Wl,--as-needed

%:
	dh $@ --with autoreconf

override_dh_installdocs:
	dh_installdocs -i
	dh_installdocs --remaining --link-doc=aegisub

override_dh_auto_configure:
	dh_auto_configure -- --with-boost-libdir=/usr/lib/${DEB_HOST_MULTIARCH} --disable-update-checker

override_dh_auto_install:
	dh_auto_install
	find debian/tmp/usr/share -type f -exec chmod a-x '{}' ';'

override_dh_auto_clean:
	cp build/git_version.h debian/git_version.h.backup
	cp build/version.sh debian/version.sh.backup
	-dh_auto_clean
	mv debian/git_version.h.backup build/git_version.h
	mv debian/version.sh.backup build/version.sh
	rm -f src/libresrc/default_config_platform.json

override_dh_autoreconf:
	dh_autoreconf --as-needed

override_dh_auto_test:
	# skip test

get-orig-source:
	# download tarball
	uscan --noconf --force-download --download-current-version --destdir=. $(DEB_DEBIAN_DIR)/..
	# extract tarball
	tar -xf aegisub_$(DEB_UPSTREAM_VERSION).orig.tar.xz
	rm aegisub-$(DEB_UPSTREAM_VERSION).tar.xz
	rm aegisub_$(DEB_UPSTREAM_VERSION).orig.tar.xz
	# remove some directories
	rm -rf aegisub-$(DEB_UPSTREAM_VERSION)/vendor/boost
	rm -rf aegisub-$(DEB_UPSTREAM_VERSION)/vendor/csri
	rm -rf aegisub-$(DEB_UPSTREAM_VERSION)/vendor/ffmpeg
	rm -rf aegisub-$(DEB_UPSTREAM_VERSION)/vendor/ffms2
	rm -rf aegisub-$(DEB_UPSTREAM_VERSION)/vendor/fftw
	rm -rf aegisub-$(DEB_UPSTREAM_VERSION)/vendor/fontconfig
	rm -rf aegisub-$(DEB_UPSTREAM_VERSION)/vendor/freetype2
	rm -rf aegisub-$(DEB_UPSTREAM_VERSION)/vendor/googletest
	rm -rf aegisub-$(DEB_UPSTREAM_VERSION)/vendor/hunspell
	rm -rf aegisub-$(DEB_UPSTREAM_VERSION)/vendor/iconv
	rm -rf aegisub-$(DEB_UPSTREAM_VERSION)/vendor/icu
	rm -rf aegisub-$(DEB_UPSTREAM_VERSION)/vendor/libass
	rm -rf aegisub-$(DEB_UPSTREAM_VERSION)/vendor/luajit
	rm -rf aegisub-$(DEB_UPSTREAM_VERSION)/vendor/wxWidgets
	# create new tarball
	GZIP=--best tar -cJ --owner root --group root --mode a+rX -f \
		aegisub_$(DEB_UPSTREAM_VERSION)+dfsg.orig.tar.xz \
		aegisub-$(DEB_UPSTREAM_VERSION)
	rm -rf aegisub-$(DEB_UPSTREAM_VERSION)