summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD57
-rw-r--r--grub-imageboot.install28
3 files changed, 64 insertions, 40 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1651375ccba9..b4beb2154b49 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,19 +1,16 @@
-# Generated by mksrcinfo v8
-# Fri Jul 6 19:08:53 UTC 2018
pkgbase = grub-imageboot
pkgdesc = grub2 script to automatically add boot entries for iso images placed in /boot/images/
- pkgver = 0.6
- pkgrel = 2
+ pkgver = 0.6+nmu2
+ pkgrel = 1
url = https://launchpad.net/ubuntu/+source/grub-imageboot/
install = grub-imageboot.install
arch = any
- license = GPL
- depends = syslinux
+ license = GPL3
+ makedepends = syslinux
+ depends = bash
depends = grub
- source = https://raw.githubusercontent.com/formorer/grub-imageboot/529ac5d2bf91e7da8c31b9e15f37702127bddc1c/bin/60_grub-imageboot
- source = https://raw.githubusercontent.com/formorer/grub-imageboot/529ac5d2bf91e7da8c31b9e15f37702127bddc1c/etc/grub-imageboot
- sha256sums = 462a9720ffa13ea9378bc485ecc1a88cbee59534a256627e9ba4ce029ed61b39
- sha256sums = 12602cea7b5d5b434007b891730a5071c3d2a06ed1cc225932e91d8a5d1f6c20
+ options = emptydirs
+ source = https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/grub-imageboot/0.6+nmu2/grub-imageboot_0.6+nmu2.tar.xz
+ sha256sums = 5172c2bfa1cd7f569f6dfd18383c39016ea4490f87b3943db7473ec85795507b
pkgname = grub-imageboot
-
diff --git a/PKGBUILD b/PKGBUILD
index 4a0d107739cd..227ee54e5b1b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,30 +1,55 @@
-# Maintainer: Philipp Born <philipp@tamcore.eu>
+# Maintainer: dreieck ()
+# Contributor: Philipp Born <philipp@tamcore.eu>
# Contributor: Max Roder <maxroder@web.de>
-pkgname='grub-imageboot'
-pkgver='0.6'
-pkgrel='2'
+_pkgname='grub-imageboot'
+pkgname="${_pkgname}"
+pkgver='0.6+nmu2'
+pkgrel='1'
pkgdesc="grub2 script to automatically add boot entries for iso images placed in /boot/images/"
url="https://launchpad.net/ubuntu/+source/grub-imageboot/"
arch=('any')
-license=('GPL')
-depends=('syslinux' 'grub')
+license=('GPL3')
+depends=(
+ 'bash'
+ 'grub'
+)
+makedepends=(
+ 'syslinux' # To copy '/usr/lib/syslinux/bios/memdisk' to '/boot/memdisk'.
+)
install='grub-imageboot.install'
_commit='529ac5d2bf91e7da8c31b9e15f37702127bddc1c'
-source=("https://raw.githubusercontent.com/formorer/grub-imageboot/${_commit}/bin/60_grub-imageboot"
- "https://raw.githubusercontent.com/formorer/grub-imageboot/${_commit}/etc/grub-imageboot")
-sha256sums=('462a9720ffa13ea9378bc485ecc1a88cbee59534a256627e9ba4ce029ed61b39'
- '12602cea7b5d5b434007b891730a5071c3d2a06ed1cc225932e91d8a5d1f6c20')
+source=(
+ "https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/${_pkgname}/${pkgver}/${_pkgname}_${pkgver}.tar.xz"
+ #"https://raw.githubusercontent.com/formorer/grub-imageboot/${_commit}/bin/60_grub-imageboot"
+ #"https://raw.githubusercontent.com/formorer/grub-imageboot/${_commit}/etc/grub-imageboot"
+)
+sha256sums=(
+ '5172c2bfa1cd7f569f6dfd18383c39016ea4490f87b3943db7473ec85795507b'
+ #'462a9720ffa13ea9378bc485ecc1a88cbee59534a256627e9ba4ce029ed61b39'
+ #'12602cea7b5d5b434007b891730a5071c3d2a06ed1cc225932e91d8a5d1f6c20'
+)
+options+=('emptydirs')
+
+build() {
+ cd "${srcdir}/${_pkgname}-${pkgver}"
+
+ # patch file
+ sed -i 's/\/usr\/lib\/grub/\/usr\/share\/grub/g' "bin/60_grub-imageboot"
+}
package() {
- cd "${srcdir}"
+ cd "${srcdir}/${_pkgname}-${pkgver}"
+
+ install -Dvm755 "bin/60_grub-imageboot" "${pkgdir}/etc/grub.d/60_grub-imageboot"
+ install -Dvm644 "etc/grub-imageboot" "${pkgdir}/etc/default/grub-imageboot"
+ install -dvm755 "${pkgdir}/boot/images"
- # patch file
- sed -i 's/\/usr\/lib\/grub/\/usr\/share\/grub/g' 60_grub-imageboot
+ install -Dvm644 "debian/changelog" "${pkgdir}/usr/share/doc/${_pkgname}/changelog"
+ install -Dvm644 "debian/docs" "${pkgdir}/usr/share/doc/${_pkgname}/docs"
+ install -Dvm644 "debian/README.Debian" "${pkgdir}/usr/share/doc/${_pkgname}/README.Debian"
- install -Dm755 60_grub-imageboot ${pkgdir}/etc/grub.d/60_grub-imageboot
- install -Dm644 grub-imageboot ${pkgdir}/etc/default/grub-imageboot
- install -d ${pkgdir}/boot/images
+ install -Dvm644 "debian/copyright" "${pkgdir}/usr/share/licenses/${pkgname}/copyright"
}
# vim:set ts=2 sw=2 et:
diff --git a/grub-imageboot.install b/grub-imageboot.install
index a1ac38887004..afe0d442b07a 100644
--- a/grub-imageboot.install
+++ b/grub-imageboot.install
@@ -1,24 +1,26 @@
post_install() {
- cp /usr/lib/syslinux/bios/memdisk /boot/
-
- echo "------------------------------------------------------------"
- echo "> Place live iso images you want to boot in /boot/images/"
- echo "> To have them added to grub automatically, run"
- echo "> grub-mkconfig -o /boot/grub/grub.cfg"
- echo "------------------------------------------------------------"
+ if ! [ -e /boot/memdisk ]; then
+ cp -v '/usr/lib/syslinux/bios/memdisk' '/boot/memdisk'
+ fi
+
+ printf '%s\n' "------------------------------------------------------------"
+ printf '%s\n' "> Place live iso images you want to boot in /boot/images/."
+ printf '%s\n' "> To have them added to grub automatically, run"
+ printf '%s\n' "> grub-mkconfig -o /boot/grub/grub.cfg"
+ printf '%s\n' "------------------------------------------------------------"
}
post_upgrade() {
- post_install
+ post_install
}
post_remove() {
- rm /boot/memdisk
- grub-mkconfig -o /boot/grub/grub.cfg
+ grub-mkconfig -o /boot/grub/grub.cfg
- echo "------------------------------------------------------------"
- echo "> You may want to remove your iso images in /boot/images/"
- echo "------------------------------------------------------------"
+ printf '%s\n' "------------------------------------------------------------"
+ printf '%s\n' "> You may want to remove your iso images in '/boot/images/'".
+ printf '%s\n' "> You may also want to remove '/boot/memdisk', if it is not needed otherwise."
+ printf '%s\n' "------------------------------------------------------------"
}
# vim:set ts=2 sw=2 et: