File: rules

package info (click to toggle)
drawing 0.6.4-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 10,020 kB
  • sloc: python: 6,705; xml: 223; sh: 40; makefile: 16
file content (23 lines) | stat: -rwxr-xr-x 890 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
#!/usr/bin/make -f

PACKAGE = $(firstword $(shell grep Package debian/control | cut -d: -f2))

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

%:
	dh $@ --buildsystem=meson --with=python3

override_dh_auto_build:
	dh_auto_build
	@upstream_ver=$(shell meson introspect --projectinfo obj-*/ | jq -r .version); \
	 deb_ver=$(shell echo $(DEB_VERSION_UPSTREAM) | sed -e 's/+.*//'); \
	[ $$upstream_ver = $$deb_ver ] || \
	( echo ; echo ERROR: Upstream version needs to be bumped: metadata says $$upstream_ver, packaging says $(DEB_VERSION_UPSTREAM); echo ; exit 1 )

override_dh_auto_install:
	dh_auto_install
	mv debian/$(PACKAGE)/usr/share/$(PACKAGE)/*/ debian/$(PACKAGE)/usr/lib/python3/dist-packages/

override_dh_installchangelogs:
	appstreamcli metainfo-to-news --format=text $(firstword $(wildcard debian/*/usr/share/metainfo/*.xml)) debian/NEWS.upstream
	dh_installchangelogs debian/NEWS.upstream