File: rules

package info (click to toggle)
fex 20160919-2
  • links: PTS, VCS
  • area: non-free
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 1,944 kB
  • sloc: perl: 17,699; sh: 346; makefile: 67
file content (83 lines) | stat: -rwxr-xr-x 2,611 bytes parent folder | download | duplicates (3)
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
82
83
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

# This has to be exported to make some magic below work.
export DH_OPTIONS
DEBVERSION:=$(shell dpkg-parsechangelog | sed -n -e 's/Version: //p')
DEB_NOEPOCH_VERSION:=$(shell echo $(DEBVERSION) | cut -d':' -f 2)
DEB_SRC_VERSION:=$(shell echo $(DEB_NOEPOCH_VERSION) | sed -e 's/-[^-]\+$$//')
LOCALES:=$(shell (cd locale;find . -mindepth 1 -maxdepth 1 -type d)|sed -e 's,^./,,')

build: build-arch build-indep
build-arch:
	# currently none - just to please lintian
build-indep: build-stamp

build-stamp:
	dh_testdir
	locale/debian_translate . /usr/share/fex locale/export
	touch $@

clean: 
	dh_testdir
	dh_testroot
	rm -rf locale/export
	rm -f build-stamp
	dh_clean 
	@if [ ! -f debian/htdocs.md5/$(DEB_NOEPOCH_VERSION) ];then \
		echo -n "Missing MD5sum file, generating: " ;\
		find htdocs/ -type f|grep -v -e version -e Licence -e FAQ/jquery.js -e download/ |LC_ALL=C sort|xargs -n 1 md5sum >debian/htdocs.md5/$(DEB_NOEPOCH_VERSION) ;\
		echo "done. Stopping as failed now to check file into Git."; \
		exit 1 ;\
	fi

install: build
	dh_testdir
	dh_testroot
	dh_prep -i 
	dh_installdirs -i
	dh_install -i

binary-indep: build-indep install
	dh_testdir
	dh_testroot
	dh_installchangelogs doc/Changes
	dh_installdocs
	cp doc/new debian/fex/usr/share/doc/fex/NEWS
	echo "fex_$(DEBVERSION)" >debian/fex/usr/share/fex/htdocs/version
	# update file system paths in FAQ
	sed -i -e 's,/home/fex/,/var/lib/fex/,g' debian/fex/usr/share/fex/htdocs/FAQ/*
	@(cd debian/fex/usr/share/fex/;find htdocs/ -type f|grep -v -e version -e FAQ/jquery.js -e download/ |LC_ALL=C sort|xargs -n 1 md5sum >../../../../fex.md5.check)
	if diff -q debian/fex.md5.check debian/htdocs.md5/$(DEB_NOEPOCH_VERSION) >/dev/null;then \
		echo "Correct htdocs md5sum found."; \
		rm -f debian/fex.md5.check; \
	else \
		echo "htdocs contents changed! Please add the following to your md5 cache:" ; \
		cat debian/fex.md5.check; \
		exit 1 ; \
	fi
	(cd debian/htdocs.md5;tar czf ../fex/usr/share/fex/.md5/htdocs.tgz *)
	dh_installcron
	dh_installdebconf
	dh_installlogrotate
	dh_installman -pfex-utils debian/man-fex-utils/*.1
	dh_installman -pfex debian/man-fex/*.1
	dh_link
	# add custom symlink without path
	mkdir -p debian/fex/usr/share/fex/htdocs/download
	ln -s :sexsend:sexget: debian/fex/usr/share/fex/htdocs/download/sex.stream
	dh_lintian
	dh_perl
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary-arch:

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