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