]> git.donarmstrong.com Git - lilypond.git/blob - make/lilypond.fedora.spec.in
fafd9cd376d9df3969c95eae2c271d48d225f07e
[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/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 # compile with static libstdc++ for better platform portability.
56 ./configure --enable-static-gxx --disable-checking --prefix=%{_prefix} --enable-optimising
57
58
59 make -j2 all
60 make web
61 make -C Documentation/user local_package_docdir=%{docdir} omf
62
63 %install
64
65
66 rm -rf $RPM_BUILD_ROOT
67 mkdir -p $RPM_BUILD_ROOT/tmp/lilypond-rpm-doc
68
69 make prefix="$RPM_BUILD_ROOT%{_prefix}" \
70         infodir="$RPM_BUILD_ROOT%{_infodir}"  \
71         mandir="$RPM_BUILD_ROOT%{_mandir}" install
72
73 #emacs
74 mkdir -p $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/site-start.d
75 install -m 644 elisp/lilypond-init.el  $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/site-start.d
76
77 #manual pages
78 gzip -9fn $RPM_BUILD_ROOT%{_mandir}/man1/*
79
80
81 # profile scripts.
82
83
84 # web doc
85 make prefix="$RPM_BUILD_ROOT%{_prefix}" \
86   infodir="$RPM_BUILD_ROOT%{_infodir}"  \
87   webdir="$RPM_BUILD_ROOT%{_prefix}/share/doc/lilypond/" web-install
88
89 ln -sf ../../doc/lilypond/Documentation/user/*png $RPM_BUILD_ROOT%{_infodir}/lilypond/
90
91 # info 
92 %if %{info}
93 rm -f $RPM_BUILD_ROOT/%{_infodir}/dir
94 gzip -9fn `find $RPM_BUILD_ROOT%{_infodir}/ -name '*.info'`
95 %endif
96
97
98
99 %post
100
101 touch /tmp/.lilypond-install
102
103 %if %{info}
104   /sbin/install-info %{_infodir}/lilypond/lilypond.info.gz %{_infodir}/dir 
105   /sbin/install-info %{_infodir}/lilypond/lilypond-internals.info.gz %{_infodir}/dir 
106   /sbin/install-info %{_infodir}/lilypond/music-glossary.info.gz %{_infodir}/dir 
107 %endif
108
109 export PACKAGEDIR=%{_datadir}/lilypond/@TOPLEVEL_VERSION@
110 if [ -d /usr/share/vim ]; then
111   VIMDIR=`find /usr/share/vim -name bugreport.vim`
112   VIMDIR=`dirname $VIMDIR`
113   for a in `cd $PACKAGEDIR/vim/ ; find -type d -name '*' ` ; do
114      mkdir -p  $VIMDIR/$a
115      ln -s $PACKAGEDIR/vim/$a/*.vim $VIMDIR/$a/
116   done
117 fi
118
119
120 %preun
121 if [ -f /usr/share/lilypond/%{version}/ls-R ]; then
122   rm -f /usr/share/lilypond/%{version}/ls-R
123 fi
124
125
126 if [ -d /usr/share/vim ]; then
127         rm `find /usr/share/vim -name 'lilypond*.vim'`
128 fi
129
130
131 %if %{info}
132     /sbin/install-info --delete %{_infodir}/lilypond/lilypond.info.gz %{_infodir}/dir 
133     /sbin/install-info --delete %{_infodir}/lilypond/lilypond-internals.info.gz %{_infodir}/dir 
134     /sbin/install-info --delete %{_infodir}/lilypond/music-glossary.info.gz %{_infodir}/dir 
135 %endif
136
137 # chkfontpath --remove=%{_datadir}/share/lilypond/@TOPLEVEL_VERSION@/fonts/type1n/
138
139 %postun
140
141 %post documentation
142 scrollkeeper-update
143
144 %postun documentation
145 scrollkeeper-update
146
147
148
149 %files
150 %defattr(-, root, root)
151 %{_datadir}/emacs/site-lisp/lilypond*
152 %{_datadir}/emacs/site-lisp/site-start.d/lilypond*
153
154 %{_bindir}/abc2ly
155 %{_bindir}/convert-ly
156 %{_bindir}/etf2ly
157 %{_bindir}/lilypond
158 %{_bindir}/midi2ly
159 %{_bindir}/lilypond-book
160 %{_bindir}/mup2ly
161 %{_bindir}/musicxml2ly
162 %{_bindir}/lilypond-invoke-editor
163
164 %doc THANKS
165 %doc COPYING
166 %doc DEDICATION
167 %doc README.txt
168 %doc AUTHORS.txt
169 %doc INSTALL.txt
170 %doc NEWS.txt
171
172 %if %{info}
173 %{_infodir}/lilypond/
174 %endif
175
176 %{_mandir}/man1/abc2ly.1.gz
177 %{_mandir}/man1/musicxml2ly.1.gz
178 %{_mandir}/man1/convert-ly.1.gz
179 %{_mandir}/man1/etf2ly.1.gz
180 %{_mandir}/man1/lilypond.1.gz
181 %{_mandir}/man1/midi2ly.1.gz
182 %{_mandir}/man1/lilypond-book.1.gz
183 %{_mandir}/man1/mup2ly.1.gz
184 %{_mandir}/man1/lilypond-invoke-editor.1.gz
185
186 %{_datadir}/lilypond/@TOPLEVEL_VERSION@/
187 %{_datadir}/locale/*/LC_MESSAGES/lilypond.mo
188 %{_libdir}/lilypond/
189
190
191 %files documentation
192
193 %defattr(-, root, root)
194
195 %{docdir}
196 %{_datadir}/omf/lilypond/@TOPLEVEL_VERSION@
197
198
199 %clean
200 rm -rf %{buildroot