File: rules

package info (click to toggle)
git-cola 3.3-1
  • links: PTS
  • area: main
  • in suites: buster
  • size: 4,908 kB
  • sloc: python: 26,747; makefile: 358; sh: 311; tcl: 48; xml: 27
file content (81 lines) | stat: -rwxr-xr-x 2,256 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.

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

export GIT_COLA_NO_VENDOR_LIBS=1

package=git-cola
PKGDIR=$(CURDIR)/debian/$(package)
HTMLDIR=$(PKGDIR)/usr/share/doc/git-cola/html

override_dh_auto_test:

build: build-arch build-indep
build-arch: build-stamp
build-indep: build-stamp
build-stamp:
	dh_testdir
	PYTHON=python3 $(MAKE) all doc
	touch $@

clean:
	dh_testdir
	dh_testroot
	dh_clean build-stamp
	[ ! -f Makefile ] || $(MAKE) clean
	find . -name "*.pyc" -delete
	rm -f $(CURDIR)/share/doc/git-cola/_build/html/.buildinfo

install: build
	dh_testdir
	dh_testroot
	dh_install
	dh_installdirs
	PYTHON=python3 $(MAKE) DESTDIR=$(PKGDIR) prefix=/usr install install-doc install-html
#!/usr/bin/env python
	sed -i 's|env python|env python3|' \
		$(PKGDIR)/usr/share/git-cola/bin/git-xbase
	find . -name "*.pyc" -delete
	chmod a-x $(PKGDIR)/usr/share/git-cola/lib/cola/widgets/archive.py
#	chmod a-x $(PKGDIR)/usr/share/git-cola/lib/qtpy/py3compat.py
	mkdir $(PKGDIR)/usr/share/metainfo/
	mv $(PKGDIR)/usr/share/appdata/*.xml $(PKGDIR)/usr/share/metainfo/

# Build architecture-independent files here.
binary-indep: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs -XCHANGELOG
	rm -r $(PKGDIR)/usr/share/doc/git-cola/html/sources/
	dh_installdocs
	dh_installexamples
	dh_installman
	dh_python3
#	dh_link /usr/share/javascript/jquery/jquery.js \
#		/usr/share/doc/git-cola/html/_static/jquery.js
	rm $(PKGDIR)/usr/share/doc/git-cola/html/static/jquery.js
	dh_link /usr/share/javascript/jquery/jquery.js \
		/usr/share/doc/git-cola/html/static/jquery.js
	rm $(PKGDIR)/usr/share/doc/git-cola/html/static/underscore.js
	dh_link /usr/share/javascript/underscore/underscore.js \
		/usr/share/doc/git-cola/html/static/underscore.js
	sed -i "s|https://cdnjs.\+modernizr.min.js|/usr/share/javascript/modernizr/modernizr.min.js|" \
		$(HTMLDIR)/*.html
	dh_strip
	dh_compress -Xobjects.inv
	dh_fixperms
	dh_perl
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

# Build architecture-dependent files here.
binary-arch: build install

binary: binary-indep binary-arch

.PHONY: build clean binary-indep binary-arch binary install override_dh_auto_test