From 9c6a73d713db0970f5dc1aa65c3785eb9bc2f9dc Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Sat, 21 Jun 2008 19:41:05 +0000 Subject: Add TAG=alien; change SRCDIR; add SlackBuild to docdir --- libdvdcss/build/libdvdcss.SlackBuild | 58 ++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 29 deletions(-) (limited to 'libdvdcss') diff --git a/libdvdcss/build/libdvdcss.SlackBuild b/libdvdcss/build/libdvdcss.SlackBuild index a5117d09..f8721f7b 100755 --- a/libdvdcss/build/libdvdcss.SlackBuild +++ b/libdvdcss/build/libdvdcss.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh # $Id$ -# Copyright (c) 2006,2007 Eric Hameleers +# Copyright (c) 2006-2008 Eric Hameleers # All rights reserved. # # Permission to use, copy, modify, and distribute this software for @@ -38,6 +38,8 @@ # * Omit building the Latex docs (acts strange on Slackware 11.0) # 1.2.9-2: 30/Jun/2007 by Eric Hameleers # * New SlackBuild template. +# 1.2.9-3: 21/Jun/2008 by Eric Hameleers +# * New SlackBuild template. # # Run 'sh libdvdcss.SlackBuild --cleanup' to build a Slackware package. # The package (.tgz) plus descriptive .txt file are created in /tmp . @@ -50,23 +52,21 @@ PRGNAM=libdvdcss VERSION=${VERSION:-1.2.9} ARCH=${ARCH:-i486} -BUILD=${BUILD:-2} +BUILD=${BUILD:-3} +TAG=${TAG:-alien} DOCS="AUTHORS COPYING ChangeLog INSTALL NEWS README doc/html" # Where do we look for sources? -CWD=`pwd` -SRCDIR=`dirname $0` -[ "${SRCDIR:0:1}" == "." ] && SRCDIR=${CWD}/${SRCDIR} +SRCDIR=$(cd $(dirname $0); pwd) # Place to build (TMP) package (PKG) and output (OUTPUT) the program: TMP=${TMP:-/tmp/build} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -# Make sure you edit SRCURL when you change the program's VERSION -SOURCE="$SRCDIR/${PRGNAM}-${VERSION}.tar.gz" -SRCURL="http://download.videolan.org/pub/libdvdcss//-.tar.gz" +SOURCE="$SRCDIR/${PRGNAM}-${VERSION}.tar.bz2" +SRCURL="http://download.videolan.org/pub/${PRGNAM}/${VERSION}/${PRGNAM}-${VERSION}.tar.bz2" ## ## --- with a little luck, you won't have to edit below this point --- ## @@ -80,16 +80,13 @@ set -u P1=${1:-1} # Slackware 11 and up need other option (gcc > 3.3.x) -if [ `gcc -dumpversion | tr -d '.' |cut -c 1-2` -gt 33 ]; then +if [ $(gcc -dumpversion | tr -d '.' |cut -c 1-2) -gt 33 ]; then MOPT=tune else MOPT=cpu fi case "$ARCH" in - i386) SLKCFLAGS="-O2 -march=i386 -m${MOPT}=i686" - SLKLDFLAGS=""; LIBDIRSUFFIX="" - ;; i486) SLKCFLAGS="-O2 -march=i486 -m${MOPT}=i686" SLKLDFLAGS=""; LIBDIRSUFFIX="" ;; @@ -109,26 +106,26 @@ esac # Create working directories: mkdir -p $TMP/tmp-$PRGNAM # location to build the source -rm -rf $TMP/tmp-$PRGNAM/* # By default we remove the remnants of previous build: -mkdir -p $PKG # place for the package to be built -rm -rf $PKG/* # We always erase old package's contents: -mkdir -p $OUTPUT # place for the package to be saved +rm -rf $TMP/tmp-$PRGNAM/* # we remove the remnants of previous build +mkdir -p $PKG # place for the package to be built +rm -rf $PKG/* # erase old package's contents +mkdir -p $OUTPUT # place for the package to be saved # Source file availability: if ! [ -f ${SOURCE} ]; then if ! [ "x${SRCURL}" == "x" ]; then # Check if the $SRCDIR is writable at all - if not, download to $OUTPUT - [ -w "$SRCDIR" ] || SOURCE="$OUTPUT/`basename $SOURCE`" - echo "Source '`basename ${SOURCE}`' not available yet..." - echo "Will download file to `dirname $SOURCE`" - wget -nv --connect-timeout=30 -O "${SOURCE}" "${SRCURL}" || true + [ -w "$SRCDIR" ] || SOURCE="$OUTPUT/$(basename $SOURCE)" + echo "Source '$(basename ${SOURCE})' not available yet..." + echo "Will download file to $(dirname $SOURCE)" + wget -nv -T 30 -O "${SOURCE}" "${SRCURL}" || true if [ $? -ne 0 -o ! -s "${SOURCE}" ]; then - echo "Downloading '`basename ${SOURCE}`' failed... aborting the build." + echo "Downloading '$(basename ${SOURCE})' failed... aborting the build." mv -f "${SOURCE}" "${SOURCE}".FAIL exit 1 fi else - echo "File '`basename ${SOURCE}`' not available... aborting the build." + echo "File '$(basename ${SOURCE})' not available... aborting the build." exit 1 fi fi @@ -147,9 +144,9 @@ echo "++" cd $TMP/tmp-$PRGNAM echo "Extracting the source archive(s) for $PRGNAM..." -if `file ${SOURCE} | grep -q ": bzip2"`; then +if $(file ${SOURCE} | grep -q ": bzip2"); then tar -xjvf ${SOURCE} -elif `file ${SOURCE} | grep -q ": gzip"`; then +elif $(file ${SOURCE} | grep -q ": gzip"); then tar -xzvf ${SOURCE} fi cd ${PRGNAM}-${VERSION} @@ -159,6 +156,7 @@ chmod -R u+w,go+r-w,a-s . echo Building ... LDFLAGS="$SLKLDFLAGS" \ CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ ./configure --prefix=/usr \ --libdir=/usr/lib${LIBDIRSUFFIX} \ --localstatedir=/var \ @@ -175,7 +173,7 @@ make 2>&1 | tee $OUTPUT/make-${PRGNAM}.log # Install all the needed stuff to the package dir # Use installwatch if available, to produce a logfile of the installation # process that is more easily readable: -if `which installwatch > /dev/null 2>&1`; then +if $(which installwatch > /dev/null 2>&1); then installwatch -o $OUTPUT/install-${PRGNAM}.log make DESTDIR=$PKG install else make DESTDIR=$PKG install 2>&1 |tee $OUTPUT/install-${PRGNAM}.log @@ -188,7 +186,9 @@ cp -a test/csstest $PKG/usr/bin/ # Add documentation: mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION || true -chmod -R a-w $PKG/usr/doc/$PRGNAM-$VERSION/* +cp -a $SRCDIR/$(basename $0) $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +chown -R root:root $PKG/usr/doc/$PRGNAM-$VERSION +find $PKG/usr/doc -type f -exec chmod 644 {} \; # Compress the man page(s): if [ -d $PKG/usr/man ]; then @@ -207,11 +207,11 @@ cat $SRCDIR/slack-desc > $PKG/install/slack-desc # Build the package: cd $PKG -makepkg --linkadd y --chown n $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.tgz 2>&1 | tee $OUTPUT/makepkg-${PRGNAM}.log +makepkg --linkadd y --chown n $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.tgz 2>&1 | tee $OUTPUT/makepkg-${PRGNAM}.log cd $OUTPUT -md5sum ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.tgz > ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.tgz.md5 +md5sum ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.tgz > ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.tgz.md5 cd - -cat $PKG/install/slack-desc | grep "^${PRGNAM}" > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.txt +cat $PKG/install/slack-desc | grep "^${PRGNAM}" > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txt # Clean up the extra stuff: if [ "$P1" = "--cleanup" ]; then -- cgit v1.2.3-79-gdb01