summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 509ac3ea2849682560170fe06c3d51f7a507fcc3 (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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# Maintainer: Lex Black <autumn-wind at web dot de>
# Contributor: Rich Li <rich at dranek com>
# Contributor: Sam Stuewe <halosghost at archlinux dot org>
# Contributor: David Lo Re <boyska@gmail.com>
# Contributor: nignux <nignux@freaknet.org>

_name=tomb
pkgbase="${_name}-git"
pkgname=("${_name}-git" "${_name}-kdf-git" "${_name}-cloak-git")
pkgver=2.11.r76.g586b5cb
pkgrel=1
pkgdesc="simple tool to manage encrypted storage"
arch=('any')
url="https://www.dyne.org/software/tomb/"
license=('GPL-3.0-only')
makedepends=('git' 'libgcrypt')
conflicts=("${_name}")
provides=("${_name}")
source=("${_name}::git+https://github.com/dyne/${_name//t/T}.git"
        "_${_name}")
sha256sums=('SKIP'
            '69cf2daa7971f1cac76574e3988ebf285f8a900c46b0f1493066f037917a4d38')


pkgver() {
    cd "${_name}"
    git describe --long --tags | sed -r 's/([^-]*-g)/r\1/;s/-/./g;s/v//'
}

build() {
    cd "${_name}/extras/kdf-keys"
    make
}

package_tomb-git() {
    depends=('cryptsetup' 'gnupg' 'inetutils' 'sudo' 'zsh' 'e2fsprogs')
    optdepends=('lsof: allows the operation slam'
        'steghide: steganography'
        'dcfldd: show nice progress during massive I/O'
        'qrencode: for paper backups of keys'
        'plocate: fast search file names'
        'recoll: fast search file contents'
        'argon2: support for argon2 KDF'
        'acl: own mountpoint in /run/media/$USER')

    cd "${_name}"
    make DESTDIR="${pkgdir}" PREFIX=/usr install

    cd "extras/translations"
    make DESTDIR="${pkgdir}" PREFIX=/usr install

    install -Dm644 "${srcdir}/_${_name}" "${pkgdir}/usr/share/zsh/site-functions/_${_name}"
}

package_tomb-kdf-git() {
    pkgdesc="Crypto Undertaker extensions to improve password security"
    arch=('i686' 'x86_64')
    depends=('libgcrypt')
    conflicts=("${_name}-kdf")
    provides=("${_name}-kdf")

    cd "${_name}/extras/kdf-keys"
    make DESTDIR="${pkgdir}" PREFIX=/usr install
}

package_tomb-cloak-git() {
    pkgdesc="Crypto Undertaker extension for steganography"
    depends=('python')
    conflicts=("${_name}-cloak")
    provides=("${_name}-cloak")

    cd "${_name}/extras/cloak"
    make DESTDIR="${pkgdir}" PREFIX=/usr install

    # Install cipher files
    install -dm644 "${pkgdir}/usr/share/${_name}/ciphers"
    for cipher in ciphers/*; do
        install -m644 ${cipher} "${pkgdir}/usr/share/${_name}/ciphers"
    done
}