]> 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
22 #fontforge must be >= 20041211 urg. 0.0.0-fdr.1.20041211
23
24 Requires: tetex  tetex-latex libstdc++ python  tetex-dvips tetex-latex
25 Requires: guile >= 1.6.4-8 ghostscript >= 8.15
26
27 %description
28 LilyPond lets you create music notation.  It produces
29 beautiful sheet music from  a high-level description file.
30
31 %package documentation
32 Summary:  All LilyPond documentation, in HTML
33 Group: Applications/Publishing
34 # BuildArchitectures: noarch
35
36 %description documentation
37 Documentation and example files of LilyPond. An index is available at
38 %{docdir}/web/Documentation/out-www/index.html
39
40 %prep
41 %setup
42
43 %build
44
45 # DO NOT use % { configure } , it hardcodes all paths, runs libtool,
46 # so we can't do make prefixix=/tmp/ install.
47
48 # In fact, do not take out the spaces between % and { in the above comment,
49 # because RPM will gladly do a substitution anyway.
50
51 ./configure --disable-checking --prefix=%{_prefix} --enable-optimising
52
53
54 make all
55 make web
56 make -C Documentation/user local_package_docdir=%{docdir} omf
57
58 %install
59
60
61 rm -rf $RPM_BUILD_ROOT
62 mkdir -p $RPM_BUILD_ROOT/tmp/lilypond-rpm-doc
63
64 make prefix="$RPM_BUILD_ROOT%{_prefix}" \
65         infodir="$RPM_BUILD_ROOT%{_infodir}"  \
66         mandir="$RPM_BUILD_ROOT%{_mandir}" install
67
68 #emacs
69 mkdir -p $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/site-start.d
70 install -m 644 elisp/lilypond-init.el  $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/site-start.d
71
72 #manual pages
73 gzip -9fn $RPM_BUILD_ROOT%{_mandir}/man1/*
74
75
76 # profile scripts.
77 mkdir -p $RPM_BUILD_ROOT/etc/profile.d
78 cp buildscripts/out/lilypond-profile $RPM_BUILD_ROOT/etc/profile.d/lilypond.sh
79 cp buildscripts/out/lilypond-login $RPM_BUILD_ROOT/etc/profile.d/lilypond.csh
80
81 # web doc
82 make prefix="$RPM_BUILD_ROOT%{_prefix}" \
83   infodir="$RPM_BUILD_ROOT%{_infodir}"  \
84   webdir="$RPM_BUILD_ROOT%{_prefix}/share/doc/lilypond/" web-install
85
86 ln -sf ../../doc/lilypond/Documentation/user/out-www/*png $RPM_BUILD_ROOT%{_infodir}/lilypond/
87
88 # info 
89 %if %{info}
90 rm -f $RPM_BUILD_ROOT/%{_infodir}/dir
91 gzip -9fn `find $RPM_BUILD_ROOT%{_infodir}/ -name '*.info'`
92 %endif
93
94
95
96 %post
97
98 touch /tmp/.lilypond-install
99 rm `find /var/lib/texmf -name 'feta*pk' -or -name 'feta*tfm' -or -name 'parmesan*pk' -or -name 'parmesan*tfm' -print` /tmp/.lilypond-install
100
101 %if %{info}
102 /sbin/install-info %{_infodir}/lilypond/lilypond.info.gz %{_infodir}/dir 
103 /sbin/install-info %{_infodir}/lilypond/music-glossary.info.gz %{_infodir}/dir 
104 %endif
105
106 export PACKAGEDIR=%{_datadir}/lilypond/@TOPLEVEL_VERSION@
107 if [ -d /usr/share/vim ]; then
108   VIMDIR=`find /usr/share/vim -name bugreport.vim`
109   VIMDIR=`dirname $VIMDIR`
110   for a in `cd $PACKAGEDIR/vim/ ; find -type d -name '*' ` ; do
111      mkdir -p  $VIMDIR/$a
112      ln -s $PACKAGEDIR/vim/$a/*.vim $VIMDIR/$a/
113   done
114 fi
115
116
117 # chkfontpath --add=%{_datadir}/lilypond/@TOPLEVEL_VERSION@/fonts/type1/
118
119 echo 'Logout first before using LilyPond.'
120
121 %preun
122 if [ -f /usr/share/lilypond/%{version}/ls-R ]; then
123   rm -f /usr/share/lilypond/%{version}/ls-R
124 fi
125
126
127 if [ -d /usr/share/vim ]; then
128         rm `find /usr/share/vim -name 'lilypond*.vim'`
129 fi
130
131
132 %if %{info}
133     /sbin/install-info --delete %{_infodir}/lilypond/lilypond.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}/ps2png
162 %{_bindir}/lilypond-pdfpc-helper
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/convert-ly.1.gz
178 %{_mandir}/man1/etf2ly.1.gz
179 %{_mandir}/man1/lilypond.1.gz
180 %{_mandir}/man1/midi2ly.1.gz
181 %{_mandir}/man1/lilypond-book.1.gz
182 %{_mandir}/man1/mup2ly.1.gz
183 %{_mandir}/man1/ps2png.1.gz
184 %{_mandir}/man1/lilypond-pdfpc-helper.1.gz
185
186 %{_datadir}/lilypond/@TOPLEVEL_VERSION@/
187 %{_datadir}/locale/*/LC_MESSAGES/lilypond.mo
188
189 %{_libdir}/lilypond/
190
191 /etc/profile.d/lilypond.*
192
193
194 %files documentation
195
196 %defattr(-, root, root)
197
198 %{docdir}
199 %{_datadir}/omf/lilypond/@TOPLEVEL_VERSION@
200
201