️ perf: more conscise package build script

This commit is contained in:
eshanized
2024-12-31 04:53:34 +05:30
parent 5624401de5
commit 8a56c12bf5

View File

@@ -5,49 +5,36 @@ org=Snigdha-OS
pkgver=r251.f2df36f4
_pkgver=1.0.9
pkgrel=1
pkgdesc=""
arch=(
'any'
)
pkgdesc="A powerful framework for managing security tools on Snigdha OS"
arch=('any')
url="https://snigdhaos.org/"
license=(
'MIT'
)
depends=(
'yad'
'wget'
'qt5-base'
)
optdepends=(
'pacmac'
)
makedepends=(
'git'
'cmake'
)
license=('MIT')
depends=('yad' 'wget' 'qt5-base')
optdepends=('pamac: For graphical package management')
makedepends=('git' 'cmake')
groups=()
source=(
"https://github.com/${org}/${pkgname}/archive/refs/tags/v${_pkgver}.tar.gz"
)
sha256sums=(
'SKIP'
)
source=("https://github.com/${org}/${pkgname}/archive/refs/tags/v${_pkgver}.tar.gz")
sha256sums=('SKIP')
pkgver() {
# cd "${srcdir}/${pkgname}-${_pkgver}" || exit 1
# Extract the version dynamically using git
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
build() {
# Configure and build the project
cmake -B build -S "$pkgname-$_pkgver" \
-DCMAKE_BUILD_TYPE='Release' \
-DCMAKE_INSTALL_PREFIX='/usr' \
-Who-dev
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-Wno-dev
make -C build
}
package() {
# Install built files to the package directory
make -C build DESTDIR="$pkgdir" install
install -d "$pkgdir"/usr
cp -rf "$srcdir"/$pkgname-$_pkgver/usr "$pkgdir"
}
# Ensure proper directory structure
install -d "$pkgdir/usr"
cp -rf "$srcdir/$pkgname-$_pkgver/usr" "$pkgdir"
}