]> git.donarmstrong.com Git - lilypond.git/blob - make/lilypond.fedora.spec.in
0e451546e01a2e7382a87b31fbf74dd1d662ad79
[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: http://lilypond.org/download/development/lilypond-@TOPLEVEL_VERSION@.tar.gz
12 Summary: Create and print music notation 
13 URL: http://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
82
83 # web doc
84 make prefix="$RPM_BUILD_ROOT%{_prefix}" \
85   infodir="$RPM_BUILD_ROOT%{_infodir}"  \
86   webdir="$RPM_BUILD_ROOT%{_prefix}/share/doc/lilypond/" web-install
87
88 ln -sf ../../doc/lilypond/Documentation/user/out-www/*png $RPM_BUILD_ROOT%{_infodir}/lilypond/
89
90 # info 
91 %if %{info}
92 rm -f $RPM_BUILD_ROOT/%{_infodir}/dir
93 gzip -9fn `find $RPM_BUILD_ROOT%{_infodir}/ -name '*.info'`
94 %endif
95
96
97
98 %post
99
100 touch /tmp/.lilypond-install
101
102 %if %{info}
103 /sbin/install-info %{_infodir}/lilypond/lilypond.info.gz %{_infodir}/dir 
104 /sbin/install-info %{_infodir}/lilypond/music-glossary.info.gz %{_infodir}/dir 
105 %endif
106
107 export PACKAGEDIR=%{_datadir}/lilypond/@TOPLEVEL_VERSION@
108 if [ -d /usr/share/vim ]; then
109   VIMDIR=`find /usr/share/vim -name bugreport.vim`
110   VIMDIR=`dirname $VIMDIR`
111   for a in `cd $PACKAGEDIR/vim/ ; find -type d -name '*' ` ; do
112      mkdir -p  $VIMDIR/$a
113      ln -s $PACKAGEDIR/vim/$a/*.vim $VIMDIR/$a/
114   done
115 fi
116
117
118 %preun
119 if [ -f /usr/share/lilypond/%{version}/ls-R ]; then
120   rm -f /usr/share/lilypond/%{version}/ls-R
121 fi
122
123
124 if [ -d /usr/share/vim ]; then
125         rm `find /usr/share/vim -name 'lilypond*.vim'`
126 fi
127
128
129 %if %{info}
130     /sbin/install-info --delete %{_infodir}/lilypond/lilypond.info.gz %{_infodir}/dir 
131     /sbin/install-info --delete %{_infodir}/lilypond/music-glossary.info.gz %{_infodir}/dir 
132 %endif
133
134 # chkfontpath --remove=%{_datadir}/share/lilypond/@TOPLEVEL_VERSION@/fonts/type1n/
135
136 %postun
137
138 %post documentation
139 scrollkeeper-update
140
141 %postun documentation
142 scrollkeeper-update
143
144
145
146 %files
147 %defattr(-, root, root)
148 %{_datadir}/emacs/site-lisp/lilypond*
149 %{_datadir}/emacs/site-lisp/site-start.d/lilypond*
150
151 %{_bindir}/abc2ly
152 %{_bindir}/convert-ly
153 %{_bindir}/etf2ly
154 %{_bindir}/lilypond
155 %{_bindir}/midi2ly
156 %{_bindir}/lilypond-book
157 %{_bindir}/mup2ly
158 %{_bindir}/lilypond-ps2png
159 %{_bindir}/lilypond-pdfpc-helper
160 %{_bindir}/lilypond-invoke-editor
161
162 %doc THANKS
163 %doc COPYING
164 %doc DEDICATION
165 %doc README.txt
166 %doc AUTHORS.txt
167 %doc INSTALL.txt
168 %doc NEWS.txt
169
170 %if %{info}
171 %{_infodir}/lilypond/
172 %endif
173
174 %{_mandir}/man1/abc2ly.1.gz
175 %{_mandir}/man1/convert-ly.1.gz
176 %{_mandir}/man1/etf2ly.1.gz
177 %{_mandir}/man1/lilypond.1.gz
178 %{_mandir}/man1/midi2ly.1.gz
179 %{_mandir}/man1/lilypond-book.1.gz
180 %{_mandir}/man1/mup2ly.1.gz
181 %{_mandir}/man1/lilypond-ps2png.1.gz
182 %{_mandir}/man1/lilypond-pdfpc-helper.1.gz
183 %{_mandir}/man1/lilypond-invoke-editor.1.gz
184
185 %{_datadir}/lilypond/@TOPLEVEL_VERSION@/
186 %{_datadir}/locale/*/LC_MESSAGES/lilypond.mo
187
188 %{_libdir}/lilypond/
189
190
191 %files documentation
192
193 %defattr(-, root, root)
194
195 %{docdir}
196 %{_datadir}/omf/lilypond/@TOPLEVEL_VERSION@