summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5f649d09ab06c2c552bf4b7ab502902fd2a62fe9 (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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# Maintainer: Lucas Werkmeister <mail@lucaswerkmeister.de>

# The following people have contributed to keepassxc-git package
# Contributor: Chih-Hsuan Yen <yan12125@gmail.com>
# Contributor: Daniel Landau <daniel@landau.fi>
# Contributor: Maxqia <contrib@maxqia.com>

# The following people have contributed to keepassx-git package
# Contributor: Lev Lybin <aur@devtrue.net>
# Contributor: Jamie Macdonald <jamie.alban@gmail.com>
# Contributor: Alucryd <alucryd at gmail dot com>
# Contributor: Paolo Stivanin <admin at polslinux dot it>

pkgname=chipass-git
_gitname=ChiPass
pkgver=r4866.ge466fe6
pkgrel=1
pkgdesc="Modern, secure, and open-source password manager (fork of KeePassXC)"
arch=('i686' 'x86_64')
url="https://chipass.org/"
license=('GPL2')
depends=(
    'argon2'
    'botan'
    'desktop-file-utils'
    'hicolor-icon-theme'
    'libusb'
    'libxi'
    'libxtst'
    'minizip'
    'pcsclite'
    'qrencode'
    'qt6-5compat'
    'qt6-base'
    'qt6-svg'
    'qt6-translations'
    'qt6-wayland'
    'readline'
    'shared-mime-info'
    'zlib'
)
makedepends=(
    'appstream'
    'asciidoctor'
    'cmake'
    'gcc'
    'git'
    'ninja'
    'qt6-tools'
)
checkdepends=(
    'wl-clipboard'
    'xwayland-run'
)
provides=('org.freedesktop.secrets' "chipass=$pkgver")
conflicts=(
    'chipass'
    # the next two are hopefully temporary, but at the moment ChiPass still uses a lot of the same file paths as KeePassXC
    'keepassxc'
    'keepassxc-git'
)
options=(!emptydirs)
source=(git+https://codeberg.org/ChiPass/ChiPass.git)
md5sums=('SKIP')

pkgver() {
    cd "${_gitname}"
    # git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
    printf 'r%s.g%s' "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
}

build() {
    cd "${_gitname}"
    cmake -B build \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DCMAKE_INSTALL_BINDIR=/usr/bin \
        -DCMAKE_INSTALL_LIBDIR=/usr/lib \
        -DCMAKE_VERBOSE_MAKEFILE=OFF \
        -DWITH_GUI_TESTS=ON \
        -DWITH_XC_ALL=ON \
        -DCMAKE_BUILD_TYPE=RelWithDebInfo
    make -C build
}

check() {
    if ! wlheadless-run -- true; then
        printf >&2 '%s PKGBUILD: wlheadless-run is not set up, skipping tests.\n' "$pkgname"
        printf >&2 'To run the tests, select a compositor out of weston, kwin, mutter, gnome-kiosk, cage,\n'
        printf >&2 'and add it to %s/wlheadless/wlheadless.conf:\n' "${XDG_CONFIG_HOME:-~/.config}"
        printf >&2 '%s\n' '' '[DEFAULT]' 'Compositor = insert-compositor-here'
        return 0
    fi

    cd "${_gitname}/build"
    wlheadless-run -- make test
}

package() {
    cd "${_gitname}/build"
    make DESTDIR="${pkgdir}" install
}