summaryrefslogtreecommitdiff
path: root/fscrypt-git/PKGBUILD
blob: 10c23026b09c326aee8c137b03fc3d67e8655438 (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
# Maintainer:  Erich Eckner <arch at eckner dot net>
# Contributor: Eric Biggers <ebiggers3 at gmail dot com>

pkgname=fscrypt-git
pkgver=0.2.5.33.g80654f2
pkgrel=1
pkgdesc='A tool for managing Linux filesystem encryption'
arch=('x86_64' 'i686')
url='https://github.com/google/fscrypt'
license=('Apache')
makedepends=('git' 'go')
depends=('pam')
provides=('fscrypt')
source=('git+https://github.com/google/fscrypt.git' 'pam_config')
sha256sums=('SKIP'
            'ae6ceaefc6d936c95a9b7a3f925111ffb946e6fd0152373247f1d40132f05aef')

pkgver() {
	cd "${srcdir}/fscrypt"
	git describe --tags --long | sed 's/^v//' | tr - .
}

prepare() {
	export GOPATH="${srcdir}/go"
	mkdir -p "${GOPATH}/src/github.com/google"
	ln -sf "${srcdir}/fscrypt" "${GOPATH}/src/github.com/google/"
}

build() {
	export GOPATH="${srcdir}/go"
	cd "${GOPATH}/src/github.com/google/fscrypt"
	make
}

package() {
	cd "${srcdir}/fscrypt"
	make PREFIX="${pkgdir}/usr" install
	install -Dm644 README.md "${pkgdir}/usr/share/fscrypt/README.md"
	install -Dm644 ../pam_config "${pkgdir}/etc/pam.d/fscrypt"
}