File: rules

package info (click to toggle)
gnome-gmail 2.7-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 580 kB
  • sloc: python: 1,166; makefile: 22; sh: 21
file content (38 lines) | stat: -rwxr-xr-x 1,186 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

export PYBUILD_NAME=gnome-gmail

# Too many Build-Depends required to support test
export PYBUILD_DISABLE=test


PKD = $(word 1,$(abspath $(dir $(MAKEFILE_LIST))))
PKG = $(shell dpkg-parsechangelog -l$(PKD)/changelog --show-field=Source)

DEBIAN_VERSION = $(shell (dpkg-parsechangelog -l$(PKD)/changelog | grep Version | sed 's/Version..//' | sed 's/-.\+//'))
PRODUCT_VERSION = $(shell (grep "version=" setup.py | sed "s/.\+'\(.\+\)'.\+/\1/"))
VER ?= $(DEBIAN_VERSION)


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

override_dh_installchangelogs:
	dh_installchangelogs ChangeLog

override_dh_auto_build:
	if [ ${DEBIAN_VERSION} != ${PRODUCT_VERSION} ] ; then exit 1 ; fi
	if ! grep -q \"${DEBIAN_VERSION}\" gnome-gmail.appdata.xml.in ; then exit 1 ; fi
	dh_auto_build

override_dh_clean:
	dh_clean -X gnome-gmail.pot

.PHONY get-orig-source:
get-orig-source:  $(info I: $(PKG)_$(VER))
	@echo "# Downloading..."
	uscan --noconf --verbose --rename --destdir=$(CURDIR) --check-dirname-level=0 --force-download --download-version $(VER) $(PKD)
	mv $(PKG)-$(VER).tar.gz.pgp $(PKG)_$(VER).orig.tar.gz.asc