File: rules

package info (click to toggle)
task 3.4.2%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,332 kB
  • sloc: cpp: 42,567; python: 12,689; sh: 775; perl: 189; makefile: 35
file content (51 lines) | stat: -rwxr-xr-x 1,599 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
#!/usr/bin/make -f

include /usr/share/dpkg/buildflags.mk
include /usr/share/dpkg/pkg-info.mk
include /usr/share/dpkg/architecture.mk
include /usr/share/rustc/architecture.mk
export CFLAGS CXXFLAGS CPPFLAGS LDFLAGS DEB_HOST_RUST_TYPE DEB_HOST_GNU_TYPE
export PATH := /usr/share/cargo/bin:$(PATH)
export CARGO_HOME = $(CURDIR)/debian/cargo_home
export DEB_CARGO_CRATE = task
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
HOST_ARCH_BITS := $(shell dpkg-architecture -qDEB_HOST_ARCH_BITS)
DPKG_EXPORT_BUILDFLAGS=1

export CMAKE_BUILD_TYPE=release

%:
	dh $@ --with shell_completions

override_dh_auto_clean:
	dh_clean
	rm -f cmake.h commit.h test/basetest/*.pyc test/simpletap/*.pyc
	rm -rf obj-*

execute_before_dh_auto_configure:
	cargo prepare-debian debian/cargo_registry --link-from-system
	cargo generate-lockfile --offline

override_dh_auto_configure:
	find . -type f -exec sed -i '1s|^#!/usr/bin/env python3|#!/usr/bin/python3|;' {} \;
	dh_auto_configure -- -DTASK_RCDIR=share/taskwarrior -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DSYSTEM_CORROSION=ON

override_dh_auto_install:
	# Needed by #710321
	dh_auto_install
	rm -rf debian/taskwarrior/usr/share/doc/task
	rm -f debian/taskwarrior/usr/share/taskwarrior/refresh

override_dh_auto_test:
	# a number of tests are predicated on 64-bit time_t etc; rather than
	# needing lots of special skip rules for what are at best marginal
	# targets, just skip testing on non-64-bit arches
ifeq ($(HOST_ARCH_BITS),64)
	dh_auto_test
endif

.PHONY: get-orig-source
get-orig-source:
	sh ./debian/get-orig-source.sh $(DEB_VERSION_UPSTREAM)

# vim:ts=4 sw=4 noet