File: rules

package info (click to toggle)
kitty 0.26.5-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 20,216 kB
  • sloc: ansic: 139,525; python: 50,932; objc: 4,333; sh: 1,215; makefile: 97; javascript: 43
file content (57 lines) | stat: -rwxr-xr-x 1,571 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
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS=hardening=+all

include /usr/share/dpkg/default.mk

OVERRIDE_CFLAGS = $(CFLAGS)
OVERRIDE_CPPFLAGS = $(CPPFLAGS)
OVERRIDE_LDFLAGS = $(LDFLAGS)
export OVERRIDE_CFLAGS OVERRIDE_CPPFLAGS OVERRIDE_LDFLAGS

V=
ifeq (,$(filter terse,$(DEB_BUILD_OPTIONS)))
	V=--verbose
endif

HOME = $(CURDIR)/debian/fakehome
KITTY_RUNTIME_DIRECTORY = $(CURDIR)/debian/fakeruntime

%:
	dh $@ --with python3 --with sphinxdoc

override_dh_auto_clean:
	python3 setup.py $(V) clean

override_dh_auto_build:
	env HOME="$(HOME)" PATH=$$PATH:$(CURDIR)/debian/bin python3 setup.py $(V) linux-package

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	mkdir -p "$(HOME)"
	mkdir -p "$(KITTY_RUNTIME_DIRECTORY)"
	env HOME="$(HOME)" KITTY_RUNTIME_DIRECTORY="$(KITTY_RUNTIME_DIRECTORY)" python3 setup.py $(V) build-launcher
	env HOME="$(HOME)" KITTY_RUNTIME_DIRECTORY="$(KITTY_RUNTIME_DIRECTORY)" LC_ALL=C.UTF-8 python3 setup.py $(V) test
endif

override_dh_auto_install:
	mkdir -p $(CURDIR)/debian/tmp/usr
	cp -a linux-package/* $(CURDIR)/debian/tmp/usr/

override_dh_install:
	dh_install -Nkitty-shell-integration -Xlib/kitty/shell-integration
	dh_install -pkitty-shell-integration

override_dh_installdocs:
	dh_installdocs
	# Remove PayPal's tracking pixel
	[ ! -d debian/kitty-doc ] || sed -i '/pixel\.gif/d' debian/kitty-doc/usr/share/doc/kitty/html/support.html

override_dh_python3:
	dh_python3 --no-ext-rename

override_dh_installchangelogs:
	dh_installchangelogs docs/changelog.rst

override_dh_compress:
	dh_compress -X/html/