summaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorRuari Oedegaard <sbo@ruari.com>2012-08-12 13:27:23 -0500
committerRobby Workman <rworkman@slackbuilds.org>2012-08-12 13:27:23 -0500
commit16b6e015b2d796ae4c400df5322065edc7ab9d45 (patch)
tree7e64daa1a71859e7014315da371a99f55cc32a88 /system
parentdd0762e7bbc71f4e9f2b166aec1b8260eef3a2b1 (diff)
downloadslackbuilds-16b6e015b2d796ae4c400df5322065edc7ab9d45.tar.gz
system/heirloom-pax: Added (POSIX standard archiver)
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'system')
-rw-r--r--system/heirloom-pax/README30
-rw-r--r--system/heirloom-pax/heirloom-pax.SlackBuild103
-rw-r--r--system/heirloom-pax/heirloom-pax.info10
-rw-r--r--system/heirloom-pax/makefile.patch25
-rw-r--r--system/heirloom-pax/slack-desc19
5 files changed, 187 insertions, 0 deletions
diff --git a/system/heirloom-pax/README b/system/heirloom-pax/README
new file mode 100644
index 0000000000..3d78d2bd91
--- /dev/null
+++ b/system/heirloom-pax/README
@@ -0,0 +1,30 @@
+Heirloom pax is a version of the POSIX standard archive tool. It is
+from the The Heirloom Toolchest, which has code derived from original
+UNIX material released as Open Source by Caldera and Sun.
+
+Unlike some other popular pax implementations this version can create
+POSIX.1-2001 pax archives. It can also can read and write zip files,
+RPM packages, various tar formats (including GNU tar), and the cpio
+formats of Cray UNICOS, SGI IRIX (-K), SCO UnixWare (-c) and Tru64
+UNIX (-e).
+
+The Heirloom Toolchest utilities use a different path structure to
+avoid replacing regular Linux utilities, which may have the same name
+but function slightly differently.
+
+This SlackBuild installs pax to /usr/lib(64)/heirloom/bin, rather than
+/usr/5bin (where the upstream maintainer suggests) to avoid littering
+the top level of /usr.
+
+To use heirloom-pax, you have three choices, either call the
+utilities directly by their full paths, manually place symlinks in
+/usr/bin pointing to the appropropriate heirloom-pax version, or add
+either /usr/lib(64)/heirloom/bin or /usr/lib(64)/heirloom/bin/posix2001
+to your PATH variable. The PATH variable is typically set system-wide
+via /etc/profile. Refer to Slackware documentation for alternative
+PATH setting options.
+
+Note: Another pax based on an old SUSE port of the Mir/OpenBSD
+version is provided by SlackBuilds.org. However, despite the name
+that version cannot actually produce POSIX.1-2001 pax archives, only
+POSIX 1003.1 ustar archives.
diff --git a/system/heirloom-pax/heirloom-pax.SlackBuild b/system/heirloom-pax/heirloom-pax.SlackBuild
new file mode 100644
index 0000000000..c04ecac43a
--- /dev/null
+++ b/system/heirloom-pax/heirloom-pax.SlackBuild
@@ -0,0 +1,103 @@
+#!/bin/sh
+
+# Slackware build script for heirloom-pax
+
+# Written by ruario <sbo@ruari.com>
+
+PRGNAM=heirloom-pax
+VERSION=${VERSION:-070715}
+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 heirloom-$VERSION
+tar xvf $CWD/heirloom-${VERSION}.tar.bz2
+cd heirloom-$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 {} \;
+
+# Patch the paths in the man page to use /usr/lib/heirloom/bin, rather
+# than /usr/5bin (where the upstream maintainer suggests). This is
+# done to avoid littering the top level of /usr.
+sed -i.original \
+ -e "s|/usr/5bin|/usr/lib$LIBDIRSUFFIX/heirloom/bin|" \
+ -e "s|/usr/posix2001/bin|/usr/lib$LIBDIRSUFFIX/heirloom/bin/posix2001|" cpio/pax.1
+
+# Manually insert the CFLAGS, since autotools is not used
+sed -ri.original "/^CFLAGS.? = /s|-O.? |${SLKCFLAGS} |" build/mk.config
+
+# We are only interested in pax and its build dependencies. Therefore
+# lets limit "make makefiles" from doing more than it needs.
+patch -p0 < $CWD/makefile.patch
+
+# Now we can build the two pax versions provided by the Heirloom Toolchest
+make makefiles
+make -C libcommon
+make -C libuxre
+make -C cpio pax pax_su3
+
+# The install will be manual as it is easier than patching the
+# "make install" target. ;)
+#
+# Note: pax cannot go directly into /usr/bin because Heirloom Toolchest
+# provides two pax versions and the user may have another pax
+# already installed.
+install -Dm755 cpio/pax $PKG/usr/lib$LIBDIRSUFFIX/heirloom/bin/pax
+mkdir -p $PKG/usr/lib$LIBDIRSUFFIX/heirloom/bin/{s42,posix}
+( cd $PKG/usr/lib$LIBDIRSUFFIX/heirloom/bin/s42/; ln -s ../pax pax )
+( cd $PKG/usr/lib$LIBDIRSUFFIX/heirloom/bin/posix/; ln -s ../pax pax )
+install -Dm755 cpio/pax_su3 $PKG/usr/lib$LIBDIRSUFFIX/heirloom/bin/posix2001/pax
+install -Dm644 cpio/pax.1 $PKG/usr/man/man1/${PRGNAM}.1
+
+find $PKG -print0 | xargs -0 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 {} \;
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cd LICENSE
+cp -a \
+ COPYING COPYING.LGPL LICENSE LUCENT OPENSOLARIS.LICENSE README \
+ $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/heirloom-pax/heirloom-pax.info b/system/heirloom-pax/heirloom-pax.info
new file mode 100644
index 0000000000..8801bd2d7a
--- /dev/null
+++ b/system/heirloom-pax/heirloom-pax.info
@@ -0,0 +1,10 @@
+PRGNAM="heirloom-pax"
+VERSION="070715"
+HOMEPAGE="http://heirloom.sourceforge.net/tools.html"
+DOWNLOAD="http://downloads.sourceforge.net/project/heirloom/heirloom/070715/heirloom-070715.tar.bz2"
+MD5SUM="d846be4b268b1d55b6ffcef847f09979"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+MAINTAINER="Ruari Oedegaard"
+EMAIL="sbo@ruari.com"
+APPROVED="rworkman"
diff --git a/system/heirloom-pax/makefile.patch b/system/heirloom-pax/makefile.patch
new file mode 100644
index 0000000000..b0a33c1fc2
--- /dev/null
+++ b/system/heirloom-pax/makefile.patch
@@ -0,0 +1,25 @@
+--- makefile.original
++++ makefile
+@@ -1,21 +1,6 @@
+ SHELL = /bin/sh
+
+-SUBDIRS = build libwchar libcommon libuxre _install \
+- banner basename bc bdiff bfs \
+- cal calendar cat chmod chown \
+- cksum cmp col comm copy cp cpio csplit cut \
+- date dc dd deroff diff diff3 dircmp dirname df du \
+- echo ed env expand expr \
+- factor file find fmt fmtmsg fold \
+- getconf getopt grep groups hd head hostname id join \
+- kill line listusers ln logins logname ls \
+- mail man mesg mkdir mkfifo mknod more mvdir \
+- nawk news nice nl nohup oawk od \
+- paste pathchk pg pgrep pr printenv printf priocntl ps psrinfo pwd \
+- random renice rm rmdir \
+- sdiff sed setpgrp shl sleep sort spell split stty su sum sync \
+- tabs tail tapecntl tar tcopy tee test time touch tr true tsort tty \
+- ul uname uniq units users wc what who whoami whodo xargs yes
++SUBDIRS = build libcommon libuxre cpio
+
+ dummy: makefiles all
+
diff --git a/system/heirloom-pax/slack-desc b/system/heirloom-pax/slack-desc
new file mode 100644
index 0000000000..2142d66c63
--- /dev/null
+++ b/system/heirloom-pax/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------------------------------------------------------|
+heirloom-pax: heirloom-pax (POSIX standard archiver)
+heirloom-pax:
+heirloom-pax: heirloom-pax is a version of the POSIX standard archive tool. It is
+heirloom-pax: from the The Heirloom Toolchest, which has code derived from original
+heirloom-pax: UNIX material released as Open Source by Caldera and Sun.
+heirloom-pax: Unlike some other popular pax implementations this version can create
+heirloom-pax: POSIX.1-2001 pax archives. It can also can read and write zip files,
+heirloom-pax: RPM packages, GNU tar files, and the cpio formats of Cray UNICOS, SGI
+heirloom-pax: IRIX (-K), SCO UnixWare (-c) and Tru64 UNIX (-e).
+heirloom-pax:
+heirloom-pax: Homepage: http://heirloom.sourceforge.net/tools.html