File: rules

package info (click to toggle)
tina 0.1.14-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 920 kB
  • sloc: ansic: 1,653; sh: 1,415; python: 1,189; makefile: 42
file content (51 lines) | stat: -rwxr-xr-x 1,449 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
# Copyright 2001, 2002, 2007  Matt Kraai
# Copyright 2010, 2016, 2021  Peter Pentchev

export PYBUILD_NAME=tina_mgr

# Aim for the top, adapt if anything should break on the buildds.
DEB_BUILD_MAINT_OPTIONS=	hardening=+all
export DEB_BUILD_MAINT_OPTIONS

DEB_CFLAGS_MAINT_APPEND=	-Wall -W -std=c99 -pedantic -Wbad-function-cast \
		-Wcast-align -Wcast-qual -Wchar-subscripts -Winline \
		-Wmissing-prototypes -Wnested-externs -Wpointer-arith \
		-Wredundant-decls -Wshadow -Wwrite-strings
ifneq (,$(filter werror,$(DEB_BUILD_OPTIONS)))
	DEB_CFLAGS_MAINT_APPEND+=	-Werror
endif
export DEB_CFLAGS_MAINT_APPEND

include /usr/share/dpkg/default.mk

packages:=	$(shell dh_listpackages)

execute_after_dh_auto_clean:
	dh_auto_clean --buildsystem=pybuild

execute_after_dh_auto_build:
	dh_auto_build --buildsystem=pybuild

execute_after_dh_auto_test:
	env TINA='$(CURDIR)/tina' dh_auto_test --buildsystem=pybuild

execute_after_dh_auto_install:
	dh_auto_install --buildsystem=pybuild

execute_after_dh_install:
ifneq (,$(filter tina,$(packages)))
	mv 'debian/python3-tina-mgr/usr/bin/tina-convert' 'debian/tina/usr/bin/'
else
	rm 'debian/python3-tina-mgr/usr/bin/tina-convert'
endif
	rmdir 'debian/python3-tina-mgr/usr/bin'

override_dh_installchangelogs:
	dh_installchangelogs -X ChangeLog -X NEWS -X changes.md
ifneq (,$(filter tina,$(packages)))
	install -m 644 docs/changes.md debian/tina/usr/share/doc/tina/NEWS.md
endif

%:
	dh $@