]> git.donarmstrong.com Git - lilypond.git/blob - debian/rules
''
[lilypond.git] / debian / rules
1 #!/usr/bin/make -f
2 # Made with the aid of debhelper by Joey Hess,
3 # based on the sample debian/rules file for GNU hello by Ian Jackson.
4 #
5 # This is free software; see the GNU General Public Licence
6 # version 2 or later for copying conditions.  There is NO warranty.
7 #
8 # Currently maintained by Anthony Fok <foka@debian.org>
9 # for Debian GNU/Linux.
10
11 package = lilypond
12
13 SHELL = /bin/sh
14 r = debian/$(package)
15 r_doc = debian/$(package)-doc
16 d = usr/share/doc/$(package)
17
18 # "main_memory = 263000" in /etc/texmf/texmf.cnf isn't large enough
19 # for latex to process standchen.dvi.latex, so adding extra_mem_* ...
20 export extra_mem_top = 100000
21 export extra_mem_bot = 100000
22 export MODE = ljfour
23 export BDPI = 600
24 export USER_CFLAGS = -DDEBIAN
25 export DEB_BUILD = yes
26 export MAILADDRESS = lilypond@packages.debian.org
27
28 # Uncomment this to turn on verbose mode.
29 #export DH_VERBOSE=1
30
31 # This is the debhelper compatibility version to use.
32 export DH_COMPAT=3
33
34 # This has to be exported to make some magic below work.
35 export DH_OPTIONS
36
37 build: build-stamp
38 build-stamp:
39         dh_testdir
40
41         ./configure --enable-checking --disable-debugging \
42                 --prefix=/usr --enable-optimise \
43                 --infodir='$${prefix}/share/info' \
44                 --mandir='$${prefix}/share/man'
45         $(MAKE) MAKE_PFA_FILES=1
46
47         touch build-stamp
48
49 build-doc: build build-doc-stamp
50 build-doc-stamp:
51         dh_testdir
52
53         $(MAKE) -C Documentation
54         $(MAKE) web
55
56         touch build-doc-stamp
57
58 clean:
59         dh_testdir
60         dh_testroot
61         rm -f build-stamp build-doc-stamp
62         -$(MAKE) WWW-clean top-WWW-clean
63         -$(MAKE) distclean
64
65         # Still not clean enough?  Let's use... BRUTE STRENGTH!  :-)
66         find . -type d -name 'out' -o -name 'out-www' | xargs rm -rf
67
68         dh_clean
69
70 install: DH_OPTIONS=
71 install: build
72         dh_testdir
73         dh_testroot
74         dh_clean -k
75
76         # Add here commands to install the package into debian/tmp.
77         dh_installdirs
78         $(MAKE) prefix=$(PWD)/$(r)/usr  MAKE_PFA_FILES=1 install
79
80         # Change from an absolute symlink to a relative symlink (Lintian)
81         if [ -L $(r)/usr/share/lilypond/cmtfm ]; then \
82                 rm -f $(r)/usr/share/lilypond/cmtfm; \
83                 ln -s ../texmf/fonts/tfm/public/cm $(r)/usr/share/lilypond/cmtfm; \
84         fi
85
86 # Build architecture-independent files here.
87 binary-indep: DH_OPTIONS=-i
88 binary-indep: build-doc install
89         dh_testdir
90         dh_testroot
91         # Extract LilyPond website tarball ...
92         tar -C $(r_doc)/$(d)/html -xvzf out/web.tar.gz
93         # Add symlinks to the PostScript docs and LilyPond logo PNGs ...
94         cd $(r_doc)/$(d) \
95             && cp -s `find html/Documentation -name '*.ps.gz'` . \
96             && cp -s html/Documentation/pictures/out-www/*.png .
97         # Copy the DVI docs too ...
98         cp -a `find Documentation -name '*.dvi' ! -name 'lily-[0-9]*.dvi'` \
99                 $(r_doc)/$(d)/
100         dh_installdocs
101         dh_installchangelogs
102         dh_link
103         dh_compress -Xusr/share/doc/lilypond/html/
104         dh_fixperms
105         dh_installdeb
106         dh_gencontrol
107         dh_md5sums
108         dh_builddeb
109
110 binary-arch: DH_OPTIONS=-a
111 binary-arch: build install
112         dh_testdir
113         dh_testroot
114         cp -av lilypond-mode.el lilypond-font-lock.el \
115                 $(r)/usr/share/emacs/site-lisp/
116         dh_installdocs DEDICATION NEWS ROADMAP *.txt
117
118 #       dh_installdocs DEDICATION NEWS ROADMAP *.txt \
119 #               Documentation/pictures/out/*.png
120 #               Documentation/out/*.txt
121 #               $(DVI_FILES) $(PS_FILES)
122 #       mkdir $(r)/$(d)/bibliography $(r)/$(d)/misc
123 #       cp -a Documentation/bibliography/*.bib $(r)/$(d)/bibliography/
124 #       cp -a Documentation/misc/[ACN]* $(r)/$(d)/misc/
125
126 #       dh_installexamples input
127         cp -aP `find input mutopia \( -name '*.*ly' -o -name '*.abc' -o -name '*.tex' -o -name 'TODO' \)` \
128                 $(r)/$(d)/examples
129         for i in `find $(r)/$(d)/examples/ -type d -name out`; do \
130                 mv -fv $$i/* $$i/..; rmdir $$i; done
131 #       dh_installmenu
132         dh_installemacsen
133 #       dh_installcron
134 #       dh_installman
135 #       dh_undocumented
136         dh_installchangelogs -k CHANGES
137         dh_link
138         dh_strip
139         dh_compress
140         dh_fixperms
141         dh_installdeb
142         dh_shlibdeps
143         dh_gencontrol
144 #       dh_makeshlibs
145         dh_md5sums
146         dh_builddeb
147
148 binary: binary-indep binary-arch
149 .PHONY: build clean install binary-indep binary-arch binary