%build
./configure --disable-checking --disable-debugging --enable-printing --prefix=/usr --disable-optimise --enable-shared
make all
-make -C Documentation info || true
+ln -s /usr/share/texmf/fonts/tfm/public/cm/ tfm
+
+make -C Documentation || true
make htmldoc || true
+
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/tmp/lilypond-rpm-doc
-tar -C $RPM_BUILD_ROOT/tmp/lilypond-rpm-doc -xzf out/htmldoc.tar.gz
+mkdir htmldocs
+tar -C htmldocs -xzf out/htmldoc.tar.gz
+#tar -C $RPM_BUILD_ROOT/tmp/lilypond-rpm-doc -xzf out/htmldoc.tar.gz
-strip lily/out/lilypond mi2mu/out/mi2mu
+strip lily/out/lilypond midi2ly/out/midi2ly
make prefix="$RPM_BUILD_ROOT/usr" install
+# gzip -9fn $RPM_BUILD_ROOT/usr/info/* || true
mkdir -p $RPM_BUILD_ROOT/etc/profile.d
cp buildscripts/out/lilypond-profile $RPM_BUILD_ROOT/etc/profile.d/lilypond.sh
cp buildscripts/out/lilypond-login $RPM_BUILD_ROOT/etc/profile.d/lilypond.csh
-%files
+%post
+
+touch /tmp/.lilypond-install
+rm `find /var/lib/texmf -name 'feta*pk -print' -or -name 'feta*tfm -print'` /tmp/.lilypond-install
+# /sbin/install-info /usr/info/lilypond.info.gz /usr/info/dir || true
+
+%preun
+if [ $1 = 0 ]; then
+ true # /sbin/install-info --delete /usr/info/lilypond.info.gz /usr/info/dir || true
+fi
-%doc /tmp/lilypond-rpm-doc
+
+%files
+%doc htmldocs/
# hairy to hook it in (possibly non-existing) emacs
%doc mudela-mode.el
/usr/bin/mudela-book
/usr/bin/ly2dvi
/usr/bin/lilypond
-/usr/bin/mi2mu
-/usr/man/man1/mi2mu.1
+/usr/bin/midi2ly
+/usr/man/man1/midi2ly.1
/usr/man/man1/lilypond.1
/usr/man/man1/mudela-book.1
/usr/man/man1/ly2dvi.1
/usr/share/locale/*/LC_MESSAGES/lilypond.mo
/etc/profile.d/lilypond.*
-
-%post
-
-touch /tmp/.lilypond-install
-rm `find /var/lib/texmf -name 'feta*pk -print' -or -name 'feta*tfm -print'` /tmp/.lilypond-install