summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c31a4d491fe3c09b9d739411f6dde7439bcbc38f (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
pkgname=subuser
_name=subuser
pkgver=0.4
pkgrel=1
pkgdesc="Run programs in linux with selectively restricted permissions"
url="http://subuser.org"
depends=('python' 'docker')
makedepends=('python')
optdepends=()
license=('LGPL3')
arch=('any')
source=("https://github.com/subuser-security/${_name}/archive/${pkgver}.tar.gz")
sha256sums=('2b53a0be7f01dacc5a09d9e3f592578a38922e3a2f103142077fd05fa09cbafd')

package() {
  cd "$srcdir/${_name}-${pkgver}"

  # For now, nothing is built, the source directory is expected to be copied
  # somewhere (see http://subuser.org/installation.html#installation).
  # /opt/subuser is currently used, but this is likely to change.

  install -d "$pkgdir/usr/bin"
  ln -s "/opt/subuser/logic/subuser" "$pkgdir/usr/bin/subuser"

  install -d -m 755 "$pkgdir/opt/subuser"
  install -D -m 644 *.json "$pkgdir/opt/subuser"

  # TODO: check permissions
  cp -dr --no-preserve='ownership' {logic,test} "$pkgdir/opt/subuser/"
  chmod -R 755 "$pkgdir/opt/subuser/"{logic,test}

  chmod +x "$pkgdir/opt/subuser/logic/subuser"
}