You are not logged in.
Pages: 1
Hello, I`m new to this and want review on my PKGBUILD of topmem app
Thanks in advance
# Maintainer: develux <erroor234@gmail.com>
pkgname=topmem-cpp
pkgver=0.1
pkgrel=1
pkgdesc="It shows the top 10 processes using RAM and SWAP"
arch=('x86_64')
url="https://github.com/develux44/topmem-cpp"
license=('GPL-3.0-only')
makedepends=(gcc git)
source=("git+https://github.com/develux44/topmem-cpp.git#branch=main")
sha256sums=('SKIP')
build() {
cd topmem-cpp
make
}
package() {
cd topmem-cpp
install -Dm755 topmem $pkgdir/usr/bin/topmem
}
Last edited by develux (2024-05-26 08:31:42)
Offline
source=("git+https://github.com/develux44/topmem-cpp.git#branch=main")
If main is the default branch for your upstream repo, you can omit #branch= from the source-url .
Since your pulling from git and not a released tarball, this qualifies as a VCS package .
The pkgname should be suffixed with -git, you need to have a pkgver() function and conflict with the (future) non-vcs version.
See https://wiki.archlinux.org/title/VCS_package_guidelines .
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
This way?
# Maintainer: develux <erroor234@gmail.com>
pkgname=topmem-cpp-git
pkgver=r37.a243537
pkgrel=1
pkgdesc="It shows the top 10 processes using RAM and SWAP"
arch=('x86_64')
url="https://github.com/develux44/topmem-cpp"
license=('GPL-3.0-only')
makedepends=(gcc git)
conflicts=(topmem-cpp)
provides=("topmem-cpp=${pkgver}")
source=("git+https://github.com/develux44/topmem-cpp.git")
sha256sums=('SKIP')
pkgver() {
cd topmem-cpp
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
}
build() {
cd topmem-cpp
make
}
package() {
cd topmem-cpp
install -Dm755 topmem $pkgdir/usr/bin/topmem
}
Offline
Looks good, yes.
One thing :
archlinux default settings are to build 2 binaries : a stripped executable AND one with debug symbols .
If your project doesn't use debug symbols, you should disable creating the debug package.
man PKGBUILD > options(array) lists all flags that can be enabled/disabled .
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
Looks good, yes.
One thing :
archlinux default settings are to build 2 binaries : a stripped executable AND one with debug symbols .
If your project does't use debug symbols, you should disable creating the debug package.man PKGBUILD > options(array) lists all flags that can be enabled/disabled .
Added
options=(strip !docs !debug lto)
should disable debug and improve performance a bit
Thank you so much for your help
Offline
makedepends=(gcc git)
gcc is a dependency of base-devel which is an implicit dependency of all PKGBUILD's.
options=(strip !docs !debug lto)
lto and strip are current defaults. Also lto relies on the projects build system using the flags makepkg exports. As the projects current Makefile does not use any environment variables it does not work.
Offline
Pages: 1