blob: 609bc0e30e424e84d8263278d530d5974d143a30 (
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
|
# Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net>
pkgname=croc-git
pkgver=9.6.4.r14.gcd1162f
pkgrel=1
pkgdesc="Easily and securely send things from one computer to another"
arch=('i686' 'x86_64')
url="https://schollz.com/blog/croc6/"
license=('MIT')
depends=('glibc')
makedepends=('git' 'go')
provides=("croc=$pkgver")
conflicts=('croc')
source=("git+https://github.com/schollz/croc.git")
sha256sums=('SKIP')
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}"
export GOFLAGS="-buildmode=pie -ldflags=-linkmode=external -trimpath -mod=readonly -modcacherw"
pkgver() {
cd "croc"
git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
build() {
cd "croc"
go build \
-o croc \
main.go
}
check() {
cd "croc"
go test \
./...
}
package() {
cd "croc"
install -Dm755 "croc" -t "$pkgdir/usr/bin"
install -Dm644 "croc.service" -t "$pkgdir/usr/lib/systemd/system"
install -Dm644 "LICENSE" -t "$pkgdir/usr/share/licenses/croc"
}
|