]> git.donarmstrong.com Git - lilypond.git/blob - make/lilypond.fedora.spec.in
* Documentation/user/instrument-notation.itely (String number
[lilypond.git] / make / lilypond.fedora.spec.in
1 # -*-rpm-spec-mode-*-
2
3 %define info yes
4 %define docdir %{_docdir}/lilypond/
5
6 Name: lilypond
7 Version: @TOPLEVEL_VERSION@
8 Release: 1
9 License: GPL
10 Group: Applications/Publishing
11 Source0: ftp.lilypond.org:/pub/LilyPond/development/lilypond-@TOPLEVEL_VERSION@.tar.gz
12 Summary: Create and print music notation 
13 URL: http://www.lilypond.org/
14 BuildRoot: %{_tmppath}/%{name}-%{version}-root
15
16
17 Buildrequires: t1utils bison flex mftrace ImageMagick
18 Buildrequires: texinfo >= 4.7
19 Buildrequires: guile-devel >= 1.6.4-8 
20 Buildrequires: freetype-devel >= 2.1
21
22 Buildrequires: fontforge
23 #fontforge must be >= 20041211 urg. 0.0.0-fdr.1.20041211
24
25 Buildrequires: pango-devel >= 1.6.0
26 Buildrequires: fontconfig-devel
27
28 Requires: libstdc++ python 
29 Requires: guile >= 1.6.4-8 ghostscript >= 8.15
30
31 %description
32 LilyPond lets you create music notation.  It produces
33 beautiful sheet music from  a high-level description file.
34
35 %package documentation
36 Summary:  All LilyPond documentation, in HTML
37 Group: Applications/Publishing
38 # BuildArchitectures: noarch
39
40 %description documentation
41 Documentation and example files of LilyPond. An index is available at
42 %{docdir}/web/Documentation/out-www/index.html
43
44 %prep
45 %setup
46
47 %build
48
49 # DO NOT use % { configure } , it hardcodes all paths, runs libtool,
50 # so we can't do make prefixix=/tmp/ install.
51
52 # In fact, do not take out the spaces between % and { in the above comment,
53 # because RPM will gladly do a substitution anyway.
54
55 ./configure --without-kpathsea --disable-checking --prefix=%{_prefix} --enable-optimising
56
57
58 make all
59 make web
60 make -C Documentation/user local_package_docdir=%{docdir} omf
61
62 %install
63
64
65 rm -rf $RPM_BUILD_ROOT
66 mkdir -p $RPM_BUILD_ROOT/tmp/lilypond-rpm-doc
67
68 make prefix="$RPM_BUILD_ROOT%{_prefix}" \
69         infodir="$RPM_BUILD_ROOT%{_infodir}"  \
70         mandir="$RPM_BUILD_ROOT%{_mandir}" install
71
72 #emacs
73 mkdir -p $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/site-start.d
74 install -m 644 elisp/lilypond-init.el  $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/site-start.d
75
76 #manual pages
77 gzip -9fn $RPM_BUILD_ROOT%{_mandir}/man1/*
78
79
80 # profile scripts.
81 mkdir -p $RPM_BUILD_ROOT/etc/profile.d
82 cp buildscripts/out/lilypond-profile $RPM_BUILD_ROOT/etc/profile.d/lilypond.sh
83 cp buildscripts/out/lilypond-login $RPM_BUILD_ROOT/etc/profile.d/lilypond.csh
84
85 # web doc
86 make prefix="$RPM_BUILD_ROOT%{_prefix}" \
87   infodir="$RPM_BUILD_ROOT%{_infodir}"  \
88   webdir="$RPM_BUILD_ROOT%{_prefix}/share/doc/lilypond/" web-install
89
90 ln -sf ../../doc/lilypond/Documentation/user/out-www/*png $RPM_BUILD_ROOT%{_infodir}/lilypond/
91
92 # info 
93 %if %{info}
94 rm -f $RPM_BUILD_ROOT/%{_infodir}/dir
95 gzip -9fn `find $RPM_BUILD_ROOT%{_infodir}/ -name '*.info'`
96 %endif
97
98
99
100 %post
101
102 touch /tmp/.lilypond-install
103 rm `find /var/lib/texmf -name 'feta*pk' -or -name 'feta*tfm' -or -name 'parmesan*pk' -or -name 'parmesan*tfm' -print` /tmp/.lilypond-install
104
105 %if %{info}
106 /sbin/install-info %{_infodir}/lilypond/lilypond.info.gz %{_infodir}/dir 
107 /sbin/install-info %{_infodir}/lilypond/music-glossary.info.gz %{_infodir}/dir 
108 %endif
109
110 export PACKAGEDIR=%{_datadir}/lilypond/@TOPLEVEL_VERSION@
111 if [ -d /usr/share/vim ]; then
112   VIMDIR=`find /usr/share/vim -name bugreport.vim`
113   VIMDIR=`dirname $VIMDIR`
114   for a in `cd $PACKAGEDIR/vim/ ; find -type d -name '*' ` ; do
115      mkdir -p  $VIMDIR/$a
116      ln -s $PACKAGEDIR/vim/$a/*.vim $VIMDIR/$a/
117   done
118 fi
119
120
121 # chkfontpath --add=%{_datadir}/lilypond/@TOPLEVEL_VERSION@/fonts/type1/
122
123 echo 'Logout first before using LilyPond.'
124
125 %preun
126 if [ -f /usr/share/lilypond/%{version}/ls-R ]; then
127   rm -f /usr/share/lilypond/%{version}/ls-R
128 fi
129
130
131 if [ -d /usr/share/vim ]; then
132         rm `find /usr/share/vim -name 'lilypond*.vim'`
133 fi
134
135
136 %if %{info}
137     /sbin/install-info --delete %{_infodir}/lilypond/lilypond.info.gz %{_infodir}/dir 
138     /sbin/install-info --delete %{_infodir}/lilypond/music-glossary.info.gz %{_infodir}/dir 
139 %endif
140
141 # chkfontpath --remove=%{_datadir}/share/lilypond/@TOPLEVEL_VERSION@/fonts/type1n/
142
143 %postun
144
145 %post documentation
146 scrollkeeper-update
147
148 %postun documentation
149 scrollkeeper-update
150
151
152
153 %files
154 %defattr(-, root, root)
155 %{_datadir}/emacs/site-lisp/lilypond*
156 %{_datadir}/emacs/site-lisp/site-start.d/lilypond*
157
158 %{_bindir}/abc2ly
159 %{_bindir}/convert-ly
160 %{_bindir}/etf2ly
161 %{_bindir}/lilypond
162 %{_bindir}/midi2ly
163 %{_bindir}/lilypond-book
164 %{_bindir}/mup2ly
165 %{_bindir}/ps2png
166 %{_bindir}/lilypond-pdfpc-helper
167
168 %doc THANKS
169 %doc COPYING
170 %doc DEDICATION
171 %doc README.txt
172 %doc AUTHORS.txt
173 %doc INSTALL.txt
174 %doc NEWS.txt
175
176 %if %{info}
177 %{_infodir}/lilypond/
178 %endif
179
180 %{_mandir}/man1/abc2ly.1.gz
181 %{_mandir}/man1/convert-ly.1.gz
182 %{_mandir}/man1/etf2ly.1.gz
183 %{_mandir}/man1/lilypond.1.gz
184 %{_mandir}/man1/midi2ly.1.gz
185 %{_mandir}/man1/lilypond-book.1.gz
186 %{_mandir}/man1/mup2ly.1.gz
187 %{_mandir}/man1/ps2png.1.gz
188 %{_mandir}/man1/lilypond-pdfpc-helper.1.gz
189
190 %{_datadir}/lilypond/@TOPLEVEL_VERSION@/
191 %{_datadir}/locale/*/LC_MESSAGES/lilypond.mo
192
193 %{_libdir}/lilypond/
194
195 /etc/profile.d/lilypond.*
196
197
198 %files documentation
199
200 %defattr(-, root, root)
201
202 %{docdir}
203 %{_datadir}/omf/lilypond/@TOPLEVEL_VERSION@
204
205