#!/bin/sh # #A Bash Script used to Build a TGZ SlackWare package: opencore # # http://opencore-amr.sourceforge.net/ # #by dragon.z@email.it PRGNAM=opencore-amr VERSION=0.1.1 ARCH=${ARCH:-i486} BUILD=${BUILD:-1pc} SLKCFLAGS="-O2 -march=i486 -mtune=i686" CWD=`pwd` if [ "$TMP" = "" ]; then TMP=$CWD/tmp/pct fi # structure where package will be created) PKG=$TMP/pkg-$PRGNAM SOURCE=http://downloads.sourceforge.net/sourceforge/opencore-amr/$PRGNAM-$VERSION.tar.gz?use_mirror=fastbull if [ ! -e $PRGNAM-$VERSION.tar.gz ]; then wget -c $SOURCE fi rm -rf $PKG mkdir -p $TMP $PKG cd $TMP rm -rf $PRGNAM tar xzvf $CWD/$PRGNAM-$VERSION.tar.gz || exit 1 cd $TMP/$PRGNAM || exit 1 chown -R root:root . chmod -R u+w,go+r-w,a-s . CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ make PREFIX=/usr install DESTDIR=$PKG || exit 1 #doc mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a opencore/{README,ChangeLog,NOTICE} $PKG/usr/doc/$PRGNAM-$VERSION find $PKG/usr/doc/$PRGNAM-$VERSION -type f -exec chmod 0644 {} \; mkdir -p $PKG/install cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install cat << EOF > $PKG/install/slack-desc # 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------------------------------------------------------| opencore-amr: OpenCORE Adaptive Multi-Rate Floating-point (AMR) opencore-amr: opencore-amr: OpenCORE is the multimedia framework of Android opencore-amr: originally contributed by PacketVideo. It provides opencore-amr: an extensible framework for multimedia rendering and opencore-amr: authoring and video telephony (3G-324M). opencore-amr: opencore-amr: opencore-amr: opencore-amr: http://opencore-amr.sourceforge.net/ opencore-amr: EOF cd $PKG requiredbuilder -v -y -s $CWD $PKG /sbin/makepkg -l y -c n $TMP/$PRGNAM-$VERSION-$ARCH-$BUILD.tgz mv -f $TMP/$PRGNAM-$VERSION-$ARCH-$BUILD.tgz $CWD