summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e12add92e483a4f9a21d51475f09e5b6d3c60142 (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: solopasha <daron439 at gmail dot com>
pkgname=picocrypt-git
pkgver=1.41.r0.21ab207
pkgrel=1
pkgdesc="A very small, very simple, yet very secure encryption tool."
arch=('x86_64')
url="https://github.com/Picocrypt/Picocrypt"
license=("GPL3")
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
depends=(gtk3)
makedepends=(git go)
options=(!lto)
source=("${pkgname}::git+${url}.git"
        picocrypt.desktop)
sha512sums=('SKIP'
            '1c499ed01d8550a0be97084903776e1b3c8922401e6a73270457ffdcfe879449d3d718ed4c3ae9dc2cf90a98952b76c9bf455871fbace77a563a8681dddf1d81')

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


build() {
    export GOPATH="$srcdir"/gopath
    export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
    export CGO_CPPFLAGS="${CPPFLAGS}"
    export CGO_CFLAGS="${CFLAGS}"
    export CGO_CXXFLAGS="${CXXFLAGS}"
    export CGO_LDFLAGS="${LDFLAGS}"
    export CGO_ENABLED=1
    cd "$pkgname/src"
    go build -o "${pkgname%-git}" ./Picocrypt.go
}
package(){
    install -Dm755 "${pkgname}/src/${pkgname%-git}" -t "${pkgdir}/usr/bin"
    install -Dm644 "${pkgname}/images/key.svg" "${pkgdir}/usr/share/pixmaps/picocrypt.svg"
    install -Dm644 picocrypt.desktop -t "${pkgdir}/usr/share/applications"
}