File: rules

package info (click to toggle)
blends 0.6.96
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 744 kB
  • sloc: xml: 5,111; sh: 705; perl: 593; makefile: 215
file content (51 lines) | stat: -rwxr-xr-x 1,484 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
#!/usr/bin/make -f
# debian/rules for blends
# This file is public domain software, originally written by Andreas Tille.

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

pkg := $(shell dpkg-parsechangelog | sed -n 's/^Source: //p')
VERSION := $(shell dpkg-parsechangelog -ldebian/changelog | grep Version: | cut -f2 -d' ' | cut -f1 -d- )
DISTDIR := $(pkg)-$(VERSION)

%:
	dh $@

override_dh_auto_build:
	cd doc; $(MAKE) html; $(MAKE) txt; $(MAKE) pdf
	dh_auto_build

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

override_dh_auto_clean:
	cd doc; $(MAKE) 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 [ "$(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 ../$(pkg)_$(VERSION).tar.gz $(DISTDIR)
	rm -rf $(DISTDIR)