aboutsummaryrefslogtreecommitdiff
path: root/media/video/cinelerra/cinelerra.SlackBuild
diff options
context:
space:
mode:
authorrafael2k <rafael2k@370017ae-e619-0410-ac65-c121f96126d4>2009-04-02 20:31:09 +0000
committerrafael2k <rafael2k@370017ae-e619-0410-ac65-c121f96126d4>2009-04-02 20:31:09 +0000
commit1a1480107215e2f4d82f44ba42c96e9568a0bd2c (patch)
tree13ba088bbd58e46896a99a9608404ebe8eebdf3f /media/video/cinelerra/cinelerra.SlackBuild
parenta0b0096dbd9611e797738da40406ee6b29f2f7cd (diff)
downloadslackbuilds-1a1480107215e2f4d82f44ba42c96e9568a0bd2c.tar.gz
slackbuilds-1a1480107215e2f4d82f44ba42c96e9568a0bd2c.tar.bz2
cinelerra changed to git
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@2135 370017ae-e619-0410-ac65-c121f96126d4
Diffstat (limited to 'media/video/cinelerra/cinelerra.SlackBuild')
-rwxr-xr-xmedia/video/cinelerra/cinelerra.SlackBuild45
1 files changed, 21 insertions, 24 deletions
diff --git a/media/video/cinelerra/cinelerra.SlackBuild b/media/video/cinelerra/cinelerra.SlackBuild
index 441eef0d..78c50cec 100755
--- a/media/video/cinelerra/cinelerra.SlackBuild
+++ b/media/video/cinelerra/cinelerra.SlackBuild
@@ -16,7 +16,8 @@
#
# slackbuild for cinelerra, by Silvio Rhatto
# requires: openexr libdv libx264 mjpegtools fftw liba52 lame libsndfile faac faad2 libraw1394 libiec61883 libavc1394
-# tested: cinelerra-svn_version
+# tested: cinelerra-git_version
+# model: generic.mkSlackBuild $Rev: 805 $
#
# Look for slackbuildrc
@@ -31,13 +32,14 @@ CWD="$(pwd)"
SRC_NAME="cinelerra"
PKG_NAME="cinelerra"
ARCH=${ARCH:=i486}
-SRC_VERSION=${VERSION:=svn_version}
+SRC_VERSION=${VERSION:=git_version}
PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')"
BUILD=${BUILD:=1rha}
SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME
TMP=${TMP:=/tmp}
PKG=${PKG:=$TMP/package-$PKG_NAME}
REPOS=${REPOS:=$TMP}
+SLACKBUILD_PATH=${SLACKBUILD_PATH:="media/video/cinelerra"}
PREFIX=${PREFIX:=/usr}
PKG_WORK="$TMP/$SRC_NAME"
CONF_OPTIONS=${CONF_OPTIONS:=""}
@@ -47,9 +49,9 @@ NUMJOBS=${NUMJOBS:=""}
LIBDIR="$PREFIX/lib"
if [ "$ARCH" = "i386" ]; then
- SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
+ SLKCFLAGS="-O2 -march=i386 -mtune=i686"
elif [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mcpu=i686"
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686"
elif [ "$ARCH" = "s390" ]; then
@@ -65,6 +67,7 @@ ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33
ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36
ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39
ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42
+ERROR_MANIFEST=43;
# Clean up any leftovers of previous builds
rm -rf "$PKG_WORK" 2> /dev/null
@@ -76,31 +79,32 @@ mkdir -p "$PKG" || exit $ERROR_MKDIR
mkdir -p "$REPOS" || exit $ERROR_MKDIR
mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR
-# Get svn source code
+# Get git source code
cd "$SRC_DIR"
-SND_DIR="`basename svn://svn.skolelinux.org/cinelerra/trunk/hvirtual`"
+SND_DIR="$PKG_NAME.git"
-if [ "`find "$SRC_DIR/" -name .svn`" != "" ] && [ -d "$SRC_DIR/$SND_DIR" ]; then
+if [ "`find "$SRC_DIR/" -name *.git`" != "" ] && [ -d "$SRC_DIR/$SND_DIR" ]; then
cd $SND_DIR
- svn update || exit $ERROR_VCS
+ git pull || exit $ERROR_VCS
else
- svn checkout svn://svn.skolelinux.org/cinelerra/trunk/hvirtual $SND_DIR || exit $ERROR_VCS
+ git clone git://git.cinelerra.org/j6t/cinelerra.git $SND_DIR || exit $ERROR_VCS
cd $SND_DIR
fi
-PKG_VERSION="`svn info | awk '/Last Changed Rev:/ { print $4 }'`_svn"
+PKG_VERSION="`git log | head -n 1 | awk '{ print $2 }'`_git"
-# Copy svn source
+# Copy git source
cd "$PKG_WORK"
cp -a $SRC_DIR/* .
PKG_SRC="$PWD/$SND_DIR"
cd "$PKG_SRC"
# Patch source
-patches="
+patches=" [[PATCH URLS]]
$PKG_NAME.diff $PKG_NAME-$PKG_VERSION.diff
$PKG_NAME-$PKG_VERSION-$ARCH.diff $PKG_NAME-$ARCH.diff"
for patch in $patches; do
+ patch="`basename $patch`"
if [ -f "$CWD/$patch" ]; then
patch -Np1 < "$CWD/$patch" || exit $ERROR_PATCH
elif [ -f "$CWD/patches/$patch" ]; then
@@ -109,15 +113,7 @@ for patch in $patches; do
gzip -dc "$CWD/$patch.gz" | patch -Np1 || exit $ERROR_PATCH
elif [ -f "$CWD/patches/$patch.gz" ]; then
gzip -dc "$CWD/patches/$patch.gz" | patch -Np1 || exit $ERROR_PATCH
- fi
-done
-
-if echo [[PATCH URLS]] | grep -q -v "PATCH URLS"; then
- for patch_url in [[PATCH URLS]]; do
- patch="`basename $patch_url`"
- if [ ! -s "$SRC_DIR/$patch" ]; then
- wget "$patch_url" -O "$SRC_DIR/$patch" || exit $ERROR_WGET
- fi
+ elif [ -f "$SRC_DIR/$patch" ]; then
if [ "`basename $patch .gz`" != "$patch" ]; then
gzip -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH
elif [ "`basename $patch .bz2`" != "$patch" ]; then
@@ -125,8 +121,8 @@ if echo [[PATCH URLS]] | grep -q -v "PATCH URLS"; then
else
patch -Np1 < "$SRC_DIR/$patch" || exit $ERROR_PATCH
fi
- done
-fi
+ fi
+done
# Configure
if [ "$ARCH" == "i586" ] || [ "$ARCH" == "i686" ]; then
@@ -201,7 +197,8 @@ fi
# Build the package
cd "$PKG"
-makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG
+mkdir -p $REPOS/$SLACKBUILD_PATH
+makepkg -l y -c n "$REPOS/$SLACKBUILD_PATH/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG
# Delete source and build directories if requested
if [ "$CLEANUP" == "yes" ] || [ "$1" = "--cleanup" ]; then