File: rules

package info (click to toggle)
gnome-keysign 1.3.0-5.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,460 kB
  • sloc: python: 5,143; xml: 126; makefile: 33; sh: 16
file content (39 lines) | stat: -rwxr-xr-x 982 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
#! /usr/bin/make -f

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

export PYBUILD_NAME=gnome-keysign
DATE=$(shell date --date=@$(SOURCE_DATE_EPOCH) '+%d %B %Y')
export LC_ALL=C.UTF-8

MANPAGES=debian/man/gnome-keysign.1 \
         debian/man/gks-qrcode.1

%.1: %.1.txt
	TZ=UTC LC_ALL=C \
	  txt2man -d "$(DATE)" \
	  -s 1 -r "GNOME Keysign $(DEB_VERSION_UPSTREAM)" \
	  -t $(shell basename -a -s.1 $@) \
	  $< > $@

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

override_dh_auto_install:
	dh_auto_install
	find $(CURDIR)/debian -name '*.pyc' -delete

override_dh_installman: $(MANPAGES)
	dh_installman

override_dh_auto_clean:
	dh_clean
	rm -rf $(MANPAGES) .pybuild .pytest_cache gnome_keysign.egg-info data/org.gnome.Keysign.appdata.xml data/org.gnome.Keysign.desktop
	find . -name "__pycache__" -type d -exec rm -r {} +
	find . -name "*.mo" -delete
	find . -name "*.pyc" -delete

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	xvfb-run -a python3 -m pytest
endif