#!/bin/sh # Copyright (c) 2007 Frederick Emmott # Distributed under the GNU General Public License, version 2, # as published by the Free Software Foundation, NOT any later # version. PKGNAM=nspluginwrapper VERSION=0.9.91.4 ARCH=$(uname -m) BUILD=1 DISTRO=${DISTRO:-$(cut -f 1 -d ' ' /etc/*-version | tr A-Z a-z)} if [ $DISTRO = slackware ]; then PKGARCH=$ARCH else PKGARCH=${ARCH}_${DISTRO} fi if [ $DISTRO = slamd64 ]; then LIBSUFFIX=${LIBSUFFIX:-64} fi CWD=$(pwd) PKG=/tmp/package-$PKGNAM cd /tmp tar xfv $CWD/$PKGNAM-$VERSION.tar.bz2 cd $PKGNAM-$VERSION CXXFLAGS="-O2 -fPIC" \ ./configure make make install DESTDIR=$PKG cd $PKG find -type f | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded gzip -9 usr/man/*/* mkdir install cat $CWD/slack-desc > install/slack-desc makepkg -l y -c n ../$PKGNAM-$VERSION-$PKGARCH-$BUILD.tgz