]> git.donarmstrong.com Git - lilypond.git/blob - make/lilypond.mandrake.spec.in
update-fix: deps and files.
[lilypond.git] / make / lilypond.mandrake.spec.in
1 %define info yes
2
3 %define name lilypond
4 %define version @TOPLEVEL_VERSION@
5 %define release 1mdk
6
7 Summary:        A program for printing sheet music.
8 Name:           %{name}
9 Version:        %{version}
10 Release:        %{release}
11 License:        GPL
12 Group:          Applications/Publishing
13 URL:            http://www.lilypond.org/
14 Source0:        ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-%{version}.tar.gz
15 BuildRoot:      %{_tmppath}/%{name}-buildroot
16 BuildRequires:  t1utils bison flex mftrace texinfo
17 Requires:       tetex tetex-latex python chkfontpath info-install XFree86
18
19 %description
20 LilyPond is a music typesetter.  It produces beautiful sheet music using a
21 high level description file as input.  Lilypond is part of the GNU project.
22  
23 LilyPond is split into two packages.  The package "lilypond" provides the
24 core package, containing the utilities for converting the music source
25 (.ly) files into printable output.  The package "lilypond-documentation" 
26 provides the full documentation, example .ly files for various features and 
27 the Mutopia project files (musical equivalent of the Gutenberg project - see
28 http://www.mutopiaproject.org for details).
29  
30 If you are new to lilypond, you will almost certainly want to install the
31 "lilypond-documentation" package in addition to the "lilypond" package.
32  
33 %package documentation
34 Summary: LilyPond documentation, examples and Mutopia files.
35 Group: Applications/Publishing
36 Requires: %{name}
37
38 %description documentation
39 The documentation of LilyPond, both in HTML and PostScript, along with
40 example input files and the files from the Mutopia project.
41
42 %prep
43 rm -rf $RPM_BUILD_ROOT
44
45 %setup
46
47 %build
48 # DO NOT use % { configure } , it hardcodes all paths, runs libtool,
49 # so we can't do make prefix=/tmp/ install.
50 # -- not sure what this comment means; it's a relic from the PPC spec file -- mbrown@fensystems.co.uk
51 ##./configure --disable-checking --disable-debugging --enable-printing --prefix=%{_prefix} --disable-optimising --enable-shared
52 ## Add options if needed
53 ./configure --disable-checking --prefix=%{_prefix} --enable-optimising
54 %make MAKE_PFA_FILES=1 all
55 make -C mf/ pfa
56
57 # make info
58 make -C Documentation
59
60 # make  html
61 make web-doc top-web 
62 make -C Documentation/user omf
63
64 %install
65
66 # Create installation root folders
67 rm -rf $RPM_BUILD_ROOT
68 RPM_DOC_ROOT=$RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
69 rm -rf $RPM_DOC_ROOT
70 mkdir -p $RPM_DOC_ROOT
71
72 strip lily/out/lilypond 
73 %makeinstall MAKE_PFA_FILES=1
74
75 %if %{info}
76   rm -f $RPM_BUILD_ROOT/%{_infodir}/dir
77   bzip2 $RPM_BUILD_ROOT%{_infodir}/*
78 %endif
79
80 mkdir -p $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/site-start.d
81 install -m 644 lilypond-mode.el lilypond-font-lock.el lilypond-indent.el lilypond.words $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/
82 install -m 644 lilypond-init.el $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/site-start.d
83
84 bzip2 $RPM_BUILD_ROOT%{_mandir}/man1/*
85
86 mkdir -p $RPM_BUILD_ROOT%{_prefix}/../etc/profile.d
87 cp buildscripts/out/lilypond-profile $RPM_BUILD_ROOT%{_prefix}/../etc/profile.d/lilypond.sh
88 cp buildscripts/out/lilypond-login $RPM_BUILD_ROOT%{_prefix}/../etc/profile.d/lilypond.csh
89
90
91 # again, make sure that main package installs even if doco fails
92 mkdir -p web/out
93 tar -C web -xzf out/web.tar.gz 
94
95 # Menu
96 # Every entry must be changed according package specifications
97 # Pay attention to "section" "command" and "longtitle"
98
99 mkdir -p $RPM_BUILD_ROOT%{_menudir}
100 cat >$RPM_BUILD_ROOT%{_menudir}/%{name} <<EOF
101 ?package(%name):\
102   command="info %{name}"\
103   needs="text"\
104   icon="%{name}.xpm"\
105   section="Documentation"\
106   title="%{name}-info"\
107   longtitle="%{name} Info"
108 EOF
109   
110 cat >$RPM_BUILD_ROOT%{_menudir}/%{name}-documentation <<EOF
111 ?package(%name):\
112   command="\$BROWSER %{_docdir}/%{name}-documentation-%{version}/web/index.html"\
113   needs="X11"\
114   icon="%{name}.xpm"\
115   section="Documentation"\
116   title="%{name}-documentation"\
117   longtitle="%{name} Documentation"
118 EOF
119
120 # icon
121 install -d $RPM_BUILD_ROOT/%{_miconsdir}
122 install -d $RPM_BUILD_ROOT/%{_iconsdir}
123 install -d $RPM_BUILD_ROOT/%{_liconsdir}
124 install -m 644 Documentation/pictures/%{name}-16x16.xpm $RPM_BUILD_ROOT/%{_miconsdir}/%{name}.xpm
125 install -m 644 Documentation/pictures/%{name}-32x32.xpm $RPM_BUILD_ROOT/%{_iconsdir}/%{name}.xpm
126 install -m 644 Documentation/pictures/%{name}-48x48.xpm $RPM_BUILD_ROOT/%{_liconsdir}/%{name}.xpm
127
128 %post
129 %{update_menus}
130
131 touch /tmp/.lilypond-install
132 rm `find /var/lib/texmf -name 'feta*pk' -or -name 'feta*tfm' -or -name 'parmesan*pk' -or -name 'parmesan*tfm' -print` /tmp/.lilypond-install
133
134 %if %{info}
135   /sbin/install-info --quiet %{_infodir}/lilypond.info.bz2 %{_infodir}/dir 
136 %endif
137
138 /usr/X11R6/bin/mkfontdir %{_datadir}/lilypond/%{version}/fonts/type1/
139 chkfontpath --add=%{_datadir}/lilypond/%{version}/fonts/type1/
140
141 %preun
142
143 %if %{info}
144   if [ $1 = 0 ]; then
145     /sbin/install-info --quiet --delete %{_infodir}/lilypond.info.bz2 %{_infodir}/dir 
146   fi
147 %endif
148
149 rm -f %{_datadir}/lilypond/%{version}/fonts/type1/fonts.dir
150 chkfontpath --remove=%{_datadir}/lilypond/%{version}/fonts/type1/
151
152 %post documentation
153 scrollkeeper-update
154
155 %postun documentation
156 scrollkeeper-update
157
158 %postun
159 %{clean_menus}
160
161 %clean
162 rm -rf $RPM_BUILD_ROOT
163
164 %files
165 %defattr(-, root, root)
166 %doc COPYING README.txt INSTALL.txt DEDICATION NEWS AUTHORS.txt THANKS
167
168 %{_datadir}/emacs/site-lisp/site-start.d/lilypond-*
169 %{_datadir}/emacs/site-lisp/lilypond*
170
171 %if %{info}
172   %{_infodir}/*
173 %endif
174
175 %{_datadir}/%{name}/%{version}/
176 %{_datadir}/locale/*/LC_MESSAGES/lilypond.mo
177 %{_prefix}/../etc/profile.d/lilypond.*
178 %_bindir/*
179 %_mandir/*
180 %_menudir/*
181 %_iconsdir/*
182
183 %{_libdir}/lilypond/
184
185 %files documentation
186 %defattr(-, root, root)
187
188 %{_docdir}/lilypond-@TOPLEVEL_VERSION@/*
189 %{_datadir}/omf/lilypond/@TOPLEVEL_VERSION@/*
190
191 %changelog
192 * Thu Jun 12 2003 Heikki Johannes Junes <hjunes@cc.hut.fi> 1.7.20-1mdk
193 - refreshed dependencies and file list.
194
195 * Fri Dec 01 2002 Heikki Johannes Junes <hjunes@cc.hut.fi> 1.7.9-1mdk
196 - set menu-items to lilypond-info and lilypond-documentation.
197
198 * Fri Nov 30 2002 Heikki Johannes Junes <hjunes@cc.hut.fi> 1.7.8-4mdk
199 - add pre/post-dependencies and menus with icon from source.
200
201 * Fri Oct 28 2002 Heikki Johannes Junes <hjunes@cc.hut.fi> 1.7.4-1mdk
202 - info, commented menu
203
204 * Fri Aug 30 2002 Heikki Johannes Junes <hjunes@cc.hut.fi> 1.6.0-1mdk
205 - Adapted from lilypond.redhat.skel and skeleton found in Mandrake's RPM-docs.
206 - TODO: info (?) and dependencies.
207
208 * Fri Jun 01 2001 Lenny Cartier <lenny@mandrakesoft.com> 1.4.2-1mdk
209 - updated by Michael Brown <mbrown@linux-mandrake.com> :
210         - Upgraded to 1.4.2
211         - Changed URL
212         - Removed /etc/profile.d scripts: all TeX bits are now located properly
213         - Rearranged documentation
214         - Tidied spec file
215         - Updated README.first
216
217 * Mon Feb 26 2001 Lenny Cartier <lenny@mandrakesoft.com> 1.3.129-1mdk
218 - added in contribs by Michael Brown <mbrown@fensystems.co.uk> :
219         - Removed info files completely (couldn't get info reader to read them)
220         - TODO: Get this to work at some point (in the meantime, use documentation in lilypond-extras)
221
222 * Sat Feb 17 2001 Michael Brown <mbrown@fensystems.co.uk>
223 - Moved TeX font folders into the system TeX tree (this ensures that the /var/lib/texmf font cache is used instead of current folder)
224 - Added mktexlsr to post-install and post-uninstall scripts
225 - Patched scripts in /etc/profile.d to reflect changes to font locations
226 - Added QuickStart guide and Points to note sections to README.first (well worth reading)
227 - Fixed install-info and uninstall-info sections to use Mandrake's RPM macros :-)
228
229 * Tue Feb 13 2001 Michael Brown <mbrown@fensystems.co.uk>
230 - First Mandrake package
231 - spec file heavily adapted from PowerPC contribs.
232 - Note HTML documentation may contain duff links and may be incomplete.  Lots of warnings appear when building HTML docs.
233 - PostScript documentation is duplicated (how do you get an rpm package to contain a symlink?)
234 - Created README.first file