aboutsummaryrefslogtreecommitdiff
path: root/system/efiboots
diff options
context:
space:
mode:
authorLogan Rathbone <poprocks@gmail.com>2022-04-23 01:29:11 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2022-04-24 01:47:22 +0700
commit93317a1cf567c9c8d6d4e500eef72dc4ed30c2a9 (patch)
treec087c5b79c027a59508ed92850f2a9ff4ab18705 /system/efiboots
parent12351235e59bd24a4df8f82092d9e0234cfb2de7 (diff)
system/efiboots: Added (GTK3 frontend for efibootmgr).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/efiboots')
-rw-r--r--system/efiboots/README3
-rw-r--r--system/efiboots/doinst.sh9
-rw-r--r--system/efiboots/efiboots-1.0-fix-python-exception.patch12
-rw-r--r--system/efiboots/efiboots.SlackBuild101
-rw-r--r--system/efiboots/efiboots.info10
-rw-r--r--system/efiboots/slack-desc19
6 files changed, 154 insertions, 0 deletions
diff --git a/system/efiboots/README b/system/efiboots/README
new file mode 100644
index 0000000000000..d799279a7a01a
--- /dev/null
+++ b/system/efiboots/README
@@ -0,0 +1,3 @@
+efiboots is a Python/GTK3 application that acts as a frontend for
+efibootmgr. It provides an easy to use interface for managing
+UEFI boot options.
diff --git a/system/efiboots/doinst.sh b/system/efiboots/doinst.sh
new file mode 100644
index 0000000000000..65c7e2eeb9aa5
--- /dev/null
+++ b/system/efiboots/doinst.sh
@@ -0,0 +1,9 @@
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
+
+if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
+ if [ -x /usr/bin/gtk-update-icon-cache ]; then
+ /usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1
+ fi
+fi
diff --git a/system/efiboots/efiboots-1.0-fix-python-exception.patch b/system/efiboots/efiboots-1.0-fix-python-exception.patch
new file mode 100644
index 0000000000000..6900f0fd0a464
--- /dev/null
+++ b/system/efiboots/efiboots-1.0-fix-python-exception.patch
@@ -0,0 +1,12 @@
+diff -Naur efiboots-1.0.orig/efiboots.py efiboots-1.0/efiboots.py
+--- efiboots-1.0.orig/efiboots.py 2022-04-12 01:36:59.888996574 -0400
++++ efiboots-1.0/efiboots.py 2022-04-12 01:37:32.991997960 -0400
+@@ -272,7 +272,7 @@
+ boot = run_efibootmgr()
+ except subprocess.CalledProcessError as e:
+ logging.exception("Error running efibootmgr. Please check that it is correctly installed.")
+- error_dialog(parent=self.window, title="efibootmgr utility not installed!", message="Please check that the efibootmgr utility is correctly installed, as this program requires its output.\n" + e)
++ error_dialog(parent=self.window, title="efibootmgr utility not installed!", message="Please check that the efibootmgr utility is correctly installed, as this program requires its output.\n" + e.output)
+ sys.exit(-1)
+ except UnicodeDecodeError as e:
+ logging.exception("Error decoding efibootmgr -v output.")
diff --git a/system/efiboots/efiboots.SlackBuild b/system/efiboots/efiboots.SlackBuild
new file mode 100644
index 0000000000000..e27d593921f99
--- /dev/null
+++ b/system/efiboots/efiboots.SlackBuild
@@ -0,0 +1,101 @@
+#!/bin/bash
+
+# Slackware build script for efiboots
+
+# Copyright © 2022 Logan Rathbone <poprocks@gmail.com> Province of Ontario,
+# Canada.
+#
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=efiboots
+VERSION=${VERSION:-1.0}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+
+# fix python exception crash if efibootmgr throws an error
+patch -p1 < $CWD/efiboots-1.0-fix-python-exception.patch
+
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+python3 setup.py install --root=$PKG
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ LICENSE README* \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/system/efiboots/efiboots.info b/system/efiboots/efiboots.info
new file mode 100644
index 0000000000000..091eaea5d4ea6
--- /dev/null
+++ b/system/efiboots/efiboots.info
@@ -0,0 +1,10 @@
+PRGNAM="efiboots"
+VERSION="1.0"
+HOMEPAGE="https://github.com/Elinvention/efiboots"
+DOWNLOAD="https://github.com/Elinvention/efiboots/archive/refs/tags/1.0/efiboots-1.0.tar.gz"
+MD5SUM="a3e5fc6372638a007aa4aebbf2f7fcbd"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="Logan Rathbone"
+EMAIL="poprocks@gmail.com"
diff --git a/system/efiboots/slack-desc b/system/efiboots/slack-desc
new file mode 100644
index 0000000000000..ecd1511708abe
--- /dev/null
+++ b/system/efiboots/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+efiboots: efiboots (GTK3 frontend for efibootmgr)
+efiboots:
+efiboots: efiboots is a Python/GTK3 application that acts as a frontend for
+efiboots: efibootmgr. It provides an easy to use interface for managing
+efiboots: UEFI boot options.
+efiboots:
+efiboots: homepage: https://github.com/Elinvention/efiboots
+efiboots:
+efiboots:
+efiboots:
+efiboots: