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