-
Notifications
You must be signed in to change notification settings - Fork 0
/
Pkgfile
37 lines (30 loc) · 1.27 KB
/
Pkgfile
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
# Description: CRUX port utility written in Go, aiming to replace prt-get, ports, and some pkgutils.
# URL: https://github.com/onodera-punpun/prt
# Maintainer: onodera, https://github.com/onodera-punpun/crux-ports/issues
# Depends on: go
# Optional: fish graphviz
name=prt
version=git
release=2
source=()
build() {
export GOPATH=$(pwd)
go get -v github.com/onodera-punpun/$name
install -Dm755 bin/$name $PKG/usr/bin/$name
cd src/github.com/onodera-punpun/$name
install -Dm755 runtime/pkgmk/pkgmk $PKG/usr/share/prt/pkgmk
install -Dm644 runtime/config/config.toml $PKG/etc/prt/config.toml
# Convert and install man pages
go get -u -v -fix github.com/cpuguy83/go-md2man
for f in $(ls runtime/man); do
$GOPATH/bin/go-md2man -in runtime/man/$f -out runtime/man/$f.man
install -Dm644 runtime/man/$f.man $PKG/usr/share/man/man8/$(echo $f | cut -d '.' -f 1).8
done
# Install shell files
install -Dm644 runtime/bash/functions/cdp.sh $PKG/etc/profile.d/cdp.sh
if [[ -e '/usr/bin/fish' ]]; then
install -Dm644 runtime/fish/functions/cdp.fish $PKG/usr/share/fish/functions/cdp.fish
install -Dm644 runtime/fish/completions/prt.fish $PKG/usr/share/fish/completions/prt.fish
install -Dm644 runtime/fish/completions/cdp.fish $PKG/usr/share/fish/completions/cdp.fish
fi
}