]> git.donarmstrong.com Git - lilypond.git/blob - make/lilypond.redhat.spec.in
82a3cad1969ab1e2f3953e1f8661e89016568e07
[lilypond.git] / make / lilypond.redhat.spec.in
1 # -*- rpm-spec-mode -*-
2
3 %define info yes
4
5 Name: lilypond
6 Version: @TOPLEVEL_VERSION@
7 Release: 1
8 License: GPL
9 Group: Applications/Publishing
10 Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-@TOPLEVEL_VERSION@.tar.gz
11 Summary: Create and print music notation 
12 URL: http://www.lilypond.org/
13 BuildRoot: /tmp/lilypond-install
14
15 Buildrequires: t1utils bison flex pktrace texinfo
16 Requires: tetex  tetex-latex libstdc++ python 
17
18 %description
19 LilyPond lets you create music notation.  It produces
20 beautiful sheet music from  a high-level description file.
21
22 %package documentation
23 Summary: Prebuilt website containing all LilyPond documentation.
24 Group: Applications/Publishing
25 # BuildArchitectures: noarch
26
27 %description documentation
28
29 The documentation of LilyPond, both in HTML and PostScript.
30
31 %prep
32 %setup
33
34 %build
35
36 # DO NOT use % { configure } , it hardcodes all paths, runs libtool,
37 # so we can't do make prefix=/tmp/ install.
38
39 # In fact, do not take out the spaces between % and { in the above comment,
40 # because RPM will gladly do a substitution anyway.
41
42 ./configure --disable-checking --prefix=%{_prefix} --enable-optimise
43
44 make MAKE_PFA_FILES=1 all
45
46 # make info
47 make -C Documentation
48
49 # make  html
50 make web-doc top-web 
51
52 %install
53
54
55 rm -rf $RPM_BUILD_ROOT
56 mkdir -p $RPM_BUILD_ROOT/tmp/lilypond-rpm-doc
57
58 strip lily/out/lilypond 
59 make prefix="$RPM_BUILD_ROOT%{_prefix}" MAKE_PFA_FILES=1 install
60
61 %if info=="yes"
62 gzip -9fn $RPM_BUILD_ROOT%{_prefix}/info/*
63 %endif
64
65 mkdir -p $RPM_BUILD_ROOT/usr/share/emacs/site-lisp/site-start.d
66 install -m 644 lilypond-mode.el lilypond-font-lock.el lilypond-indent.el $RPM_BUILD_ROOT/usr/share/emacs/site-lisp/
67 install -m 644 lilypond-init.el $RPM_BUILD_ROOT/usr/share/emacs/site-lisp/site-start.d
68
69 gzip -9fn $RPM_BUILD_ROOT%{_prefix}/man/man1/*
70
71 mkdir -p $RPM_BUILD_ROOT%{_prefix}/../etc/profile.d
72 cp buildscripts/out/lilypond-profile $RPM_BUILD_ROOT%{_prefix}/../etc/profile.d/lilypond.sh
73 cp buildscripts/out/lilypond-login $RPM_BUILD_ROOT%{_prefix}/../etc/profile.d/lilypond.csh
74
75
76 # again, make sure that main package installs even if doco fails
77 mkdir -p web/out
78 tar -C web -xzf out/web.tar.gz 
79
80
81 %post
82
83 touch /tmp/.lilypond-install
84 rm `find /var/lib/texmf -name 'feta*pk' -or -name 'feta*tfm' -or -name 'parmesan*pk' -or -name 'parmesan*tfm' -print` /tmp/.lilypond-install
85
86 %if info=="yes"
87 /sbin/install-info %{_prefix}/info/lilypond.info.gz %{_prefix}/info/dir 
88 %endif
89
90
91 /usr/X11R6/bin/mkfontdir  /usr/share/lilypond/@TOPLEVEL_VERSION@/fonts/type1/
92 chkfontpath --add=/usr/share/lilypond/@TOPLEVEL_VERSION@/fonts/type1/
93
94 echo 'Please logout first before using LilyPond.'
95
96 %preun
97
98 %if info=="yes"
99 if [ $1 = 0 ]; then
100     /sbin/install-info --delete %{_prefix}/info/lilypond.info.gz %{_prefix}/info/dir 
101 fi
102 %endif
103
104 rm -f /usr/share/lilypond/@TOPLEVEL_VERSION@/fonts/type1/fonts.dir
105 chkfontpath --remove=/usr/share/lilypond/@TOPLEVEL_VERSION@/fonts/type1/
106
107 %files
108 %defattr(-, root, root)
109 %{_datadir}/emacs/site-lisp/lilypond-*
110 %{_datadir}/emacs/site-lisp/site-start.d/lilypond-*
111
112 %{_prefix}/bin/abc2ly
113 %{_prefix}/bin/as2text
114 %{_prefix}/bin/convert-ly
115 %{_prefix}/bin/etf2ly
116 %{_prefix}/bin/lilypond
117 %{_prefix}/bin/ly2dvi
118 %{_prefix}/bin/midi2ly
119 %{_prefix}/bin/lilypond-book
120 %{_prefix}/bin/mup2ly
121 %{_prefix}/bin/musedata2ly
122 %{_prefix}/bin/pmx2ly
123
124 %if info=="yes"
125 %{_prefix}/info/lilypond.info.gz
126 %{_prefix}/info/lilypond-internals.info.gz
127 %endif
128
129 %{_prefix}/man/man1/abc2ly.1.gz
130 %{_prefix}/man/man1/as2text.1.gz
131 %{_prefix}/man/man1/convert-ly.1.gz
132 %{_prefix}/man/man1/etf2ly.1.gz
133 %{_prefix}/man/man1/lilypond.1.gz
134 %{_prefix}/man/man1/ly2dvi.1.gz
135 %{_prefix}/man/man1/midi2ly.1.gz
136 %{_prefix}/man/man1/lilypond-book.1.gz
137 %{_prefix}/man/man1/musedata2ly.1.gz
138 %{_prefix}/man/man1/mup2ly.1.gz
139 %{_prefix}/man/man1/pmx2ly.1.gz
140
141 %{_prefix}/share/lilypond/@TOPLEVEL_VERSION@/
142 %{_prefix}/share/locale/*/LC_MESSAGES/lilypond.mo
143 %{_prefix}/../etc/profile.d/lilypond.*
144
145 %files documentation
146
147 %doc web/
148 %doc input/
149 %doc mutopia/