#!/bin/bash # # ovmf.SlackBuild is free software; you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or any later version. # # ovmf.SlackBuild is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # this program; if not, write to the Free Software Foundation, Inc., 59 Temple # Place - Suite 330, Boston, MA 02111-1307, USA # # Written by 2017 Philip van der Hoeven, Almere, The Netherlands # Rewritten for mbse Slackbuilds bij mbroek. # default settings PACKAGE="ovmf" PACKAGE_EXT="xz" VERSION=${VERSION:=20220719} GITCOMMIT=${GITCOMMIT:-209.gf0064ac3af} BUILD=${BUILD:=1} if [ -f ~/.slackbuildrc ]; then . ~/.slackbuildrc elif [ -f ../../runtime/slackbuildrc ]; then . ../../runtime/slackbuildrc fi check_required SRC1="edk2.git-ovmf-ia32-0-$VERSION.$GITCOMMIT.EOL.no.nore.updates.noarch.rpm" URL1="https://www.kraxel.org/repos/jenkins/edk2/$SRC1" SRC2="edk2.git-ovmf-x64-0-$VERSION.$GITCOMMIT.EOL.no.nore.updates.noarch.rpm" URL2="https://www.kraxel.org/repos/jenkins/edk2/$SRC2" get_source $SRC1 $URL1 get_source $SRC2 $URL2 rm -rf $TMP/$PACKAGE mkdir -p $TMP/$PACKAGE cd $TMP/$PACKAGE rpm2cpio $CWD/$SRC1 | cpio -idmv rpm2cpio $CWD/$SRC2 | cpio -idmv mkdir -p $PKG/usr/share cp -r usr/share/edk2.git/ovmf-ia32 $PKG/usr/share cp -r usr/share/edk2.git/ovmf-x64 $PKG/usr/share cp -r usr/share/qemu $PKG/usr/share mkdir -p $DOCS cp usr/share/doc/edk2.git-ovmf-x64/README $DOCS fixup_package $PKG # Clean up the extra stuff: set +u if [ "$1" = "--cleanup" ]; then rm -rf $TMP/$PACKAGE-$VERSION rm -rf $PKG fi