File: rules

package info (click to toggle)
fweb 1.60beta-11
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 4,348 kB
  • ctags: 5,018
  • sloc: ansic: 38,347; makefile: 393; sh: 163
file content (108 lines) | stat: -rwxr-xr-x 2,688 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
#!/usr/bin/make -f
# -*- makefile -*-
#
# Invoke each target with `./debian/rules <target>'.  All targets should be
# invoked with the package root as the current directory.
#
# The `binary' target must be run as root, as it needs to install files with
# specific ownerships.

package=fweb

# be paranoid...
export LC_ALL=C

topdir = $(shell pwd)
tmpdir = $(topdir)/debian/tmp
texdir = $(tmpdir)/usr/lib/texmf/tex/latex/litprog
docdir= $(tmpdir)/usr/doc/$(package)
htmldocdir= $(docdir)/html-info

define checkdir
	test -f Web/ftangle.web -a -f debian/rules
endef

installdoc=install -m 644
installbin=install -m 755

build: configured
	dh_testdir
	$(MAKE) -C Web CFLAGS=-O2 LDFLAGS= tch_src both idxmerge ../Manual/fweb.info
	cd Manual && texi2html -split_chapter fweb.texi
	touch build

configured:
	dh_testdir
	cd Web; ./configure --prefix=/usr
	touch configured

clean:
	dh_testdir
	dh_testroot
	rm -f build configured
	-$(MAKE) -C Web -i distclean || $(MAKE) -C Web -f Makefile.in distclean
	-rm -f Web/idxmerge Web/idxmerge.c Web/custom.h Web/config.h \
		Manual/fweb.info* Manual/fweb*.html
	dh_clean
#	-rm -rf *~ $(tmpdir) debian/*~ debian/files* debian/substvars

binary-indep: build
# Architecture-independent files for this package are installed
# together with the Architecture-dependent ones.

binary-arch: build
	dh_testdir
	dh_testroot
	-rm -rf $(tmpdir) debian/files

	install -d $(texdir) $(htmldocdir)
	dh_installdirs
# upstream binaries
	$(MAKE) -C Web CFLAGS=-O2 LDFLAGS=-s \
		INSTALL_PROGRAM='install -c -s' \
		prefix=$(tmpdir)/usr texdir=$(texdir) \
		install

# documentation
	dh_installdocs
	$(installdoc) debian/docbase $(tmpdir)/usr/share/doc-base/fweb
	$(installdoc) Manual/fweb*.html $(htmldocdir)/
	$(installdoc) Manual/fweb.texi $(docdir)/
	$(installdoc) debian/idxmerge.1 $(tmpdir)/usr/man/man1/
	ln -s fweb.1.gz $(tmpdir)/usr/man/man1/fweave.1.gz
	ln -s fweb.1.gz $(tmpdir)/usr/man/man1/ftangle.1.gz
#	dh_installmenu
	dh_installexamples

	dh_installchangelogs
	dh_strip
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
#	dh_du
	dh_md5sums
	dh_builddeb

get-orig-source:
	false
	cp /usr/local/src/fweb-1.60-beta.tar.gz .
	rm -rf _repacking_; mkdir _repacking_
	cd _repacking_; tar zxf ../fweb-1.60-beta.tar.gz
	mv _repacking_/fweb-1.60 _repacking_/fweb-1.60.orig
	cd _repacking_; tar zcf ../fweb_1.60.orig.tar.gz fweb-1.60.orig
	rm -rf _repacking_ fweb-1.60-beta.tar.gz

# Below here is fairly generic really

binary:		binary-indep binary-arch

source diff:
	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false

checkroot:
	$(checkdir)
	test root = "`whoami`"

.PHONY: binary binary-arch binary-indep clean checkroot