blob: f5f5098ccb085bb7225783f3e1c854d97c7c3e47 (
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
|
# Maintainer: Pedro H Lara Campos <root@pedrohlc.com>
# Contributor: Ben Morgan (@cassava)
# Contributor: bartus <szczepaniak.bartek+github@gmail.com>
# Contributor: Mark Wagie <mark.wagie@tutanota.com>
# Contributor: Alad Wenter <alad@mailbox.org>
# Contributor: Ben Morgan <neembi@gmail.com>
# Contributor: Stefan Husmann <stefan-husmann@t-online.de>
_pkgname=repoctl
pkgname="${_pkgname}-devel-git"
pkgdesc="A supplement to repo-add and repo-remove which simplifies managing local repositories (devel branch from git)"
arch=('i686' 'x86_64' 'armv7h')
url="https://github.com/cassava/repoctl"
license=('MIT')
depends=('pacman')
makedepends=('go-pie' 'git')
source=("${_pkgname}::git+https://github.com/cassava/repoctl.git#branch=devel")
md5sums=('SKIP')
provides=('repoctl')
conflicts=('repoctl' 'repoctl-git')
pkgver=0.21.r0.g92ed55f
pkgrel=1
pkgver() {
git -C "$srcdir/${_pkgname}" describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
build() {
cd "${srcdir}/${_pkgname}"
export CGO_LDFLAGS="${LDFLAGS}"
export GOFLAGS="-buildmode=pie -trimpath -mod=vendor -modcacherw"
export GOPATH="$srcdir"
go build
}
package() {
cd "${srcdir}/${_pkgname}"
# Install repoctl program
install -d "$pkgdir/usr/bin"
install -m755 repoctl "$pkgdir/usr/bin/"
# Install other documentation
install -d "$pkgdir/usr/share/doc/repoctl"
install -m644 README.md NEWS.md "$pkgdir/usr/share/doc/repoctl/"
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/repoctl/LICENSE"
# Generate completion files (spf13/cobra)
install -d "$pkgdir"/usr/share/{{bash-completion,fish}/completions,zsh/site-functions}
./repoctl completion bash > "$pkgdir/usr/share/bash-completion/completions/repoctl"
./repoctl completion zsh > "$pkgdir/usr/share/zsh/site-functions/_repoctl"
./repoctl completion fish > "$pkgdir/usr/share/fish/completions/repoctl.fish"
}
# vim: set ts=2 sw=2:
|