summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ea7af4363c5c9d7f19afc1e2103f2f559b9e2852 (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
# Maintainer: Arvedui <arvedui@posteo.de>
# Contributor: David Manouchehri <manouchehri@riseup.net>
# Contributor: Thomas B├Ąchler <thomas@archlinux.org>

_gitname=cryptsetup
pkgname="${_gitname}-git"
_gitbranch=master
_gitauthor=cryptsetup
pkgver=v2.3.3.r81.gf3ec1e22
pkgrel=1
pkgdesc='Userspace setup tool for transparent encryption of block devices using dm-crypt'
arch=('armv6h' 'armv7h' 'i686' 'x86_64')
license=('GPL')
url="https://gitlab.com/${_gitauthor}/${_gitname}"
depends=('device-mapper' 'libdevmapper.so' 'openssl' 'popt' 'libutil-linux'
         'libuuid.so' 'json-c' 'libjson-c.so' 'argon2' 'libargon2.so')
makedepends=('util-linux' 'git')
provides=('libcryptsetup.so')
conflicts=('cryptsetup')
provides=('cryptsetup')
options=('!emptydirs')
source=("git+https://gitlab.com/${_gitauthor}/${_gitname}#branch=${_gitbranch}"
        "encrypt_hook"
        "encrypt_install"
        "sd-encrypt")
sha256sums=('SKIP'
            '416aa179ce3c6a7a5eee0861f1f0a4fafac91b69e84a2aae82b6e5a6140e31e2'
            'd325dc239ecc9a5324407b0782da6df2573e8491251836d6c4e65fa61339ce57'
            '31d816b3650a57512a5f9b52c1995fa65a161faa8b37975d07c9a1b8e1a119db')

pkgver() {
  cd "${srcdir}/${_gitname}"
  (
    set -o pipefail
    git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/_/./g' ||
      printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  )
}

build() {
  cd "${srcdir}/${_gitname}"
  ./autogen.sh
  ./configure --prefix=/usr --sbindir=/usr/bin --disable-static --enable-libargon2
  make
}

package() {
  cd "${srcdir}/${_gitname}"
  make DESTDIR="${pkgdir}" install
  # install hook
  install -D -m644 "${srcdir}"/encrypt_hook "${pkgdir}"/usr/lib/initcpio/hooks/encrypt
  install -D -m644 "${srcdir}"/encrypt_install "${pkgdir}"/usr/lib/initcpio/install/encrypt
  install -D -m644 "${srcdir}"/sd-encrypt "${pkgdir}"/usr/lib/initcpio/install/sd-encrypt
  install -D -m644 "${srcdir}"/"${_gitname}"/scripts/cryptsetup.conf "${pkgdir}"/usr/lib/tmpfiles.d/cryptsetup.conf
}

# vim:set et sw=2 sts=2 tw=80: