summaryrefslogtreecommitdiffstats
path: root/multimedia/gpac/gpac.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'multimedia/gpac/gpac.SlackBuild')
-rw-r--r--multimedia/gpac/gpac.SlackBuild24
1 files changed, 17 insertions, 7 deletions
diff --git a/multimedia/gpac/gpac.SlackBuild b/multimedia/gpac/gpac.SlackBuild
index 396ceae938..3d47f2be9d 100644
--- a/multimedia/gpac/gpac.SlackBuild
+++ b/multimedia/gpac/gpac.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware Package Build Script for gpac
# Home Page: https://gpac.wp.mines-telecom.fr/
@@ -25,10 +25,13 @@
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM="gpac"
-VERSION=${VERSION:-0.7.1}
+VERSION=${VERSION:-1.0.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -38,7 +41,14 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -75,7 +85,7 @@ fi
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -f $PRGNAM-$VERSION
+rm -fR $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root.root .
@@ -106,7 +116,7 @@ make install-lib DESTDIR=$PKG
### remove $PKG/usr/share/gpac directory
### only contains gpac.mp4 file which
### doesn't seem to play with mplayer
-rm -fr $PKG/usr/share
+#rm -fr $PKG/usr/share
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
@@ -115,11 +125,11 @@ find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a AUTHORS BUGS COPYING Changelog INSTALLME README.md TODO doc/configuration.html \
+cp -a COPYING Changelog README.md \
$PKG/usr/doc/$PRGNAM-$VERSION
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}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE