Browse Source

installkernel-scripts: move sources into git tree

Signed-off-by: Steven Noonan <steven@uplinklabs.net>
master
Steven Noonan 3 years ago
parent
commit
8cc3b80a6d
Signed by: steven GPG Key ID: 408EEB508ED0CD4D
  1. 24
      installkernel-scripts/PKGBUILD
  2. 11
      installkernel-scripts/postinst-mkinitcpio
  3. 11
      installkernel-scripts/postrm-mkinitcpio
  4. 17
      installkernel-scripts/update-grub

24
installkernel-scripts/PKGBUILD

@ -1,21 +1,29 @@
# Maintainer: Steven Noonan <steven@uplinklabs.net>
pkgname=installkernel-scripts
pkgver=2
pkgver=3
pkgrel=1
pkgdesc="Postinstall hooks for Linux kernel installs"
url="https://git.uplinklabs.net/steven/projects/archlinux/misc-packages.git/tree/installkernel-scripts"
arch=(any)
depends=('debianutils')
license=('GPL')
options=('!emptydirs')
source=("https://s3.amazonaws.com/arch-linux-packages/installkernel-scripts-${pkgver}.tar.gz"
'LICENSE')
md5sums=('6f2b7eb5699ec1e67712df2eb5bc1fbd'
'ad67f80a33e55653c889fbf6b0970336')
source=('LICENSE'
'postinst-mkinitcpio'
'postrm-mkinitcpio'
'update-grub')
sha512sums=('bdca5c19879e05362e89f2a80000a19ec0cc903d7ccb300cc4464abe330d22b6b6774e5f429b74f02e6d1d3b2be8996cbc6cf2c511c2d589158b81a6c3dbaf96'
'dbd95f1ec7456b03b3f22b8dbd6012dd5a58478cf49ebd5847b2e9e8a3696449af89e7a0511ee0b8d20e20a1d875e834eb8d722e672b8a334dbcb56dd896ef71'
'dbd95f1ec7456b03b3f22b8dbd6012dd5a58478cf49ebd5847b2e9e8a3696449af89e7a0511ee0b8d20e20a1d875e834eb8d722e672b8a334dbcb56dd896ef71'
'0a75f2f1c009d380ce9cf5b15999578c6f0b58d814b43b4a0142b08a3448d2ac01947d32fdfb98c7f4cdc58723b867b74222e5aad9cf804f186cb36ab9651ca3')
package() {
install -D -m0755 "${srcdir}/postinst-mkinitcpio" "${pkgdir}/etc/kernel/postinst.d/50-mkinitcpio"
install -D -m0755 "${srcdir}/postrm-mkinitcpio" "${pkgdir}/etc/kernel/postrm.d/50-mkinitcpio"
install -D -m0755 "${srcdir}/update-grub" "${pkgdir}/etc/kernel/postinst.d/99-update-grub"
install -D -m0755 "${srcdir}/update-grub" "${pkgdir}/etc/kernel/postrm.d/99-update-grub"
build() {
cd "$pkgname-$pkgver"
cp -R . "${pkgdir}/"
install -D -m0644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}"
}

11
installkernel-scripts/postinst-mkinitcpio

@ -0,0 +1,11 @@
#!/bin/sh -e
version="$1"
# passing the kernel version is required
if [ -z "${version}" ]; then
echo >&2 "W: mkinitcpio hook: No version number passed as argument?"
exit 2
fi
mkinitcpio -g /boot/initramfs-${version}.img -k "${version}" >&2

11
installkernel-scripts/postrm-mkinitcpio

@ -0,0 +1,11 @@
#!/bin/sh -e
version="$1"
# passing the kernel version is required
if [ -z "${version}" ]; then
echo >&2 "W: mkinitcpio hook: No version number passed as argument?"
exit 2
fi
mkinitcpio -g /boot/initramfs-${version}.img -k "${version}" >&2

17
installkernel-scripts/update-grub

@ -0,0 +1,17 @@
#! /bin/sh
set -e
which grub-mkconfig >/dev/null 2>&1 || exit 0
set --
mode="${1#\'}"
mode="${mode%\'}"
case $0:$mode in
# Only run on postinst configure and postrm remove, to avoid wasting
# time by calling update-grub multiple times on upgrade and removal.
*/postinst.d/*:|*/postinst.d/*:configure|*/postrm.d/*:|*/postrm.d/*:remove)
grub-mkconfig > /boot/grub/grub.cfg
;;
esac
exit 0
Loading…
Cancel
Save