File: rules

package info (click to toggle)
frescobaldi 3.1.3%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 22,168 kB
  • sloc: python: 43,109; javascript: 263; sh: 230; makefile: 94
file content (32 lines) | stat: -rwxr-xr-x 979 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
#!/usr/bin/make -f

export DEB_BUILD_OPTIONS += nocheck
export PYBUILD_NAME = frescobaldi
export PYBUILD_INSTALL_ARGS = --install-lib=/usr/share/frescobaldi

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

.PHONY: get-orig-source get-pre-release-orig-source
get-orig-source:
	XZ_OPT=-9e uscan --noconf --verbose --destdir=$(CURDIR)

PKG := frescobaldi
GIT_REPO := https://github.com/wbsoft/frescobaldi.git
FUTURE_VERSION := 3.0.0

get-pre-release-orig-source:
	git clone $(GIT_REPO)
	cd $(PKG) \
	&& COMMIT_DATE=$$(TZ=Etc/UTC git log --pretty=format:%cd --date=format-local:%Y%m%d -n1) \
	&& COMMIT_HASH=$$(git describe --long | cut -d- -f3 | cut -b2-) \
	&& VER=$(FUTURE_VERSION)~git$$COMMIT_DATE.0.$$COMMIT_HASH \
	&& git archive --format=tar.gz --prefix $(PKG)-$$VER/ HEAD \
		>../$(PKG)-$$VER.tar.gz \
	&& cd .. \
	&& XZ_OPT=-9e mk-origtargz --version $$VER \
		--rename --repack --repack-suffix +ds1 --compression xz \
		$(PKG)-$$VER.tar.gz
	rm -rf $(PKG)

.DEFAULT_GOAL :=