]> git.donarmstrong.com Git - lilypond.git/blob - make/lilypond.redhat.spec.in
0ba1deab1ee3736f1188b1d9ed401d278778a061
[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
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
52 # make info
53 make -C Documentation
54
55 # make  html
56 make web
57 make -C Documentation/user local_package_docdir=%{docdir} omf
58
59 %install
60
61
62 rm -rf $RPM_BUILD_ROOT
63 mkdir -p $RPM_BUILD_ROOT/tmp/lilypond-rpm-doc
64
65 make prefix="$RPM_BUILD_ROOT%{_prefix}" \
66         infodir="$RPM_BUILD_ROOT%{_infodir}"  \
67         mandir="$RPM_BUILD_ROOT%{_mandir}" install
68
69 #emacs
70 mkdir -p $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/site-start.d
71 install -m 644 elisp/lilypond-init.el  $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/site-start.d
72
73 #manual pages
74 gzip -9fn $RPM_BUILD_ROOT%{_mandir}/man1/*
75
76
77 # profile scripts.
78 mkdir -p $RPM_BUILD_ROOT/etc/profile.d
79 cp buildscripts/out/lilypond-profile $RPM_BUILD_ROOT/etc/profile.d/lilypond.sh
80 cp buildscripts/out/lilypond-login $RPM_BUILD_ROOT/etc/profile.d/lilypond.csh
81
82 # web doc
83 make prefix="$RPM_BUILD_ROOT%{_prefix}" \
84   infodir="$RPM_BUILD_ROOT%{_infodir}"  \
85   webdir="$RPM_BUILD_ROOT%{_prefix}/share/doc/lilypond/" web-install
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.info.gz %{_infodir}/dir 
102 /sbin/install-info %{_infodir}/music-glossary.info.gz %{_infodir}/dir 
103 %endif
104
105 # chkfontpath --add=%{_datadir}/lilypond/@TOPLEVEL_VERSION@/fonts/type1/
106
107 echo 'Please logout first before using LilyPond.'
108
109 %preun
110 if [ -f /usr/share/lilypond/%{version}/ls-R ]; then
111   rm -f /usr/share/lilypond/%{version}/ls-R
112 fi
113
114
115 %if %{info}
116     /sbin/install-info --delete %{_infodir}/lilypond.info.gz %{_infodir}/dir 
117     /sbin/install-info --delete %{_infodir}/music-glossary.info.gz %{_infodir}/dir 
118 %endif
119
120 # chkfontpath --remove=%{_datadir}/share/lilypond/@TOPLEVEL_VERSION@/fonts/type1n/
121
122 %postun
123
124 %post documentation
125 scrollkeeper-update
126
127 %postun documentation
128 scrollkeeper-update
129
130
131
132 %files
133 %defattr(-, root, root)
134 %{_datadir}/emacs/site-lisp/lilypond*
135 %{_datadir}/emacs/site-lisp/site-start.d/lilypond*
136
137 %{_bindir}/abc2ly
138 %{_bindir}/convert-ly
139 %{_bindir}/etf2ly
140 %{_bindir}/lilypond
141 %{_bindir}/lilypond-bin
142 %{_bindir}/midi2ly
143 %{_bindir}/lilypond-book
144 %{_bindir}/mup2ly
145 %{_bindir}/musedata2ly
146 %{_bindir}/pmx2ly
147
148 %doc THANKS
149 %doc COPYING
150 %doc DEDICATION
151 %doc README.txt
152 %doc AUTHORS.txt
153 %doc INSTALL.txt
154 %doc NEWS.txt
155
156 %if %{info}
157 %{_infodir}/lilypond/
158 %endif
159
160 %{_mandir}/man1/abc2ly.1.gz
161 %{_mandir}/man1/convert-ly.1.gz
162 %{_mandir}/man1/etf2ly.1.gz
163 %{_mandir}/man1/lilypond-bin.1.gz
164 %{_mandir}/man1/lilypond.1.gz
165 %{_mandir}/man1/midi2ly.1.gz
166 %{_mandir}/man1/lilypond-book.1.gz
167 %{_mandir}/man1/musedata2ly.1.gz
168 %{_mandir}/man1/mup2ly.1.gz
169 %{_mandir}/man1/pmx2ly.1.gz
170
171 %{_datadir}/lilypond/@TOPLEVEL_VERSION@/
172 %{_datadir}/locale/*/LC_MESSAGES/lilypond.mo
173
174 %{_libdir}/lilypond/
175
176 /etc/profile.d/lilypond.*
177
178
179 %files documentation
180
181 %defattr(-, root, root)
182
183 %{docdir}
184 %{_datadir}/omf/lilypond/@TOPLEVEL_VERSION@
185
186