]> git.donarmstrong.com Git - lilypond.git/blob - make/lilypond.redhat.spec.in
4ce88f301337812c058491ae6ceec351d93462a0
[lilypond.git] / make / lilypond.redhat.spec.in
1 # -*-rpm-spec-mode-*-
2
3 %define info yes
4
5 Name: lilypond
6 Version: @TOPLEVEL_VERSION@
7 Release: 1
8 License: GPL
9 Group: Applications/Publishing
10 Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-@TOPLEVEL_VERSION@.tar.gz
11 Summary: Create and print music notation 
12 URL: http://www.lilypond.org/
13 BuildRoot: %{_tmppath}/%{name}-%{version}-root
14
15
16 Buildrequires: t1utils bison flex mftrace texinfo
17 Requires: tetex  tetex-latex libstdc++ python 
18
19 %description
20 LilyPond lets you create music notation.  It produces
21 beautiful sheet music from  a high-level description file.
22
23 %package documentation
24 Summary:  All LilyPond documentation, in HTML
25 Group: Applications/Publishing
26 # BuildArchitectures: noarch
27
28 %description documentation
29 Documentation and example files of LilyPond. An index is available at
30 %{_docdir}/web/Documentation/out-www/index.html
31
32 %prep
33 %setup
34
35 %build
36
37 # DO NOT use % { configure } , it hardcodes all paths, runs libtool,
38 # so we can't do make prefixix=/tmp/ install.
39
40 # In fact, do not take out the spaces between % and { in the above comment,
41 # because RPM will gladly do a substitution anyway.
42
43 ./configure --disable-checking --prefix=%{_prefix} --enable-optimising
44
45 make MAKE_PFA_FILES=1 all
46
47 # make info
48 make -C Documentation
49
50 # make  html
51 make web-doc top-web 
52
53 %install
54
55
56 rm -rf $RPM_BUILD_ROOT
57 mkdir -p $RPM_BUILD_ROOT/tmp/lilypond-rpm-doc
58
59 strip lily/out/lilypond 
60 make prefix="$RPM_BUILD_ROOT%{_prefix}" infodir="$RPM_BUILD_ROOT%{_infodir}" MAKE_PFA_FILES=1 mandir="$RPM_BUILD_ROOT%{_mandir}" install
61
62 %if %{info}
63 rm -f $RPM_BUILD_ROOT/%{_infodir}/dir
64 gzip -9fn $RPM_BUILD_ROOT%{_infodir}/*
65 %endif
66
67 mkdir -p $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/site-start.d
68 install -m 644 lilypond-mode.el lilypond-font-lock.el lilypond-indent.el lilypond.words $RPM_BUILD_ROOT/%{_datadir}/emacs/site-lisp/
69 install -m 644 lilypond-init.el $RPM_BUILD_ROOT/%{_datadir}/emacs/site-lisp/site-start.d
70
71 gzip -9fn $RPM_BUILD_ROOT%{_mandir}/man1/*
72
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
78 # again, make sure that main package installs even if doco fails
79 mkdir -p web/out
80 tar -C web -xzf out/web.tar.gz 
81
82
83 %post
84
85 touch /tmp/.lilypond-install
86 rm `find /var/lib/texmf -name 'feta*pk' -or -name 'feta*tfm' -or -name 'parmesan*pk' -or -name 'parmesan*tfm' -print` /tmp/.lilypond-install
87
88 %if %{info}
89 /sbin/install-info %{_infodir}/lilypond.info.gz %{_infodir}/dir 
90 %endif
91
92 /usr/X11R6/bin/mkfontdir %{_datadir}/lilypond/@TOPLEVEL_VERSION@/fonts/type1/
93 chkfontpath --add=%{_datadir}/lilypond/@TOPLEVEL_VERSION@/fonts/type1/
94
95 echo 'Please logout first before using LilyPond.'
96
97 %preun
98
99 %if %{info}
100 if [ $1 = 0 ]; then
101     /sbin/install-info --delete %{_infodir}/lilypond.info.gz %{_infodir}/dir 
102 fi
103 %endif
104
105 rm -f %{_datadir}/lilypond/@TOPLEVEL_VERSION@/fonts/type1/fonts.dir
106 chkfontpath --remove=%{_datadir}/share/lilypond/@TOPLEVEL_VERSION@/fonts/type1/
107
108 %files
109 %defattr(-, root, root)
110 %{_datadir}/emacs/site-lisp/lilypond*
111 %{_datadir}/emacs/site-lisp/site-start.d/lilypond-*
112
113 %{_bindir}/abc2ly
114 %{_bindir}/as2text
115 %{_bindir}/convert-ly
116 %{_bindir}/etf2ly
117 %{_bindir}/lilypond
118 %{_bindir}/ly2dvi
119 %{_bindir}/midi2ly
120 %{_bindir}/lilypond-book
121 %{_bindir}/mup2ly
122 %{_bindir}/musedata2ly
123 %{_bindir}/pmx2ly
124
125 %if %{info}
126 %{_infodir}/*
127 %endif
128
129 %{_mandir}/man1/abc2ly.1.gz
130 %{_mandir}/man1/as2text.1.gz
131 %{_mandir}/man1/convert-ly.1.gz
132 %{_mandir}/man1/etf2ly.1.gz
133 %{_mandir}/man1/lilypond.1.gz
134 %{_mandir}/man1/ly2dvi.1.gz
135 %{_mandir}/man1/midi2ly.1.gz
136 %{_mandir}/man1/lilypond-book.1.gz
137 %{_mandir}/man1/musedata2ly.1.gz
138 %{_mandir}/man1/mup2ly.1.gz
139 %{_mandir}/man1/pmx2ly.1.gz
140
141 %{_datadir}/lilypond/@TOPLEVEL_VERSION@/
142 %{_datadir}/locale/*/LC_MESSAGES/lilypond.mo
143 /etc/profile.d/lilypond.*
144
145 %files documentation
146 %defattr(-, root, root)
147
148 %doc web/
149
150