diff options
author | B. Watson <yalhcru@gmail.com> | 2011-03-04 16:07:18 -0300 |
---|---|---|
committer | Niels Horn <niels.horn@slackbuilds.org> | 2011-03-04 16:07:18 -0300 |
commit | 744a0267f8aae8bfe70c9e0642737701578d89c5 (patch) | |
tree | 92f31e9ef423a77ce3570ff4931c0fa521cd2917 /system/macutils/macutils.SlackBuild | |
parent | a82082241c4e33501b7777622fcf5c64cda8d896 (diff) |
system/macutils: Added (tools to handle Macintosh files)
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
Diffstat (limited to 'system/macutils/macutils.SlackBuild')
-rw-r--r-- | system/macutils/macutils.SlackBuild | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/system/macutils/macutils.SlackBuild b/system/macutils/macutils.SlackBuild new file mode 100644 index 000000000000..c745845d8862 --- /dev/null +++ b/system/macutils/macutils.SlackBuild @@ -0,0 +1,76 @@ +#!/bin/bash + +# Slackware build script for macutils + +# Written by B. Watson (yalhcru@gmail.com) + +PRGNAM=macutils +VERSION=${VERSION:-2.0b3_16} +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" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" +else + SLKCFLAGS="-O2" +fi + +set -e + +TARVER=$( echo $VERSION | sed 's/_.*//' ) + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM +tar xvf $CWD/${PRGNAM}_${TARVER}.orig.tar.gz +cd $PRGNAM +tar xvf $CWD/$PRGNAM*.debian.tar.gz +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 {} \; + +# The code was written in like 1995, but the debian maintainers have been +# keeping it up-to-date with modern toolchains, so use their patches. +for patch in $( cat debian/patches/series ); do + patch -p1 < debian/patches/$patch +done + +sed -i 's/^\(CF *= *\)/\1 $(SLKCFLAGS)/' makefile +make SLKCFLAGS="$SLKCFLAGS" +mkdir -p $PKG/usr/bin +make install BINDIR=$PKG/usr/bin +strip $PKG/usr/bin/* +mkdir -p $PKG/usr/man/man1 +install -m0644 man/* $PKG/usr/man/man1 +gzip -9 $PKG/usr/man/man1/*.1 + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +install -m0644 doc/* $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} |