]> git.donarmstrong.com Git - lilypond.git/blob - debian/rules
Ditch useless links (Closes: #522120)
[lilypond.git] / debian / rules
1 #!/usr/bin/make -f
2 # debian/rules for LilyPond in Debian.
3 #
4 # This is free software; see the GNU General Public Licence
5 # version 2 or later for copying conditions.  There is NO warranty.
6 #
7 # Currently maintained by Anthony Fok <foka@debian.org>
8 # for Debian GNU/Linux.
9
10 package = lilypond
11
12 SHELL = /bin/sh
13 r = debian/$(package)
14 r_data = debian/$(package)-data
15 r_doc = debian/$(package)-doc
16 d = usr/share/doc/$(package)
17
18 # since I'm building this a few times on my 8-way machine, try to
19 # build it faster
20 ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
21     NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
22     MAKEFLAGS += -j$(NUMJOBS) CPU_COUNT=$(NUMJOBS)
23 endif
24
25
26 include VERSION
27 VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL)
28
29 # "main_memory = 263000" in /etc/texmf/texmf.cnf isn't large enough
30 # for latex to process standchen.dvi.latex, so adding extra_mem_* ...
31 # export extra_mem_top = 100000
32 # export extra_mem_bot = 100000
33 # But now, building lilypond.dvi requires increased pool_size (2002-02-18)
34 # export pool_size = 500000
35 # But now, it seems that none of the above is needed in 1.4.11  (2002-02-24)
36 export MODE = ljfour
37 export BDPI = 600
38 export USER_CFLAGS = -DDEBIAN
39 export DEB_BUILD = yes
40 export MAILADDRESS = lilypond@packages.debian.org
41
42 # fontconfig blows chunks if it can't write $HOME; and some buildd's
43 # set it to a bogus value.
44 export HOME = /tmp
45
46 # Uncomment this to turn on verbose mode.
47 #export DH_VERBOSE=1
48
49 # This has to be exported to make some magic below work.
50 export DH_OPTIONS
51
52 build: build-stamp
53 build-stamp:
54         dh_testdir
55
56         cp -f /usr/share/misc/config.guess /usr/share/misc/config.sub ./stepmake/bin/
57         ./configure --disable-checking --enable-debugging \
58                 --prefix=/usr --enable-optimising \
59                 --infodir='$${prefix}/share/info' \
60                 --mandir='$${prefix}/share/man'
61         $(MAKE)
62         $(MAKE) test;
63
64         touch build-stamp
65
66 build-doc: build build-doc-stamp
67 build-doc-stamp:
68         dh_testdir
69
70         # make html
71         # unfortunatly, this does not work well with multiple processors
72         $(MAKE) -j1 doc WEB_TARGETS="offline"
73         # make info
74         $(MAKE) info
75
76         touch build-doc-stamp
77
78 clean:
79         dh_testdir
80         dh_testroot
81         rm -f build-stamp build-doc-stamp
82         [ ! -f Makefile ] || $(MAKE) web-clean
83         [ ! -f Makefile ] || $(MAKE) distclean
84         rm -f lib/python
85         rm -f ./stepmake/bin/config.guess ./stepmake/bin/config.guess.sub ./stepmake/bin/config.sub
86
87         # Still not clean enough?  Let's use... BRUTE STRENGTH!  :-)
88         find . -type d -name 'out' -o -name 'out-www' | xargs rm -rf
89         rm -f buildscripts/*.pyc
90         rm -f lib/lilypond/python examples.html
91         rm -f debian/emacsen-startup
92         rm -f debian/lilypond1.7*.dirs debian/lilypond.dirs
93         rm -f debian/postinst debian/prerm debian/postrm
94         rm -f debian/lilypond-data.doc-base debian/lilypond.doc-base
95         rm -f GNUmakefile config.log config.make config.status config.hh
96
97         dh_clean
98
99 install: DH_OPTIONS=
100 install: build
101         dh_testdir
102         dh_testroot
103         dh_clean -k
104         dh_installdirs
105
106         # Add here commands to install the package into debian/tmp.
107         $(MAKE) install prefix=$(CURDIR)/debian/tmp/usr
108
109         dh_install --sourcedir=debian/tmp --list-missing
110
111 # Build architecture-independent files here.
112 binary-indep: DH_OPTIONS=-i
113 binary-indep: build-doc install
114         dh_testdir
115         dh_testroot
116         # Install LilyPond web documentation...
117         $(MAKE) install-doc prefix=$(CURDIR)/debian/lilypond-doc/usr/
118         # it installs a random dir-dep file for no reason
119         rm -f $(CURDIR)/debian/lilypond-doc/usr/share/info/*-dir-dep*
120
121         dh_installdocs
122         find $(CURDIR)/debian/lilypond-doc/usr/share/doc/lilypond/html \
123                 -type d -empty -delete
124         dh_installemacsen
125
126         install -m 644 debian/xiao-haizi-guai-guai.ly debian/sakura-sakura.ly \
127                 $(r_data)/$(d)/examples
128         dh_installchangelogs
129
130         dh_link usr/share/lilypond/$(VERSION)/tex \
131                         usr/share/texmf/tex/lilypond \
132                 usr/share/lilypond/$(VERSION)/fonts/source \
133                         usr/share/texmf/fonts/source/public/lilypond \
134                 usr/share/lilypond/$(VERSION)/fonts/type1 \
135                         usr/share/texmf/fonts/type1/public/lilypond \
136
137         dh_pysupport /usr/share/lilypond/${VERSION}/python
138
139         dh_compress -X$(d)/html/
140         dh_fixperms
141         dh_installdeb
142         dh_gencontrol
143         dh_md5sums
144         dh_builddeb
145
146 binary-arch: DH_OPTIONS=-s
147 binary-arch: build install
148         dh_testdir
149         dh_testroot
150         dh_installdocs AUTHORS.txt NEWS.txt README.txt \
151                 DEDICATION THANKS 
152
153
154         dh_installemacsen
155         dh_installchangelogs Documentation/misc/CHANGES* Documentation/misc/ChangeLog*
156
157         dh_strip
158         dh_pysupport /usr/share/lilypond/${VERSION}/python
159         dh_compress
160         dh_fixperms
161         dh_installdeb
162         dh_shlibdeps
163         dh_gencontrol
164         dh_md5sums
165         dh_builddeb
166
167 binary: binary-indep binary-arch
168 .PHONY: build clean install binary-indep binary-arch binary