# $Id: PKGBUILD 108241 2014-03-25 10:37:30Z spupykin $ # Maintainer: Sergej Pupykin # Maintainer: Geoffroy Carrier # Contributor: William Rea # Contributor: Robert Emil Berge pkgname=lilypond pkgver=2.18.2 pkgrel=2 pkgdesc="An automated music engraving system" arch=('i686' 'x86_64') url="http://lilypond.org" license=('GPL') depends=('guile1.8' 'python2' 'texlive-core' 'ghostscript' 'pango' 'fontconfig') makedepends=('flex' 'bison' 'gettext' 'mftrace' 'texinfo' 'fontforge' 't1utils' 'gsfonts' 'texi2html' 'dblatex' 'texlive-langcyrillic' 'imagemagick' 'zip' 'rsync' 'netpbm') options=('emptydirs') install=lilypond.install source=(http://download.linuxaudio.org/lilypond/sources/v2.18/$pkgname-$pkgver.tar.gz) md5sums=('3c4bcbb708d12644668b32bfe82ebf25') prepare() { cd "$srcdir/$pkgname-$pkgver" # python2 fix for file in $(find . -name '*.py' -print); do sed -i 's_^#!.*/usr/bin/python_#!/usr/bin/python2_' $file sed -i 's_^#!.*/usr/bin/env.*python_#!/usr/bin/env python2_' $file done sed -i 's|GUILE_CFLAGS=.*|GUILE_CFLAGS="`pkg-config --cflags guile-1.8`"|' configure sed -i 's|GUILE_LDFLAGS=.*|GUILE_LDFLAGS="`pkg-config --libs guile-1.8`"|' configure rm -rf lily/out/ python/out/ } build() { cd "$srcdir/$pkgname-$pkgver" export PYTHON=/usr/bin/python2 export GUILE=/usr/bin/guile1.8 export GUILE_CONFIG=/usr/bin/guile-config1.8 export LDFLAGS="$LDFLAGS -lpthread" ./configure --prefix=/usr make } package() { cd "$srcdir/$pkgname-$pkgver" make DESTDIR="$pkgdir" vimdir="/usr/share/vim/vimfiles" install }