summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ce11cefbaa84f0f4d9f1a2e143e0a090163f3508 (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
# Maintainer: Gavin Lloyd <gavinhungry@gmail.com>

pkgname=ragnar-git
pkgver=0.39.cccc20a
pkgrel=1
pkgdesc="Mount an existing remote LUKS device with NBD over SSH"
url="https://github.com/gavinhungry/ragnar"
license=('MIT')
arch=('any')
makedepends=('git')
depends=('openssh' 'nbd' 'cryptsetup' 'udisks2')
source=("${pkgname}::git+${url}.git#branch=master")
sha256sums=('SKIP')

pkgver () {
  cd "${srcdir}/${pkgname}"
  echo "0.$(git rev-list --count HEAD).$(git describe --always | sed 's|-|.|g')"
}

package() {
  cd "${srcdir}/${pkgname}"
  git submodule init
  git submodule update

  mkdir -p ${pkgdir}/usr/bin

  install -m 755 abash/abash.sh ${pkgdir}/usr/bin/ragnar
  echo >> ${pkgdir}/usr/bin/ragnar
  cat ragnar.sh >> ${pkgdir}/usr/bin/ragnar
}