From bec8a82828699c97bab0d21dff9d5b484fadfcac Mon Sep 17 00:00:00 2001 From: crocket Date: Sun, 20 Jun 2010 07:03:00 -0500 Subject: system/gnu-fdisk: Added (fdisk from the GNU project) Signed-off-by: Robby Workman --- system/gnu-fdisk/README | 4 ++ system/gnu-fdisk/gnu-fdisk.SlackBuild | 113 ++++++++++++++++++++++++++++++++++ system/gnu-fdisk/gnu-fdisk.info | 10 +++ system/gnu-fdisk/slack-desc | 19 ++++++ 4 files changed, 146 insertions(+) create mode 100644 system/gnu-fdisk/README create mode 100644 system/gnu-fdisk/gnu-fdisk.SlackBuild create mode 100644 system/gnu-fdisk/gnu-fdisk.info create mode 100644 system/gnu-fdisk/slack-desc (limited to 'system') diff --git a/system/gnu-fdisk/README b/system/gnu-fdisk/README new file mode 100644 index 0000000000..aedf92b942 --- /dev/null +++ b/system/gnu-fdisk/README @@ -0,0 +1,4 @@ +GNU fdisk provides alternatives to fdisk and cfdisk from util-linux-ng. + +The standard interface offered via fdisk is util-linux-like fdisk. +You can invoke the extended fdisk via "fdisk-gnu -G" diff --git a/system/gnu-fdisk/gnu-fdisk.SlackBuild b/system/gnu-fdisk/gnu-fdisk.SlackBuild new file mode 100644 index 0000000000..e1a0ad5393 --- /dev/null +++ b/system/gnu-fdisk/gnu-fdisk.SlackBuild @@ -0,0 +1,113 @@ +#!/bin/sh + +# Slackware build script for gnu-fdisk + +# Written by crocket (crockabiscuit@yahoo.com) + +PRGNAM=gnu-fdisk +ARCNAM=$( echo $PRGNAM | sed 's/gnu-//' ) +VERSION=${VERSION:-1.2.4} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +# Automatically determine the architecture we're building on: +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +LIBDIRSUFFIX="" +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$ARCNAM-$VERSION.tar.bz2 +mv $ARCNAM-$VERSION $PRGNAM-$VERSION +cd $PRGNAM-$VERSION +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --program-suffix="-gnu" \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --mandir=/usr/man \ + --infodir=/usr/info \ + --docdir=/usr/doc/$PRGNAM-$VERSION \ + --build=$ARCH-slackware-linux + +make +make install DESTDIR=$PKG + +# Fixup a couple of symlinks +( cd $PKG/usr/sbin + rm -f lfdisk gfdisk + ln -s fdisk-gnu lfdisk + ln -s fdisk-gnu gfdisk +) + +# Fix the info page naming +( cd $PKG/usr/info + mv cfdisk.info cfdisk-gnu.info + mv fdisk.info fdisk-gnu.info +) + +# Add a couple of symlinks in the manual pages +( cd $PKG/usr/man/man8 + ln -s fdisk-gnu.8 lfdisk + ln -s fdisk-gnu.8 gfdisk +) + +# Remove an empty directory +rmdir $PKG/usr/share 2>/dev/null || true + +find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +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 + +rm -f $PKG/usr/info/dir +gzip -9 $PKG/usr/info/* + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + AUTHORS COPYING ChangeLog INSTALL NEWS README THANKS 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} diff --git a/system/gnu-fdisk/gnu-fdisk.info b/system/gnu-fdisk/gnu-fdisk.info new file mode 100644 index 0000000000..e0db053278 --- /dev/null +++ b/system/gnu-fdisk/gnu-fdisk.info @@ -0,0 +1,10 @@ +PRGNAM="gnu-fdisk" +VERSION="1.2.4" +HOMEPAGE="http://www.gnu.org/software/fdisk/" +DOWNLOAD="ftp://ftp.gnu.org/gnu/fdisk/fdisk-1.2.4.tar.bz2" +MD5SUM="52df6e53c7bb8530d29a5141c810313e" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +MAINTAINER="crocket" +EMAIL="crockabiscuit@yahoo.com" +APPROVED="rworkman" diff --git a/system/gnu-fdisk/slack-desc b/system/gnu-fdisk/slack-desc new file mode 100644 index 0000000000..4fa5f0d02d --- /dev/null +++ b/system/gnu-fdisk/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 ':'. + + |-----handy-ruler------------------------------------------------------| +gnu-fdisk: gnu-fdisk (fdisk from the GNU project) +gnu-fdisk: +gnu-fdisk: GNU fdisk provides alternatives to fdisk and cfdisk from util-linux. +gnu-fdisk: +gnu-fdisk: The standard interface offered via fdisk is util-linux-like fdisk. +gnu-fdisk: You can invoke the extended fdisk-gnu via fdisk-gnu -G. +gnu-fdisk: +gnu-fdisk: The website of GNU fdisk is http://www.gnu.org/software/fdisk +gnu-fdisk: +gnu-fdisk: +gnu-fdisk: -- cgit v1.2.3