#!/bin/bash # # refind.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. # # refind.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 # # default settings PACKAGE="refind" PACKAGE_EXT="zip" VERSION=${VERSION:=0.11.4} BUILD=${BUILD:=1} if [ -f ~/.slackbuildrc ]; then . ~/.slackbuildrc elif [ -f ../../runtime/slackbuildrc ]; then . ../../runtime/slackbuildrc fi check_required SRC="$PACKAGE-bin-$VERSION.$PACKAGE_EXT" URL="http://sourceforge.net/projects/refind/files/${VERSION}/$SRC" get_source $SRC $URL unpack_source $SRC $PACKAGE-bin-$VERSION REFIND_SHARE_DIR=$PKG/usr/share/$PACKAGE mkdir -p $PKG/usr/sbin mkdir -p $DOCS mkdir -p $PKG/etc/${PACKAGE}.d/keys mkdir -p $REFIND_SHARE_DIR # copy keys cp keys/* $PKG/etc/${PACKAGE}.d/keys cp -ra refind refind-install fonts banners $REFIND_SHARE_DIR cp mkrlconf mvrefind $PKG/usr/sbin cp -a docs/* *.txt $DOCS # remove unnecessary package if [ "$ARCH" == "x86_64" ]; then rm -rf $REFIND_SHARE_DIR/refind/drivers_ia32 \ $REFIND_SHARE_DIR/refind/tools_ia32 \ $REFIND_SHARE_DIR/refind/refind_ia32.efi else rm -rf $REFIND_SHARE_DIR/refind/drivers_x64 \ $REFIND_SHARE_DIR/refind/tools_x64 \ $REFIND_SHARE_DIR/refind/refind_x64.efi fi # Now move man pages mkdir -p $PKG/usr/man/man8 mv $DOCS/man/* $PKG/usr/man/man8 rmdir $DOCS/man # include a slackware banner made by Zhu Qun-Ying, including the svg version cp $CWD/slackware-banner.* $REFIND_SHARE_DIR/banners fixup_package $PKG # Clean up the extra stuff: set +u if [ "$1" = "--cleanup" ]; then rm -rf $TMP/$PACKAGE-$VERSION rm -rf $PKG fi