diff options
author | Sergey Zolotorev | 2018-12-29 00:53:35 +0300 |
---|---|---|
committer | Sergey Zolotorev | 2018-12-29 00:53:35 +0300 |
commit | 79dfc1ccbca21199ac31b507d63c0a4a3f431e00 (patch) | |
tree | f030b90c31d10a04e5826b4a48b49c0cfbe2accb | |
download | aur-79dfc1ccbca21199ac31b507d63c0a4a3f431e00.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 19 | ||||
-rw-r--r-- | PKGBUILD | 22 | ||||
-rw-r--r-- | kernel-install-add.hook | 14 | ||||
-rw-r--r-- | kernel-install-remove.hook | 14 |
4 files changed, 69 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..6fc18f388f9a --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,19 @@ +pkgbase = pacman-kernel-install-git + pkgdesc = pacman hooks for kernel-install + pkgver = r20.29f5c94 + pkgrel = 1 + url = https://gitlab.com/crazyh/pacman-kernel-install + arch = any + license = GPL + makedepends = git + depends = bash + depends = mkinitcpio + depends = systemd + provides = pacman-kernel-install + source = kernel-install-add.hook + source = kernel-install-remove.hook + md5sums = SKIP + md5sums = SKIP + +pkgname = pacman-kernel-install-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..047ebe4fda9f --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,22 @@ +# Maintainer: Sergey Zolotorev <sergey.zolotorev@gmail.com> + +pkgname=pacman-kernel-install-git +pkgver=r20.29f5c94 +pkgrel=1 +pkgdesc='pacman hooks for kernel-install' +url='https://gitlab.com/crazyh/pacman-kernel-install' +license=('GPL') +source=('kernel-install-add.hook' 'kernel-install-remove.hook') +md5sums=(SKIP{,}) +arch=('any') +depends=('bash' 'mkinitcpio' 'systemd') +makedepends=('git') +provides=("${pkgname%-git}") + +pkgver() { + printf 'r%s.%s' "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +package() { + install -Dm 644 -t "${pkgdir}/usr/share/libalpm/hooks" *.hook +} diff --git a/kernel-install-add.hook b/kernel-install-add.hook new file mode 100644 index 000000000000..749909d19321 --- /dev/null +++ b/kernel-install-add.hook @@ -0,0 +1,14 @@ +[Trigger] +Operation = Install +Operation = Upgrade +Type = File +Target = boot/vmlinuz-linux* + +[Action] +Description = Adding kernel and initramfs images to /boot... +When = PostTransaction +Exec = /bin/bash -c 'shopt -s extglob && . /usr/lib/initcpio/functions && while read -r f; do kernel-install add "$(kver "${f}")" "${f}"; done' +Depends = bash +Depends = mkinitcpio +Depends = systemd +NeedsTargets diff --git a/kernel-install-remove.hook b/kernel-install-remove.hook new file mode 100644 index 000000000000..d0e2febf603f --- /dev/null +++ b/kernel-install-remove.hook @@ -0,0 +1,14 @@ +[Trigger] +Operation = Upgrade +Operation = Remove +Type = File +Target = boot/vmlinuz-linux* + +[Action] +Description = Removing kernel and initramfs images from /boot... +When = PreTransaction +Exec = /bin/bash -c 'shopt -s extglob && . /usr/lib/initcpio/functions && while read -r f; do kernel-install remove "$(kver "${f}")"; done' +Depends = bash +Depends = mkinitcpio +Depends = systemd +NeedsTargets |