diff options
Diffstat (limited to 'system/partclone/partclone.SlackBuild')
-rw-r--r-- | system/partclone/partclone.SlackBuild | 58 |
1 files changed, 43 insertions, 15 deletions
diff --git a/system/partclone/partclone.SlackBuild b/system/partclone/partclone.SlackBuild index 566d268cd2..1c669f6ba9 100644 --- a/system/partclone/partclone.SlackBuild +++ b/system/partclone/partclone.SlackBuild @@ -1,8 +1,6 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for partclone - -# Copyright 2015 Kevin Paulus <goarilla@gmail.com>, Belgium # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,26 +20,37 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# was previously maintained by Kevin Paulus + +# 20230803 bkw: Modified by SlackBuilds.org: fix conflict with dpkg. + +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=partclone -VERSION=${VERSION:-0.2.80} +VERSION=${VERSION:-0.3.20} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac fi -CWD=$(pwd) +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" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" @@ -49,6 +58,7 @@ elif [ "$ARCH" = "i686" ]; then elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" LIBDIRSUFFIX="64" + FAILMBR="prebuilt" # 20230803 bkw: see below. else SLKCFLAGS="-O2" LIBDIRSUFFIX="" @@ -60,14 +70,27 @@ rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION -tar xvf $CWD/${PRGNAM}_${VERSION}.orig.tar.gz +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz cd $PRGNAM-$VERSION 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 \ + -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 {} \; + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} + + +# 20230803 bkw: force use of precompiled fail-mbr.bin, if needed. +# Without this, the build will fail on x86_64 if dpkg happens to be +# installed, because our gcc isn't biarch as Debian's is. If dpkg +# *isn't* installed (the normal case), it just uses the prebuilt +# binary. All this change does is make it always use the prebuilt +# fail-mbr.bin on x86_64. +if [ "$FAILMBR" = "prebuilt" ]; then + sed -i 's,sh compile-mbr.sh,cp fail-mbr.bin.orig fail-mbr.bin,' \ + fail-mbr/Makefile.am +fi + +./autogen CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ @@ -80,12 +103,16 @@ CXXFLAGS="$SLKCFLAGS" \ --docdir=/usr/doc/$PRGNAM-$VERSION \ --build=$ARCH-slackware-linux \ --enable-extfs \ - --enable-ntfs \ --enable-hfsp \ --enable-fat \ --enable-exfat \ --enable-btrfs \ - --enable-minix + --enable-minix \ + --enable-ncursesw \ + --enable-xfs \ + --enable-reiser4 + #--enable-ufs \ + #--enable-jfs \ make make install DESTDIR=$PKG @@ -97,11 +124,12 @@ find $PKG/usr/man -type f -exec gzip -9 {} \; for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a ABOUT-NLS AUTHORS COPYING INSTALL NEWS README README.Packages TODO $PKG/usr/doc/$PRGNAM-$VERSION +cp -a ABOUT-NLS AUTHORS btrfs_source.txt ChangeLog COPYING HACKING IMAGE_FORMATS.md NEWS README.md TODO \ + $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 cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE |