blob: e4377eb53d20785edb1663a4bd025d0c4228efdd (
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: qubidt <qubidt at gmail dot com>
pkgname=fienode-git
_pkgname=fienode
pkgver=1.0+9+g57ab25b
pkgrel=2
pkgdesc="Discover identical CoW copies, analogous to an inode"
arch=("x86_64")
url="https://github.com/pwaller/fienode"
license=("MIT")
depends=()
makedepends=("git" "go")
provides=("$_pkgname")
conflicts=("$_pkgname")
options=(!lto)
source=(
"$pkgname::git+${url}.git"
"go-fibmap::git+https://github.com/frostschutz/go-fibmap"
)
validpgpkeys=("5DE3E0509C47EA3CF04A42D34AEE18F83AFDEB23")
sha256sums=('SKIP' 'SKIP')
pkgver() {
cd "${pkgname}"
git describe --tags | sed 's/^v//;s/-/+/g'
}
prepare() {
cd "${pkgname}"
git submodule init
git config submodule.vendor/github.com/frostschutz/go-fibmap.url "$srcdir/go-fibmap"
git -c protocol.file.allow=always submodule update
go mod init "${url#*://}"
go mod tidy
go mod vendor
}
build() {
cd "${pkgname}"
export CGO_LDFLAGS="${LDFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export GOFLAGS="-buildmode=pie -trimpath -mod=vendor -modcacherw"
go build -ldflags="-s -w" .
}
package() {
cd "${pkgname}"
install -Dm755 -t "${pkgdir}/usr/bin/" "${_pkgname}"
}
|