diff options
author | Cj Case <cj at abysmalstudios mx> | 2013-02-24 17:34:25 -0500 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2013-02-24 22:53:55 -0600 |
commit | 66ff6ad6ce3aa0b2dc0fb8d0b793d711d73094c8 (patch) | |
tree | 31678e727e9aefdae1d803920ced0a3359cf0a4a /system/ms-sys/ms-sys.SlackBuild | |
parent | cbe864abd5c52f23d9fdc436796ecc8074eb5cf2 (diff) | |
download | slackbuilds-66ff6ad6ce3aa0b2dc0fb8d0b793d711d73094c8.tar.gz |
system/ms-sys: Added (writes Microsoft compatible boot records)
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'system/ms-sys/ms-sys.SlackBuild')
-rw-r--r-- | system/ms-sys/ms-sys.SlackBuild | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/system/ms-sys/ms-sys.SlackBuild b/system/ms-sys/ms-sys.SlackBuild new file mode 100644 index 0000000000..66a33014eb --- /dev/null +++ b/system/ms-sys/ms-sys.SlackBuild @@ -0,0 +1,72 @@ +#!/bin/sh + +# Slackware build script for ms-sys +# Written by cjmx [cj at abysmalstudios mx] + +PRGNAM=ms-sys +VERSION=${VERSION:-2.3.0} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -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 xvzf $CWD/$PRGNAM-$VERSION.tar.gz +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 {} \; + +#No configure script, setting prefix to /usr +CFLAGS="$SLKCFLAGS" \ +make PREFIX=/usr install DESTDIR=$PKG + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "sharedobject" | 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 + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a CHANGELOG CONTRIBUTORS COPYING FAQ README 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} + |