summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1da727bb0d0c2d47a89c0dbae09c85c928e17618 (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
# Maintainer: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
# Contributor: Ilgrim <ilgrim at gmail dot com>

pkgname=squirrel
pkgver=3.2
pkgrel=1
pkgdesc="A light-weight scripting language that fits in the size, memory bandwidth, and real-time requirements of applications like video games"
arch=('i686' 'x86_64')
url="http://www.squirrel-lang.org/"
license=('MIT')
source=(http://sourceforge.net/projects/squirrel/files/squirrel3/squirrel%20${pkgver}%20stable/${pkgname}_3_2_stable.tar.gz)
sha256sums=('211f1452f00b24b94f60ba44b50abe327fd2735600a7bacabc5b774b327c81db')

build() {
  cd "${srcdir}"/squirrel3
# If $arch is x86_64, compile for 64bits. Else do it for 32.
  if [ $CARCH=='x86_64' ]; then
    make sq64
  else
    make sq32
  fi
}

package() {
  cd "${srcdir}"/squirrel3

# Install squirrel Interpreter
  install -Dm755 bin/sq "${pkgdir}"/usr/bin/$pkgname

# Install Includes and various headers
  for _file in $(ls "${srcdir}"/squirrel3/include)
  do
     install -Dm644 include/$_file "${pkgdir}"/usr/include/$_file
  done
# Install all static libraries & others
  for _file in $(ls "${srcdir}"/squirrel3/lib)
  do
     install -Dm644 lib/$_file "${pkgdir}"/usr/lib/$_file
  done

# Install docs & examples.
  for _file in $(ls "${srcdir}"/squirrel3/doc)
  do
     install -Dm644 doc/$_file "${pkgdir}"/usr/share/$pkgname/doc/$_file
  done
  for _file in $(ls "${srcdir}"/squirrel3/samples)
  do
     install -Dm644 samples/$_file "${pkgdir}"/usr/share/$pkgname/samples/$_file
  done

# Install Other docs
  install -Dm644 COPYRIGHT "${pkgdir}"/usr/share/licenses/$pkgname/COPYRIGHT
  install -Dm644 HISTORY "${pkgdir}"/usr/share/$pkgname/HISTORY
  install -Dm644 README "${pkgdir}"/usr/share/$pkgname/README
  for _file in $(ls "${srcdir}"/squirrel3/etc)
  do
     install -Dm644 etc/$_file "${pkgdir}"/usr/share/$pkgname/embebing/$_file
  done
}