File: rules

package info (click to toggle)
hyperlatex 2.9a-3
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 668 kB
  • ctags: 391
  • sloc: lisp: 2,680; sh: 199; makefile: 84; awk: 21
file content (110 lines) | stat: -rwxr-xr-x 3,420 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
109
110
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.

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

pkg=hyperlatex
d=debian/$(pkg)
SITE=usr/share/emacs/site-lisp

configure: configure-stamp
configure-stamp:
	dh_testdir

	touch configure-stamp

build: configure-stamp build-stamp
build-stamp:
	dh_testdir
	
	# emacs byte-compile
	emacs=/usr/bin/emacs; \
	if [ ! -x $$emacs ]; then \
	  emacs=/usr/bin/xemacs; \
	  if [ ! -x $$emacs ]; then \
	    exit 1; \
	  fi; \
	fi; \
	cd hlx && $$emacs -batch -q -no-site-file -l hyperlatex.el -f hyperlatex-compile

	# main documentation
	cp etc/hyperlatex.sty doc/
	cd doc && PATH="$(CURDIR)/bin:$$PATH" HYPERLATEX_PATH="$(CURDIR)/hlx" HYPERLATEX_DIR="$(CURDIR)/hlx" hyperlatex hyperlatex.tex
	cd doc && PATH="$(CURDIR)/bin:$$PATH" HYPERLATEX_PATH="$(CURDIR)/hlx" HYPERLATEX_DIR="$(CURDIR)/hlx" hyperlatex -image hyperlatex.tex
	mv doc/html doc/manual

	# documentation of Ralf Hemmecke's extensions
	cp etc/hyperlatex.sty hlx/contrib/rhxhlx/
	mkdir -p hlx/contrib/rhxhlx/hyperlatex
	cd hlx/contrib/rhxhlx && PATH="$(CURDIR)/bin:$$PATH" HYPERLATEX_PATH="$(CURDIR)/hlx" HYPERLATEX_DIR="$(CURDIR)/hlx" hyperlatex rhxdoc.tex
	cd hlx/contrib/rhxhlx && PATH="$(CURDIR)/bin:$$PATH" HYPERLATEX_PATH="$(CURDIR)/hlx" HYPERLATEX_DIR="$(CURDIR)/hlx" hyperlatex -image rhxdoc.tex
	
	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp configure-stamp
	-rm -r doc/manual doc/*.dvi doc/*.sty doc/*.log doc/*.idx doc/*.aux doc/*.toc doc/*.ilg doc/*.makeimage doc/*.ps hlx/*.elc hlx/contrib/rhxhlx/*.dvi hlx/contrib/rhxhlx/*.sty hlx/contrib/rhxhlx/*.log hlx/contrib/rhxhlx/*.aux
	dh_clean

instdirs = \
	etc/$(pkg) \
	usr/share/texmf/tex/latex/$(pkg)/ \
	usr/bin \
	usr/share/man/man1 \
	usr/share/doc/$(pkg)/examples \
	usr/share/doc/$(pkg)/rhxhlx \
	usr/lib/emacsen-common/packages/install \
	usr/lib/emacsen-common/packages/remove \
	usr/share/doc-base \
	$(SITE)/$(pkg)/ \
	usr/share/$(pkg)/icons \
	usr/share/$(pkg)/rhxhlx

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs $(instdirs)

	install -m 644 hlx/*.hlx $(d)/$(SITE)/$(pkg)/
	install -m 644 hlx/contrib/inputenc.hlx $(d)/$(SITE)/$(pkg)
	install -m 644 hlx/contrib/multirow.hlx $(d)/$(SITE)/$(pkg)
	install -m 644 hlx/contrib/emulate.hlx $(d)/$(SITE)/$(pkg)
	install -m 644 hlx/contrib/rhxhlx/*.hlx $(d)/$(SITE)/$(pkg)
	install -m 644 hlx/*.el debian/*.el $(d)/$(SITE)/$(pkg)/
	mv $(d)/$(SITE)/$(pkg)/siteinit.hlx $(d)/etc/hyperlatex/
	cp bin/hyperlatex bin/ps2image $(d)/usr/bin
	cp bin/normalize-eps.awk $(d)/$(SITE)/$(pkg)
	cp etc/hyperlatex.sty $(d)/usr/share/texmf/tex/latex/$(pkg)/
	cp doc/*.png $(d)/usr/share/$(pkg)/icons/
	mv hlx/contrib/rhxhlx/hyperlatex/* $(d)/usr/share/doc/$(pkg)/rhxhlx/
	cp -a hlx/contrib/rhxhlx/pics $(d)/usr/share/doc/$(pkg)/rhxhlx/

# Build architecture-independent files here.
binary-indep: build install
	dh_testdir
	dh_testroot
	dh_installdocs -n doc/manual
	dh_installexamples doc/hyperlatex.tex doc/hyperlatex.ind
	dh_installemacsen
	dh_installman debian/hyperlatex.1 debian/ps2image.1
	dh_installchangelogs
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

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

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