#!/bin/sh CWD=`pwd` VERSION=${VERSION:-1.01.03} ARCH=${ARCH:-x86_64} BUILD=${BUILD:-3} LIBDIR=lib if [ "$ARCH" = "x86_64" ]; then LIBDIR=lib64 fi TMP=/tmp/device-mapper.$VERSION PKG=/tmp/package-devmapper rm -rf $TMP $PKG cd /tmp tar zxfv $CWD/device-mapper.$VERSION.tgz cd $TMP CFLAGS="-fPIC" ./configure --prefix=/usr \ --sbindir=/sbin \ --libdir=/$LIBDIR make make install DESTDIR=$PKG cd $PKG gzip -9 usr/man/*/* find | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded chown -R root:root sbin/* mkdir install cat $CWD/slack-desc > install/slack-desc makepkg -l y -c n ../devmapper-$VERSION-$ARCH-$BUILD.tgz