1
0
Fork 0

In PKGBUILD noextract=() was removed. Added CGO_* and custom GOPATH env vars. Also added PREFIX var.

This commit is contained in:
Alexander Andreev 2023-12-15 04:24:33 +04:00
parent 8a6647f11a
commit 72284c299a
Signed by: Arav
GPG Key ID: D22A817D95815393
2 changed files with 16 additions and 10 deletions

View File

@ -2,7 +2,9 @@ TARGET=httpprocprobed
SYSDDIR_=${shell pkg-config systemd --variable=systemdsystemunitdir}
SYSDDIR=${SYSDDIR_:/%=%}
DESTDIR:=
PREFIX:=/usr/local
VERSION:=3.0.0
@ -17,15 +19,15 @@ ${TARGET}: ${SOURCES}
go build ${LDFLAGS} ${FLAGS}
install:
install -Dm 0755 ${TARGET} ${DESTDIR}usr/bin/${TARGET}
install -Dm 0644 configs/config.example.json ${DESTDIR}etc/${TARGET}.json
install -Dm 0644 LICENSE ${DESTDIR}usr/share/licenses/${TARGET}/LICENSE
install -Dm 0644 init/systemd.service ${DESTDIR}${SYSDDIR}/${TARGET}.service
install -Dm 0755 ${TARGET} ${DESTDIR}${PREFIX}/bin/${TARGET}
install -Dm 0644 configs/config.example.json ${DESTDIR}${PREFIX}etc/${TARGET}.json
install -Dm 0644 LICENSE ${DESTDIR}${PREFIX}/share/licenses/${TARGET}/LICENSE
install -Dm 0644 init/systemd.service ${DESTDIR}${PREFIX}${SYSDDIR}/${TARGET}.service
uninstall:
rm ${DESTDIR}usr/bin/${TARGET}
rm ${DESTDIR}usr/share/licenses/${TARGET}
rm ${DESTDIR}${SYSDDIR}/${TARGET}.service
rm ${DESTDIR}${PREFIX}/bin/${TARGET}
rm ${DESTDIR}${PREFIX}/share/licenses/${TARGET}
rm ${DESTDIR}${PREFIX}${SYSDDIR}/${TARGET}.service
clean:
rm httpprocprobed

View File

@ -9,15 +9,19 @@ license=('MIT')
makedepends=('go>=1.17')
backup=('etc/httpprocprobed.json')
source=("https://git.arav.su/Arav/httpprocprobed/archive/$pkgver.tar.gz")
noextract=()
md5sums=('SKIP')
build() {
cd "$srcdir/$pkgname"
make DESTDIR="$pkgdir/"
export GOPATH="$srcdir"/gopath
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}"
make VERSION=$pkgver DESTDIR="$pkgdir/" PREFIX="/usr"
}
package() {
cd "$srcdir/$pkgname"
make DESTDIR="$pkgdir/" install
make DESTDIR="$pkgdir/" PREFIX="/usr" install
}