]> git.donarmstrong.com Git - lilypond.git/blobdiff - make/lilypond.mandrake.spec.in
release commit
[lilypond.git] / make / lilypond.mandrake.spec.in
index 6765e199b9eae0b5baafa3643303eeefddbc3ba8..fff822a4482cc78820f61304464d55fcf94092a1 100644 (file)
@@ -1,19 +1,20 @@
+%define info yes
+
 %define name lilypond
 %define version @TOPLEVEL_VERSION@
 %define release 1mdk
 
-Name: %{name}
-Summary: A program for printing sheet music.
-Version: %{version}
-Release: %{release}
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-%{version}.tar.gz
-## Patch0: lilypond-GNUmakefile.in.patch.bz2
-License: GPL
-Group: Publishing
-URL: http://www.lilypond.org/
-BuildRoot: %{_tmppath}/%{name}-buildroot
-BuildRequires: guile guile-devel
-Requires: tetex
+Summary:       A program for printing sheet music.
+Name:          %{name}
+Version:       %{version}
+Release:       %{release}
+License:       GPL
+Group:         Applications/Publishing
+URL:           http://www.lilypond.org/
+Source0:       ftp.lilypond.org:/pub/LilyPond/development/lilypond-%{version}.tar.gz
+BuildRoot:     %{_tmppath}/%{name}-buildroot
+BuildRequires: t1utils bison flex mftrace texinfo
+Requires:      tetex tetex-latex python chkfontpath info-install XFree86
 
 %description
 LilyPond is a music typesetter.  It produces beautiful sheet music using a
@@ -21,40 +22,44 @@ high level description file as input.  Lilypond is part of the GNU project.
  
 LilyPond is split into two packages.  The package "lilypond" provides the
 core package, containing the utilities for converting the music source
-(.ly) files into printable output.  The package "lilypond-extras" provides
-the full documentation, example .ly files for various features and the
-Mutopia project files (musical equivalent of the Gutenberg project - see
+(.ly) files into printable output.  The package "lilypond-documentation" 
+provides the full documentation, example .ly files for various features and 
+the Mutopia project files (musical equivalent of the Gutenberg project - see
 http://www.mutopiaproject.org for details).
  
 If you are new to lilypond, you will almost certainly want to install the
-"lilypond-extras" package in addition to the "lilypond" package.
+"lilypond-documentation" package in addition to the "lilypond" package.
  
-You may also wish to investigate the "denemo" package, which provides a
-graphical front end to lilypond.
-
-See the file README.first for more information.
-
-
-%package extras
+%package documentation
 Summary: LilyPond documentation, examples and Mutopia files.
-Group: Publishing
-Requires: lilypond
+Group: Applications/Publishing
+Requires: %{name}
 
-%description extras
+%description documentation
 The documentation of LilyPond, both in HTML and PostScript, along with
 example input files and the files from the Mutopia project.
 
 %prep
-%setup -a 1
-## % patch0 -b .orig
+rm -rf $RPM_BUILD_ROOT
+
+%setup
 
 %build
 # DO NOT use % { configure } , it hardcodes all paths, runs libtool,
 # so we can't do make prefix=/tmp/ install.
 # -- not sure what this comment means; it's a relic from the PPC spec file -- mbrown@fensystems.co.uk
-./configure --disable-checking --disable-debugging --enable-printing --prefix=%{_prefix} --disable-optimise --enable-shared
-make
-make local-web
+##./configure --disable-checking --disable-debugging --enable-printing --prefix=%{_prefix} --disable-optimising --enable-shared
+## Add options if needed
+./configure --disable-checking --prefix=%{_prefix} --enable-optimising
+%make MAKE_PFA_FILES=1 all
+make -C mf/ pfa
+
+# make info
+make -C Documentation
+
+# make  html
+make web 
+make -C Documentation/user omf
 
 %install
 
@@ -64,82 +69,146 @@ RPM_DOC_ROOT=$RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
 rm -rf $RPM_DOC_ROOT
 mkdir -p $RPM_DOC_ROOT
 
-make prefix="$RPM_BUILD_ROOT%{_prefix}" install
-%{find_lang} %{name}
-
-# Move info and man files into correct locations
-mv $RPM_BUILD_ROOT/usr/info $RPM_BUILD_ROOT%{_infodir}
-mv $RPM_BUILD_ROOT/usr/man $RPM_BUILD_ROOT%{_mandir}
-
-# Move TeX font files into system TeX tree locations
-mkdir -p $RPM_BUILD_ROOT%{_datadir}/texmf/fonts/{afm,source,tfm}
-mv $RPM_BUILD_ROOT%{_datadir}/lilypond/afm $RPM_BUILD_ROOT%{_datadir}/texmf/fonts/afm/lilypond
-mv $RPM_BUILD_ROOT%{_datadir}/lilypond/mf $RPM_BUILD_ROOT%{_datadir}/texmf/fonts/source/lilypond
-mv $RPM_BUILD_ROOT%{_datadir}/lilypond/tfm $RPM_BUILD_ROOT%{_datadir}/texmf/fonts/tfm/lilypond
-mkdir -p $RPM_BUILD_ROOT%{_datadir}/texmf/tex
-mv $RPM_BUILD_ROOT%{_datadir}/lilypond/tex $RPM_BUILD_ROOT%{_datadir}/texmf/tex/lilypond
-
-# Copy emacs mode files into %{_datadir}/lilypond/emacs
-mkdir -p $RPM_BUILD_ROOT%{_datadir}/lilypond/emacs
-cp *.el $RPM_BUILD_ROOT%{_datadir}/lilypond/emacs/
-
-# Create documentation tree in %{_docdir}
-mkdir -p $RPM_DOC_ROOT/HTML
-tar -C $RPM_DOC_ROOT/HTML -xzf out/web.tar.gz
-ln -s HTML/input $RPM_DOC_ROOT/Examples
-ln -s HTML/input/test $RPM_DOC_ROOT/Tricks
-ln -s HTML/mutopia $RPM_DOC_ROOT/Mutopia
-mkdir -p $RPM_DOC_ROOT/Printable
-ln -s ../HTML/Documentation/user/out-www/lilypond.ps.gz $RPM_DOC_ROOT/Printable/Manual.ps.gz
-ln -s ../HTML/Documentation/user/out-www/glossary.ps.gz $RPM_DOC_ROOT/Printable/Glossary.ps.gz
-cp AUTHORS.txt CHANGES COPYING DEDICATION FAQ.txt NEWS README.txt VERSION README.mandrake $RPM_DOC_ROOT/README.first
+strip lily/out/lilypond 
+%makeinstall MAKE_PFA_FILES=1
+
+%if %{info}
+  rm -f $RPM_BUILD_ROOT/%{_infodir}/dir
+  bzip2 $RPM_BUILD_ROOT%{_infodir}/*
+%endif
+
+mkdir -p $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/site-start.d
+install -m 644 lilypond-mode.el lilypond-font-lock.el lilypond-indent.el lilypond.words $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/
+install -m 644 lilypond-init.el $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/site-start.d
+
+bzip2 $RPM_BUILD_ROOT%{_mandir}/man1/*
+
+mkdir -p $RPM_BUILD_ROOT%{_prefix}/../etc/profile.d
+cp buildscripts/out/lilypond-profile $RPM_BUILD_ROOT%{_prefix}/../etc/profile.d/lilypond.sh
+cp buildscripts/out/lilypond-login $RPM_BUILD_ROOT%{_prefix}/../etc/profile.d/lilypond.csh
+
+
+# again, make sure that main package installs even if doco fails
+mkdir -p web/out
+tar -C web -xzf out/web.tar.gz 
+
+# Menu
+# Every entry must be changed according package specifications
+# Pay attention to "section" "command" and "longtitle"
+
+mkdir -p $RPM_BUILD_ROOT%{_menudir}
+cat >$RPM_BUILD_ROOT%{_menudir}/%{name} <<EOF
+?package(%name):\
+  command="info %{name}"\
+  needs="text"\
+  icon="%{name}.xpm"\
+  section="Documentation"\
+  title="%{name}-info"\
+  longtitle="%{name} Info"
+EOF
+  
+cat >$RPM_BUILD_ROOT%{_menudir}/%{name}-documentation <<EOF
+?package(%name):\
+  command="\$BROWSER %{_docdir}/%{name}-documentation-%{version}/web/index.html"\
+  needs="X11"\
+  icon="%{name}.xpm"\
+  section="Documentation"\
+  title="%{name}-documentation"\
+  longtitle="%{name} Documentation"
+EOF
+
+# icon
+install -d $RPM_BUILD_ROOT/%{_miconsdir}
+install -d $RPM_BUILD_ROOT/%{_iconsdir}
+install -d $RPM_BUILD_ROOT/%{_liconsdir}
+install -m 644 Documentation/pictures/%{name}-16x16.xpm $RPM_BUILD_ROOT/%{_miconsdir}/%{name}.xpm
+install -m 644 Documentation/pictures/%{name}-32x32.xpm $RPM_BUILD_ROOT/%{_iconsdir}/%{name}.xpm
+install -m 644 Documentation/pictures/%{name}-48x48.xpm $RPM_BUILD_ROOT/%{_liconsdir}/%{name}.xpm
 
 %post
+%{update_menus}
+
 touch /tmp/.lilypond-install
-rm `find /var/lib/texmf -name 'feta*pk -print' -or -name 'feta*tfm -print'` /tmp/.lilypond-install
-/usr/bin/mktexlsr
-%_install_info lilypond.info
-%_install_info lilypond-internals.info
+rm `find /var/lib/texmf -name 'feta*pk' -or -name 'feta*tfm' -or -name 'parmesan*pk' -or -name 'parmesan*tfm' -print` /tmp/.lilypond-install
+
+%if %{info}
+  /sbin/install-info --quiet %{_infodir}/lilypond.info.bz2 %{_infodir}/dir 
+%endif
+
+/usr/X11R6/bin/mkfontdir %{_datadir}/lilypond/%{version}/fonts/type1/
+chkfontpath --add=%{_datadir}/lilypond/%{version}/fonts/type1/
 
 %preun
-%_remove_install_info lilypond.info
-%_remove_install_info lilypond-internals.info
+
+%if %{info}
+  if [ $1 = 0 ]; then
+    /sbin/install-info --quiet --delete %{_infodir}/lilypond.info.bz2 %{_infodir}/dir 
+  fi
+%endif
+
+rm -f %{_datadir}/lilypond/%{version}/fonts/type1/fonts.dir
+chkfontpath --remove=%{_datadir}/lilypond/%{version}/fonts/type1/
+
+%post documentation
+scrollkeeper-update
+
+%postun documentation
+scrollkeeper-update
 
 %postun
-/usr/bin/mktexlsr
-
-
-%files -f %{name}.lang
-%defattr(-,root,root,0755)
-%{_bindir}/*
-%{_datadir}/lilypond/
-%{_datadir}/texmf/fonts/afm/lilypond
-%{_datadir}/texmf/fonts/source/lilypond
-%{_datadir}/texmf/fonts/tfm/lilypond
-%{_datadir}/texmf/tex/lilypond
-
-%doc %{_infodir}/*
-%doc %{_mandir}/man1/*
-%doc %{_docdir}/%{name}-%{version}/AUTHORS.txt
-%doc %{_docdir}/%{name}-%{version}/CHANGES
-%doc %{_docdir}/%{name}-%{version}/COPYING
-%doc %{_docdir}/%{name}-%{version}/DEDICATION
-%doc %{_docdir}/%{name}-%{version}/FAQ.txt
-%doc %{_docdir}/%{name}-%{version}/NEWS
-%doc %{_docdir}/%{name}-%{version}/README.txt
-%doc %{_docdir}/%{name}-%{version}/VERSION
-%doc %{_docdir}/%{name}-%{version}/README.first
-
-%files extras
-%defattr(-,root,root,0755)
-%doc %{_docdir}/%{name}-%{version}/HTML
-%doc %{_docdir}/%{name}-%{version}/Mutopia
-%doc %{_docdir}/%{name}-%{version}/Printable
-%doc %{_docdir}/%{name}-%{version}/Tricks
-%doc %{_docdir}/%{name}-%{version}/Examples
+%{clean_menus}
 
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-, root, root)
+%doc COPYING README.txt INSTALL.txt DEDICATION NEWS AUTHORS.txt THANKS
+
+%{_datadir}/emacs/site-lisp/site-start.d/lilypond-*
+%{_datadir}/emacs/site-lisp/lilypond*
+
+%if %{info}
+  %{_infodir}/*
+%endif
+
+%{_datadir}/%{name}/%{version}/
+%{_datadir}/locale/*/LC_MESSAGES/lilypond.mo
+%{_prefix}/../etc/profile.d/lilypond.*
+%_bindir/*
+%_mandir/*
+%_menudir/*
+%_iconsdir/*
+
+%{_libdir}/lilypond/
+
+%doc 
+# % {_docdir}/lilypond-@TOPLEVEL_VERSION@
+
+%files documentation
+%defattr(-, root, root)
+
+%doc web 
+# % {_docdir}/lilypond-documentation-@TOPLEVEL_VERSION@
+%{_datadir}/omf/lilypond/@TOPLEVEL_VERSION@
 
 %changelog
+* Thu Jun 12 2003 Heikki Johannes Junes <hjunes@cc.hut.fi> 1.7.20-1mdk
+- refreshed dependencies and file list.
+
+* Fri Dec 01 2002 Heikki Johannes Junes <hjunes@cc.hut.fi> 1.7.9-1mdk
+- set menu-items to lilypond-info and lilypond-documentation.
+
+* Fri Nov 30 2002 Heikki Johannes Junes <hjunes@cc.hut.fi> 1.7.8-4mdk
+- add pre/post-dependencies and menus with icon from source.
+
+* Fri Oct 28 2002 Heikki Johannes Junes <hjunes@cc.hut.fi> 1.7.4-1mdk
+- info, commented menu
+
+* Fri Aug 30 2002 Heikki Johannes Junes <hjunes@cc.hut.fi> 1.6.0-1mdk
+- Adapted from lilypond.redhat.skel and skeleton found in Mandrake's RPM-docs.
+- TODO: info (?) and dependencies.
+
 * Fri Jun 01 2001 Lenny Cartier <lenny@mandrakesoft.com> 1.4.2-1mdk
 - updated by Michael Brown <mbrown@linux-mandrake.com> :
        - Upgraded to 1.4.2