summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b92fb843b3a6d2449672ed7f16de9ee49a6dec11 (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
# Maintainer: Kyle Keen <keenerd@gmail.com>
# Contributor: Mihai Militaru <mihai dot militaru at xmpp dot ro>

pkgname=im
pkgver=3.12
pkgrel=1
pkgdesc="Toolkit for Digital Imaging."
arch=('i686' 'x86_64')
url="http://www.tecgraf.puc-rio.br/im/"
license=('MIT')
depends=('gcc-libs' 'zlib')
makedepends=('lua' 'tar')
source=("http://sourceforge.net/projects/imtoolkit/files/${pkgver}/Docs%20and%20Sources/${pkgname}-${pkgver}_Sources.tar.gz")
noextract=("${pkgname}-${pkgver}_Sources.tar.gz")
sha1sums=('b101433603645af96de88c406be48761369a7142')

prepare() {
  cd "$srcdir"
  # bdstar won't extract the 3.12 tarball
  tar -xaf "${pkgname}-${pkgver}_Sources.tar.gz"
  
  cd "$pkgname"
  find ./ -type d -exec chmod 0755 "{}" \;
  find ./ -type f -exec chmod 0644 "{}" \;
}

build() {
  cd "$srcdir/$pkgname"
  make -j1 USE_LUA53=Yes
}

package() {
  cd "$srcdir/$pkgname"
  
  mkdir -p "$pkgdir/usr/lib"
  install -m644 lib/Linux*/libim*.a "$pkgdir/usr/lib/"
  install -m755 lib/Linux*/libim*.so "$pkgdir/usr/lib/"
  mkdir -p "$pkgdir/usr/include"
  install include/* "$pkgdir/usr/include/"
  install -Dm644 COPYRIGHT "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}