add makepkg

This commit is contained in:
komeil Parseh 2022-09-10 19:45:43 +04:30
parent 73c76a8cfe
commit 888a4930f4
No known key found for this signature in database
GPG key ID: 1928AF673B1C4255
5 changed files with 99 additions and 0 deletions

22
package/.SRCINFO Normal file
View file

@ -0,0 +1,22 @@
pkgbase = parch-grub-light
pkgdesc = Parchlinux grub theme
pkgver = r2.73c76a8
pkgrel = 1
epoch = 2
url = https://github.com/parchlinux/parch-grub-theme
arch = any
license = GPL-3
makedepends = git
depends = grub
provides = parch-grub-theme
conflicts = parch-grub-theme
source = parch-grub-light::git+https://github.com/parchlinux/parch-grub-theme
md5sums = SKIP
pkgname = parch-grub-light
pkgdesc = Parchlinux grub theme -- Light
install = parch-grub-light.install
pkgname = parch-grub-light
pkgdesc = Parchlinux grub theme -- Light
install = parch-grub-light.install

5
package/.gitignore vendored Normal file
View file

@ -0,0 +1,5 @@
parchlinux*
*.zst
src
pkg

42
package/PKGBUILD Normal file
View file

@ -0,0 +1,42 @@
# Maintainer: Komeil Parseh <ahmdparsh129 at gmail dot com>
pkgname=(
parch-grub-dark-git
parch-grub-light-git)
pkgbase=parchlinux-grub-theme-git
_pkg="${pkgbase%-git}"
pkgver=r2.73c76a8
pkgrel=1
pkgdesc='Parchlinux theme for GRUB2'
arch=('any')
url='https://github.com/parchlinux/parch-grub-theme'
license=('MIT')
makedepends=('git')
source=("$_pkg::git+$url")
sha256sums=('SKIP')
pkgver() {
cd "${_pkg}"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
_package() {
cd "${_pkg}"
install -d "$pkgdir/usr/share/grub/themes/"
cp -a --no-preserve=ownership "${pkgname%-git}" "$pkgdir/usr/share/grub/themes/${pkgname%-git}"
install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
}
package_parch-grub-dark-git() {
pkgdesc+=' -- Dark'
install=$pkgname.install
_package parch-grub-dark
}
package_parch-grub-light-git() {
pkgdesc+=' -- Light'
install=$pkgname.install
_package parch-grub-light
}

View file

@ -0,0 +1,15 @@
. /usr/share/makepkg/util/message.sh
colorize
post_install() {
msg "Installed Parch Dark GRUB2 theme."
msg2 "To enable the theme, change 'GRUB_THEME' variable in '/etc/default/grub' file to"
msg2 "'/usr/share/grub/themes/parch-grub-dark', uncomment it and update GRUB config with running"
msg2 "'grub-mkconfig -o /boot/grub/grub.cfg' as root."
}
post_remove() {
warning "Uninstalled Parch Dark GRUB2 theme."
msg2 "To disable the theme, comment 'GRUB_THEME' variable in '/etc/default/grub' file"
msg2 "and update GRUB config with running 'grub-mkconfig -o /boot/grub/grub.cfg' as root."
}

View file

@ -0,0 +1,15 @@
. /usr/share/makepkg/util/message.sh
colorize
post_install() {
msg "Installed Parch Light GRUB2 theme."
msg2 "To enable the theme, change 'GRUB_THEME' variable in '/etc/default/grub' file to"
msg2 "'/usr/share/grub/themes/parch-grub-light', uncomment it and update GRUB config with running"
msg2 "'grub-mkconfig -o /boot/grub/grub.cfg' as root."
}
post_remove() {
warning "Uninstalled Parch Light GRUB2 theme."
msg2 "To disable the theme, comment 'GRUB_THEME' variable in '/etc/default/grub' file"
msg2 "and update GRUB config with running 'grub-mkconfig -o /boot/grub/grub.cfg' as root."
}