blob: 3be236d1833f577732cc48aabc76bcf0bd55d4a1 (
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
|
# Maintainer: Filipe Nascimento <flipee at tuta dot io>
pkgname=qrcp
pkgver=0.11.2
pkgrel=1
pkgdesc="Transfer files over Wi-Fi from your computer to a mobile device by scanning a QR code without leaving the terminal"
arch=('i686' 'x86_64' 'armv7h' 'aarch64')
url="https://github.com/claudiodangelis/qrcp"
license=('MIT')
depends=('glibc')
makedepends=('go')
source=("$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz")
sha256sums=('fd8723e1f792902a1a0eff07242b2915eeec66741c08f5fa1ecdaefce607f168')
build() {
cd $pkgname-$pkgver
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}"
go build \
-trimpath \
-buildmode=pie \
-mod=readonly \
-modcacherw \
-ldflags "-linkmode=external
-X \"github.com/claudiodangelis/qrcp/version.version=$pkgver\"
-X \"github.com/claudiodangelis/qrcp/version.date=$(date -d@"$SOURCE_DATE_EPOCH" +%Y-%m-%dT%H:%M:%SZ)\"" \
./qrcp completion bash | install -Dm644 /dev/stdin share/bash-completion/completions/qrcp
./qrcp completion zsh | install -Dm644 /dev/stdin share/zsh/site-functions/_qrcp
./qrcp completion fish | install -Dm644 /dev/stdin share/fish/vendor_completions.d/qrcp.fish
}
package() {
cd $pkgname-$pkgver
install -Dm755 $pkgname -t "$pkgdir/usr/bin"
cp -r share/ "$pkgdir/usr"
install -Dm644 README.md -t "$pkgdir/usr/share/doc/$pkgname"
install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
}
|