File: rules

package info (click to toggle)
blends 0.7.2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 792 kB
  • sloc: xml: 5,097; python: 1,003; sh: 705; makefile: 272
file content (57 lines) | stat: -rwxr-xr-x 1,497 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/usr/bin/make -f

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

include /usr/share/dpkg/default.mk

DISTDIR := $(DEB_SOURCE)-$(DEB_VERSION)

%:
	dh $@ --with python3,sphinxdoc

override_dh_auto_build:
	$(MAKE) -C doc html txt pdf
	$(MAKE) -C sphinxdoc html
	dh_auto_build

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	pytest-3 --doctest-modules
	rm -f education # clean up test remnants
endif

override_dh_installchangelogs:
	for pkgnews in $(DEB_SOURCE)-common $(DEB_SOURCE)-dev ; do \
	    cp -a debian/$$pkgnews.NEWS.Debian debian/$$pkgnews/usr/share/doc/$$pkgnews/NEWS.Debian ; \
	done
	dh_installchangelogs

override_dh_auto_clean:
	$(MAKE) -C doc clean
	$(MAKE) -C sphinxdoc clean
	dh_auto_clean

override_dh_compress:
	dh_compress -X.pdf

dist: get-orig-source

get-orig-source:
	if [ ! -f debian/changelog ] ; then \
	    echo "File debian/changelog is missing. Something is wrong!" ; \
	    exit -1 ; \
	fi
	if [ "$(DEB_VERSION)" = "" ] ; then \
	    echo "Unable to obtain version number from debian/changelog. Something is wrong!" ; \
	    exit -1 ; \
	fi ;
	rm -rf $(DISTDIR)
	mkdir $(DISTDIR)
	chmod 777 $(DISTDIR)
	rsync -a --exclude $(DISTDIR) --exclude CVS --exclude .svn --exclude svn-commit.tmp * $(DISTDIR)
	ln -sf sources.list.unstable $(DISTDIR)/sources.list
	# ln -s control.stub $(DISTDIR)/examples/debian/control
	rm -f `find . -name "*~"`
	GZIP=-9 tar -czf ../$(DEB_SOURCE)_$(DEB_VERSION).tar.gz $(DISTDIR)
	rm -rf $(DISTDIR)