From c2a26f95eaae6a6481d6aae93fb3698f56690478 Mon Sep 17 00:00:00 2001 From: eshanized Date: Wed, 1 Jan 2025 06:34:46 +0530 Subject: [PATCH] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20perf:=20changes=20in=20fun?= =?UTF-8?q?ctions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- snigdhaos-system-config/PKGBUILD | 48 +++++++++++++++++++------------- 1 file changed, 28 insertions(+), 20 deletions(-) diff --git a/snigdhaos-system-config/PKGBUILD b/snigdhaos-system-config/PKGBUILD index f2aa8980..6c3d8dfe 100644 --- a/snigdhaos-system-config/PKGBUILD +++ b/snigdhaos-system-config/PKGBUILD @@ -1,38 +1,46 @@ # Maintainer: Eshan Roy pkgname=snigdhaos-system-config -org=Snigdha-OS -_pkgname=snigdhaos-system-config -_destname1="/etc" -_destname2="/usr" -_licensedir="/usr/share/snigdhaos/licenses/" +org="Snigdha-OS" +_repo_name="snigdhaos-system-config" pkgver=1 pkgrel=1 -pkgdesc="Snigdha OS System Config!" +pkgdesc="Snigdha OS System Config" arch=('any') -url="https://github.com/$org/$_pkgname" +url="https://github.com/$org/$_repo_name" license=('MIT') makedepends=('git') depends=() conflicts=('snigdhaos-system-config-next') -backup=('etc/pacman.d/gnupg/gpg.conf' 'etc/X11/xorg.conf.d/30-touchpad.conf') -provides=("${pkgname}") -options=( !strip !emptydirs ) -source=(${pkgname}::"git+https://github.com/${org}/${_pkgname}") +backup=( + 'etc/pacman.d/gnupg/gpg.conf' + 'etc/X11/xorg.conf.d/30-touchpad.conf' +) +provides=($pkgname) +options=('!strip' '!emptydirs') +source=("${pkgname}::git+https://github.com/${org}/${_repo_name}") sha256sums=('SKIP') -install=$pkgname.install +install="$pkgname.install" -pkgver(){ +_licensedir="/usr/share/snigdhaos/licenses/$pkgname" +_dest_etc="/etc" +_dest_usr="/usr" + +pkgver() { + cd "$srcdir/$pkgname" printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" } package() { - install -dm755 "$pkgdir/$_licensedir/$_pkgname" - install -m644 "$srcdir/$pkgname/LICENSE" "$pkgdir/$_licensedir/$_pkgname" + # Create license directory and install the license + install -dm755 "$pkgdir/$_licensedir" + install -m644 "$srcdir/$pkgname/LICENSE" "$pkgdir/$_licensedir" - install -dm755 "$pkgdir/$_destname1" - cp -r ${srcdir}/${pkgname}/${_destname1} ${pkgdir} + # Copy files to /etc + install -dm755 "$pkgdir$_dest_etc" + cp -r "$srcdir/$pkgname$_dest_etc"/* "$pkgdir$_dest_etc" - install -dm755 "$pkgdir$_destname2" - cp -r ${srcdir}/${pkgname}/${_destname2} ${pkgdir} -} \ No newline at end of file + # Copy files to /usr + install -dm755 "$pkgdir$_dest_usr" + cp -r "$srcdir/$pkgname$_dest_usr"/* "$pkgdir$_dest_usr" +}