summaryrefslogtreecommitdiff
path: root/extra/fltk/PKGBUILD
blob: d93e624fe055a574767b81b83ee2f7525a957d18 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# $Id: PKGBUILD 148718 2012-02-05 11:48:05Z ibiru $
# Maintainer:

pkgbase=fltk
pkgname=('fltk' 'fltk-docs' 'fltk-games')
pkgver=1.3.0
pkgrel=3
arch=('i686' 'x86_64')
license=('custom:LGPL')
url="http://www.fltk.org/"
makedepends=('mesa' 'doxygen' 'libjpeg' 'libpng' 'libxft' 'libxinerama' \
             'alsa-lib' 'desktop-file-utils')
source=(http://ftp.easysw.com/pub/$pkgbase/$pkgver/$pkgbase-$pkgver-source.tar.gz)
md5sums=('44d5d7ba06afdd36ea17da6b4b703ca3')

build() {
  cd "$srcdir/$pkgbase-$pkgver"
  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' '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"
}