# $Id: PKGBUILD 184377 2013-05-06 19:37:12Z foutrelis $ # Maintainer: pkgbase=fltk pkgname=('fltk' 'fltk-docs' 'fltk-games') pkgver=1.3.2 pkgrel=3 arch=('i686' 'x86_64') license=('custom:LGPL') url="http://www.fltk.org/" makedepends=('mesa' 'glu' 'doxygen' 'libjpeg' 'libpng' 'libxcursor' 'libxft' \ 'libxinerama' 'alsa-lib' 'desktop-file-utils') source=(http://www.fltk.org/tars/releases/$pkgbase-$pkgver-source.tar.gz tigervnc.patch) md5sums=('9f7e707d4fb7a5a76f0f9b73ff70623d' '9efdf03a449d7639b6da493cb0972bba') build() { cd "$srcdir/$pkgbase-$pkgver" patch -Np1 -i "$srcdir/tigervnc.patch" sed -i -e 's/$(LINKFLTK)/$(LINKSHARED)/' \ -e 's/$(LINKFLTKIMG)/$(LINKSHARED)/' test/Makefile ./configure --prefix=/usr --enable-threads --enable-xft --enable-shared make cd documentation make html } package_fltk() { pkgdesc="Graphical user interface toolkit for X" depends=('libjpeg' 'libpng' 'libxcursor' 'libxft' 'libxinerama' \ 'hicolor-icon-theme' 'desktop-file-utils' 'xdg-utils') options=('!docs') install=fltk.install cd "$srcdir/$pkgbase-$pkgver" make DESTDIR="$pkgdir" install (cd fluid; make DESTDIR="$pkgdir" install install-linux) chmod 644 "$pkgdir"/usr/lib/*.a install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" } package_fltk-docs() { pkgdesc="Graphical user interface toolkit for X (documentation)" cd "$srcdir/$pkgbase-$pkgver/documentation" install -d "$pkgdir"/usr/share/doc/fltk/ for _file in html/* ; do install -m644 $_file "$pkgdir"/usr/share/doc/fltk/ done cd ../test make DESTDIR="$pkgdir" install install -D -m644 ../COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" } package_fltk-games() { pkgdesc="Example games that accompany FLTK: blocks, checkers and sudoku" depends=('alsa-lib' 'fltk') install=fltk-games.install cd "$srcdir/$pkgbase-$pkgver/test" make DESTDIR="$pkgdir" install-linux (cd ../documentation; make DESTDIR="$pkgdir" install-linux) install -D -m644 ../COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" }