From 0e8e7223ab8927516af11301bc64ffbf07a69d4d Mon Sep 17 00:00:00 2001 From: Chewing_Bever Date: Thu, 2 Jun 2022 20:14:44 +0200 Subject: [PATCH] fix(arch): properly install man pages --- PKGBUILD | 10 +++++++--- PKGBUILD.dev | 10 +++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index c33843f5..c2c33b27 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -5,6 +5,7 @@ pkgbase='vieter' pkgname='vieter' pkgver='0.3.0_alpha.2' pkgrel=1 +pkgdesc="Vieter is a lightweight implementation of an Arch repository server." depends=('glibc' 'openssl' 'libarchive' 'sqlite') makedepends=('git' 'vieter-v') arch=('x86_64' 'aarch64') @@ -17,14 +18,17 @@ build() { cd "$pkgname" make prod + + # The default CFLAGS for some reason causes vieter to segfault if used + # inside the PKGBUILD. As a workaround, we use tcc to build a debug build + # that does work, so we can generate the manpages. + CFLAGS= make man } package() { - pkgdesc="Vieter is a lightweight implementation of an Arch repository server." - install -dm755 "$pkgdir/usr/bin" install -Dm755 "$pkgname/pvieter" "$pkgdir/usr/bin/vieter" install -dm755 "$pkgdir/usr/share/man/man1" - "$pkgname/pvieter" man "$pkgdir/usr/share/man/man1" + install -Dm644 "$pkgname/man"/*.1 "$pkgdir/usr/share/man/man1" } diff --git a/PKGBUILD.dev b/PKGBUILD.dev index 1aa07305..babb6aad 100644 --- a/PKGBUILD.dev +++ b/PKGBUILD.dev @@ -5,6 +5,7 @@ pkgbase='vieter-git' pkgname='vieter-git' pkgver=0.2.0.r25.g20112b8 pkgrel=1 +pkgdesc="Vieter is a lightweight implementation of an Arch repository server." depends=('glibc' 'openssl' 'libarchive' 'sqlite') makedepends=('git' 'vieter-v') arch=('x86_64' 'aarch64') @@ -25,14 +26,17 @@ build() { cd "$pkgname" make prod + + # The default CFLAGS for some reason causes vieter to segfault if used + # inside the PKGBUILD. As a workaround, we use tcc to build a debug build + # that does work, so we can generate the manpages. + CFLAGS= make man } package() { - pkgdesc="Vieter is a lightweight implementation of an Arch repository server." - install -dm755 "$pkgdir/usr/bin" install -Dm755 "$pkgname/pvieter" "$pkgdir/usr/bin/vieter" install -dm755 "$pkgdir/usr/share/man/man1" - "$pkgname/pvieter" man "$pkgdir/usr/share/man/man1" + install -Dm644 "$pkgname/man"/*.1 "$pkgdir/usr/share/man/man1" }