File: rules

package info (click to toggle)
drawing 1.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 17,676 kB
  • sloc: python: 8,539; xml: 275; sh: 147; makefile: 13
file content (20 lines) | stat: -rwxr-xr-x 815 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/make -f

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

include /usr/share/dpkg/default.mk

%:
	dh $@ --buildsystem=meson

execute_after_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 )

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

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