File lilypond.spec of Package lilypond
#
# spec file for package lilypond
#
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define fontdir %{_datadir}/fonts
%define ttfdir %{fontdir}/truetype
Name: lilypond
%define ver 2.18
%define plevel 2
Version: %{ver}.%{plevel}
Release: 0
Summary: A typesetting system for music notation
License: GPL-3.0+
Group: Productivity/Publishing/Other
Url: http://www.lilypond.org
Source0: http://download.linuxaudio.org/lilypond/sources/v%{ver}/lilypond-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: ghostscript >= 8.15
Requires: lilypond-century-schoolbook-l-fonts = %{version}
Requires: lilypond-emmentaler-fonts = %{version}
BuildRequires: ImageMagick
BuildRequires: autotrace
BuildRequires: bison
BuildRequires: flex
BuildRequires: fontforge
BuildRequires: gcc-c++
BuildRequires: gettext
BuildRequires: ghostscript >= 8.15
BuildRequires: ghostscript-fonts-std
BuildRequires: libguile1-devel >= 1.8
BuildRequires: mftrace >= 1.1.19
BuildRequires: python-devel >= 2.4.0
BuildRequires: rsync
BuildRequires: t1utils
# Package texi2html was split off from texinfo in current Factory.
%if 0%{?suse_version} > 1320
BuildRequires: texi2html
%endif
BuildRequires: texinfo >= 4.8
%if %suse_version > 1220
BuildRequires: dblatex
BuildRequires: makeinfo
# Needed for pngtopnm
BuildRequires: netpbm
BuildRequires: texlive-extratools
BuildRequires: texlive-latex
BuildRequires: texlive-lh
BuildRequires: texlive-metafont
BuildRequires: texlive-metapost
%else
BuildRequires: netpbm
BuildRequires: texlive
BuildRequires: texlive-bin
BuildRequires: texlive-bin-tools
BuildRequires: texlive-latex
BuildRequires: texlive-metapost
%endif
BuildRequires: vim-base
BuildRequires: zip
BuildRequires: pkgconfig(pango) >= 1.12.0
%description
LilyPond is an automated music engraving system. It formats music
beautifully and automatically, and has a friendly syntax for its input
files.
%package century-schoolbook-l-fonts
Summary: Lilypond Century Schoolbook L fonts
Group: System/X11/Fonts
Requires: lilypond-fonts-common = %{version}
BuildArch: noarch
%description century-schoolbook-l-fonts
LilyPond is an automated music engraving system. It formats music
beautifully and automatically, and has a friendly syntax for its input
files.
These are the Century Schoolbook L fonts included in the package.
%package emmentaler-fonts
Summary: Lilypond emmentaler fonts
Group: System/X11/Fonts
Requires: lilypond-fonts-common = %{version}
BuildArch: noarch
%description emmentaler-fonts
LilyPond is an automated music engraving system. It formats music
beautifully and automatically, and has a friendly syntax for its input
files.
These are the emmentaler fonts included in the package.
%package fonts-common
Summary: Lilypond fonts common dir
Group: System/X11/Fonts
BuildArch: noarch
%description fonts-common
LilyPond is an automated music engraving system. It formats music
beautifully and automatically, and has a friendly syntax for its input
files.
This contains the directory common to all lilypond fonts.
%prep
%setup -q
%build
%configure --without-kpathsea --disable-checking \
--with-ncsb-dir=%{_datadir}/ghostscript/fonts/
make
%install
make install DESTDIR=%{buildroot} package_infodir=%{_infodir} \
vimdir=%{_datadir}/vim/vim73
chmod +x %{buildroot}%{_libdir}/%{name}/%{version}/python/midi.so
# Symlink lilypond-init.el in emacs' site-start.d directory
pushd %{buildroot}%{_datadir}/emacs/site-lisp
mkdir site-start.d
ln -s ../lilypond-init.el site-start.d
popd
# Change encoding to UTF8
pushd %{buildroot}%{_infodir}
iconv -f iso-8859-1 -t utf-8 music-glossary.info > music-glossary.info.utf8
mv music-glossary.info.utf8 music-glossary.info
sed -e s,lilypond/,, -i *.info
popd
rm -f %{buildroot}%{_infodir}/dir
%find_lang %{name}
mkdir -p %{buildroot}%{ttfdir}
mv %{buildroot}%{_datadir}/lilypond/%{version}/fonts/otf/*.otf %{buildroot}%{ttfdir}
rmdir %{buildroot}%{_datadir}/lilypond/%{version}/fonts/otf
ln -s %{ttfdir} %{buildroot}%{_datadir}/lilypond/%{version}/fonts/otf
%files -f %{name}.lang
%defattr(-,root,root,-)
%doc AUTHORS.txt COPYING DEDICATION HACKING LICENSE*
%doc NEWS.txt README.txt ROADMAP VERSION
%{_bindir}/*
%{_libdir}/lilypond
%{_datadir}/lilypond
%{_datadir}/emacs/site-lisp
%{_datadir}/vim/vim*
%{_infodir}/*.gz
%{_mandir}/man1/*
%files century-schoolbook-l-fonts
%defattr(-,root,root,-)
%{ttfdir}/CenturySchL*otf
%files emmentaler-fonts
%defattr(-,root,root,-)
%{ttfdir}/emmentaler*otf
%files fonts-common
%defattr(-,root,root,-)
%doc COPYING
%defattr(0644,root,root,0755)
%dir %{ttfdir}
%changelog