Skip to content

Commit

Permalink
Merge commit 'refs/pull/103/head' of github.com:Foxboron/sbctl
Browse files Browse the repository at this point in the history
  • Loading branch information
Foxboron committed Oct 24, 2021
2 parents 5b04ceb + 2416b1a commit fca627a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
PROGNM := sbctl
PREFIX := /usr/local
BINDIR := $(PREFIX)/bin
LIBDIR := $(PREFIX)/lib
SHRDIR := $(PREFIX)/share
DOCDIR := $(PREFIX)/share/doc
MANDIR := $(PREFIX)/share/man
Expand Down Expand Up @@ -35,7 +36,7 @@ install: sbctl completions man
install -Dm644 contrib/completions/bash-completion/completions/sbctl '$(DESTDIR)$(SHRDIR)/bash-completion/completions/sbctl'
install -Dm644 contrib/completions/zsh/site-functions/_sbctl '$(DESTDIR)$(SHRDIR)/zsh/site-functions/_sbctl'
install -Dm644 contrib/completions/fish/vendor_completions.d/sbctl.fish '$(DESTDIR)$(SHRDIR)/fish/vendor_completions.d/sbctl.fish'
install -Dm755 contrib/kernel-install/91-sbctl.install '$(DESTDIR)/usr/lib/kernel/install.d/91-sbctl.install'
install -Dm755 contrib/kernel-install/91-sbctl.install '$(DESTDIR)$(LIBDIR)/kernel/install.d/91-sbctl.install'
install -Dm644 LICENSE -t '$(DESTDIR)$(SHRDIR)/licenses/$(PROGNM)'

.PHONY: release
Expand Down Expand Up @@ -69,3 +70,11 @@ test:
.PHONY: integration
integration:
go test -v tests/integration_test.go

.PHONY: local-aur
.ONESHELL:
local-aur:
cd ./contrib/aur/sbctl-git
mkdir -p ./src
ln -srfT $(CURDIR) ./src/sbctl
makepkg --holdver --syncdeps --noextract --force
5 changes: 1 addition & 4 deletions contrib/aur/sbctl-git/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,12 @@ build(){
export CGO_CFLAGS="${CFLAGS}"
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export GOFLAGS="-buildmode=pie -trimpath -modcacherw"
export GOFLAGS="-buildmode=pie -ldflags=-linkmode=external -trimpath -modcacherw"
make
}

package(){
cd "${pkgname%-git}"
make PROGNM="sbctl-git" PREFIX="$pkgdir/usr" install
./sbctl completion bash | install -Dm644 /dev/stdin "$pkgdir/usr/share/bash-completion/completions/sbctl"
./sbctl completion zsh | install -Dm644 /dev/stdin "$pkgdir/usr/share/zsh/site-functions/_sbctl"
./sbctl completion fish | install -Dm644 /dev/stdin "$pkgdir/usr/share/fish/vendor_completions.d/sbctl.fish"
install -Dm644 ./contrib/pacman/ZZ-sbctl.hook "${pkgdir}/usr/share/libalpm/hooks/99-sbctl.hook"
}

0 comments on commit fca627a

Please sign in to comment.