summaryrefslogtreecommitdiff
path: root/cryptsetup/PKGBUILD
blob: 57969c96ff7797baa3b55855cb52e8faf7c33d42 (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
# Maintainer:  Erich Eckner <arch at eckner dot net>
# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: Thomas Bächler <thomas@archlinux.org>

pkgname=cryptsetup
pkgver=2.3.0
pkgrel=1
pkgdesc='Userspace setup tool for transparent encryption of block devices using dm-crypt'
arch=(x86_64)
license=('GPL')
url='https://gitlab.com/cryptsetup/cryptsetup/'
depends=('device-mapper' 'openssl' 'popt' 'libutil-linux' 'json-c' 'argon2')
makedepends=('util-linux')
options=('!emptydirs')
validpgpkeys=('2A2918243FDE46648D0686F9D9B0577BD93E98FC') # Milan Broz <gmazyland@gmail.com>
source=("https://www.kernel.org/pub/linux/utils/cryptsetup/v${pkgver%.*}/${pkgname}-${pkgver}.tar."{xz,sign}
        'hooks-encrypt'
        'install-encrypt'
        'install-sd-encrypt'
        'test.patch')
sha512sums=('d4af8edb7a50603028c6c6999ae7a1851d2232ee11d4a501270afb424f0a7dc82893a6a5d30d3a3188634aa80ec1a79f22a91b539910df10d07f8d9ae532cb08'
            'SKIP'
            'dab61d2559e16f4b74eb366ee5f41e82799d1bf6312fcb3b20f2750ad91c2ba9f3db43242aed00bb8ca9e34c18e48be2045e64ba68289d5720d78a03303b8161'
            'd1839c3b352fc6469185ba01a9af47bc820a61ef4c5d54714d6848b1eec8e2eb071c1ff5855eeee797abbb9afa4883658673ee232591d99ed4ea7ca25ec7d312'
            'aa7b621d9f3afe660c7c5c603c14fa61d026452e521039abc2f00aa771f7dfe4565a3f5697ac57e6acdfb8c8ab34fe9c4424f0c43fd4d3673e9d5a76caae74b3'
            'a1754a37bae46d7f2e4afcd5ac562505f602e0e62dafa38c8be81b98e9cf38b99a8c27367fb063d1919787df96f012ce3b9837502294a22a4df1bce519a52232')

prepare() {
  cd "${srcdir}"/$pkgname-${pkgver}
  patch -p1 -i ../test.patch
}

build() {
  cd "${srcdir}"/$pkgname-${pkgver}

  ./configure \
    --prefix=/usr \
    --sbindir=/usr/bin \
    --enable-libargon2 \
    --disable-static
  make
}

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

  make DESTDIR="${pkgdir}" install

  # install hook
  install -D -m0644 "${srcdir}"/hooks-encrypt "${pkgdir}"/usr/lib/initcpio/hooks/encrypt
  install -D -m0644 "${srcdir}"/install-encrypt "${pkgdir}"/usr/lib/initcpio/install/encrypt
  install -D -m0644 "${srcdir}"/install-sd-encrypt "${pkgdir}"/usr/lib/initcpio/install/sd-encrypt
}