]> git.donarmstrong.com Git - lilypond.git/blob - debian/rules
release: 1.0.17
[lilypond.git] / debian / rules
1 #!/usr/bin/make -f
2 # Made with the aid of debhelper by 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 SHELL = /bin/sh
13 r = debian/tmp
14 d = usr/doc/$(package)
15
16 # Uncomment this to turn on verbose mode.
17 #export DH_VERBOSE=1
18
19 build: build-stamp
20 build-stamp:
21         dh_testdir
22
23         CC=egcc ./configure --disable-checking --disable-debugging \
24                 --enable-printing --prefix=/usr --enable-optimise \
25                 --enable-shared
26         $(MAKE) all
27         # $(MAKE) htmldoc
28
29         touch build-stamp
30
31 clean:
32         dh_testdir
33         dh_testroot
34         rm -f build-stamp install-stamp
35         -$(MAKE) distclean
36
37         # Correct the owner of the out/dummy.dep files when built with sudo.
38         if [ -n "$$SUDO_USER" -a -n "$$SUDO_GID" ]; then \
39                 find . -user root | xargs -r chown $$SUDO_USER.$$SUDO_GID; \
40         else \
41                 find . -user root | xargs -r chown $$LOGNAME; \
42         fi
43
44         # Remove the following line once the *.make files are fixed
45         rm -f stepmake/bin/*.pyc
46         rm -f stepmake/stepmake/stepmake
47         rm -f stepmake/stepmake/bin
48         rm -f GNUmakefile stepmake/GNUmakefile
49         rm -f config.h
50         rm -f wwwlist
51
52         dh_clean
53
54 install: install-stamp
55 install-stamp: build-stamp
56         dh_testdir
57         dh_testroot
58         dh_clean -k
59         dh_installdirs usr/lib/texmf/doc \
60                 usr/lib/emacs/site-lisp \
61                 usr/doc/$(package)/examples
62         ln -fs ../../../doc/lilypond $(r)/usr/lib/texmf/doc/lilypond
63
64         $(MAKE) prefix=`pwd`/$(r)/usr install
65
66         touch install-stamp
67
68 # Build architecture-independent files here.
69 binary-indep: build install
70 # We have nothing to do by default.
71
72 binary-arch: build install
73         dh_testdir
74         dh_testroot
75         cp -av mudela-mode.el $(r)/usr/lib/emacs/site-lisp
76         dh_installdocs ANNOUNCEMENT ANNOUNCE-0.1 NEWS* DEDICATION \
77                 BUGS TODO *.txt \
78                 Documentation/pictures/*.xpm \
79                 Documentation/out/*.txt \
80                 Documentation/tex/*.doc \
81                 Documentation/tex/*.bib
82 #       dh_installexamples input
83         cp -aP `find input mutopia \( -name '*.ly' -o -name '*.tex' -o -name 'TODO' \)` \
84                 $(r)/$(d)/examples
85         for i in `find $(r)/$(d)/examples/ -type d -name out`; do \
86                 mv -fv $$i/* $$i/..; rmdir $$i; done
87 #       dh_installmenu
88 #       dh_installemacsen
89 #       dh_installcron
90 #       dh_installmanpages
91 #       dh_undocumented
92         dh_installchangelogs
93 #       dh_strip
94         dh_compress
95         ( cd $(r)/$(d) && \
96                 if [ -f NEWS ]; then gzip -9vf NEWS; fi )
97         ln -s NEWS.gz $(r)/$(d)/changelog.gz
98         dh_fixperms
99         dh_suidregister
100         dh_installdeb
101         dh_shlibdeps
102         dh_gencontrol
103 #       dh_makeshlibs
104         dh_md5sums
105         dh_builddeb
106
107 source diff:
108         @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
109
110 binary: binary-indep binary-arch
111 .PHONY: build clean install binary-indep binary-arch binary