Add service and other setup files
This commit is contained in:
51
PKGBUILD
51
PKGBUILD
@ -6,31 +6,50 @@ arch=('x86_64')
|
||||
license=('MIT')
|
||||
makedepends=('go')
|
||||
url="https://gitea.balki.me/balki/$pkgname"
|
||||
source=("$pkgname::git+$url#branch=anyhttp")
|
||||
source=("$pkgname::git+$url#branch=anyhttp"
|
||||
bookmarks-example.toml
|
||||
pgweb.service
|
||||
pgweb.socket
|
||||
pgweb.sysusers
|
||||
pgweb.tmpfiles
|
||||
)
|
||||
sha256sums=('SKIP'
|
||||
'd19da3e2a7a1f4d35abf0992563792a51bf1a22074345d7a7c7de9f2209b21da'
|
||||
'38fe5b4af46ea97f00780b36a73976b325574352e6005ac524921ff3acd784bd'
|
||||
'8f2bd788a7f64ebe3d0f1b87d8da2eaee884dba96593c2f85883a5eb91a8b9e4'
|
||||
'1d5a0bf82a1c1a9f260252a3a1d09333150c78a5c830fb04ca24f331062a9767'
|
||||
'c11001ac35239b2a8be38d831ce62c67624df0ce5ed894850d129627b1eaa408')
|
||||
|
||||
prepare(){
|
||||
cd "$pkgname"
|
||||
mkdir -p build/
|
||||
prepare() {
|
||||
cd "$pkgname"
|
||||
mkdir -p build/
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$pkgname"
|
||||
export CGO_CPPFLAGS="${CPPFLAGS}"
|
||||
export CGO_CFLAGS="${CFLAGS}"
|
||||
export CGO_CXXFLAGS="${CXXFLAGS}"
|
||||
export CGO_LDFLAGS="${LDFLAGS}"
|
||||
export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
|
||||
go build -o build
|
||||
cd "$pkgname"
|
||||
export CGO_CPPFLAGS="${CPPFLAGS}"
|
||||
export CGO_CFLAGS="${CFLAGS}"
|
||||
export CGO_CXXFLAGS="${CXXFLAGS}"
|
||||
export CGO_LDFLAGS="${LDFLAGS}"
|
||||
export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
|
||||
go build -o build
|
||||
}
|
||||
|
||||
check() {
|
||||
cd "$pkgname"
|
||||
# go test ./...
|
||||
cd "$pkgname"
|
||||
# tests depend on createdb command to be present
|
||||
# go test ./...
|
||||
true
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$pkgname"
|
||||
install -Dm755 build/$pkgname "$pkgdir"/usr/bin/$pkgname
|
||||
cd "$pkgname"
|
||||
install -Dm 755 build/$pkgname "${pkgdir}/usr/bin/$pkgname"
|
||||
install -Dm 644 LICENSE "${pkgdir}/usr/share/doc/pgweb/LICENSE"
|
||||
install -Dm 644 README.md "${pkgdir}/usr/share/doc/pgweb/README.md"
|
||||
install -Dm 644 "${srcdir}/pgweb.service" "${pkgdir}/usr/lib/systemd/system/pgweb.service"
|
||||
install -Dm 644 "${srcdir}/pgweb.socket" "${pkgdir}/usr/lib/systemd/system/pgweb.socket"
|
||||
install -Dm 644 "${srcdir}/bookmarks-example.toml" "${pkgdir}/usr/share/doc/pgweb/bookmarks-example.toml"
|
||||
install -Dm 644 "${srcdir}/pgweb.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/pgweb.conf"
|
||||
install -Dm 644 "${srcdir}/pgweb.sysusers" "${pkgdir}/usr/lib/sysusers.d/pgweb.conf"
|
||||
}
|
||||
sha256sums=('SKIP')
|
||||
|
Reference in New Issue
Block a user