From 888a4930f4b1a04fc4487fadf3303ade1ea50477 Mon Sep 17 00:00:00 2001 From: komeil Parseh Date: Sat, 10 Sep 2022 19:45:43 +0430 Subject: [PATCH] add makepkg --- package/.SRCINFO | 22 +++++++++++++++ package/.gitignore | 5 ++++ package/PKGBUILD | 42 ++++++++++++++++++++++++++++ package/parch-grub-dark-git.install | 15 ++++++++++ package/parch-grub-light-git.install | 15 ++++++++++ 5 files changed, 99 insertions(+) create mode 100644 package/.SRCINFO create mode 100644 package/.gitignore create mode 100644 package/PKGBUILD create mode 100644 package/parch-grub-dark-git.install create mode 100644 package/parch-grub-light-git.install diff --git a/package/.SRCINFO b/package/.SRCINFO new file mode 100644 index 0000000..9a709b0 --- /dev/null +++ b/package/.SRCINFO @@ -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 diff --git a/package/.gitignore b/package/.gitignore new file mode 100644 index 0000000..1dc48da --- /dev/null +++ b/package/.gitignore @@ -0,0 +1,5 @@ +parchlinux* +*.zst +src +pkg + diff --git a/package/PKGBUILD b/package/PKGBUILD new file mode 100644 index 0000000..48c30f2 --- /dev/null +++ b/package/PKGBUILD @@ -0,0 +1,42 @@ +# Maintainer: Komeil Parseh + +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 +} diff --git a/package/parch-grub-dark-git.install b/package/parch-grub-dark-git.install new file mode 100644 index 0000000..8c155bc --- /dev/null +++ b/package/parch-grub-dark-git.install @@ -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." +} diff --git a/package/parch-grub-light-git.install b/package/parch-grub-light-git.install new file mode 100644 index 0000000..8130406 --- /dev/null +++ b/package/parch-grub-light-git.install @@ -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." +}