[Slackbuilds-users] kdenlive Slackbuild

stormtracknole stormtracknole at gmail.com
Wed Aug 5 16:39:54 UTC 2009


List,

I modified slacky it kdenlive Slackbuild to follow more closely the
requirements for Slackbuilds.org.  So, before I submit my SlackBuild, is
there anyone else planning on adding kdenlive once Slackware 13 comes out?
Just wanted to make sure before I submit it.  Also, can someone take a look
at what I have come up with so far and give me some pointers?  The script
will build kdenlive from svn instead of the standard package.  I also have a
slackbuild for mlt which is a big requirement.  Thanks ahead of time! :^)

-stn

Here's the kdenlive.Slackbuild:

#!/bin/sh

# Slackware build script for <appname>

# Written by (your name) (your contact information)

# (add license information here if you desire; otherwise,
# all submissions are considered to be in the public domain)
# Some licenses may incorporate the "Written by" information
# above, and if so, that line can be omitted
# We strongly suggest *not* using GPL for scripts, as it requires
# a copy of the GPL to be distributed with it.  Since the GPL
# itself is longer than any build script will be, this just doesn't
# make good sense...

# |-----------------------------------------------------------------| #
# REMOVE THIS ENTIRE BLOCK OF TEXT #
#
# $Id: template.SlackBuild,v 1.8 2009/05/27 01:34:37 slackbuilds Exp
slackbuilds $
#
# This template is not meant to be a 'cut and paste' script to
# enable any random user to make a working package.  While
# we're certainly not discouraging use of this template, if
# you haven't manually gone through each step of the process
# without the build script (typically as a normal user, as this
# will reveal problems that you won't see as root), then there's
# a good chance that something important is missing from your
# submission.

# When using this template script, please remove as many of
# these unnecessary comments as possible.  Commented code is
# a good thing, but if it's obvious, there's no need to comment it.
#
# AGAIN, REMOVE THE COMMENTS IF THEY ARE NOT NEEDED - DON'T JUST
# DELETE THIS BLOCK OF TEXT WITHOUT BOTHERING TO READ WHAT'S IN IT.
#
# |-----------------------------------------------------------------| #

PRGNAM=kdenlive			# replace with name of program
VERSION=${VERSION:-`date +%Y%m%d`}		# replace with version of program
ARCH=${ARCH:-i686}		# this should not change
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}		# the "_SBo" is required

CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}	# For consistency's sake, use this
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}	# Drop the package in /tmp

if [ "$ARCH" = "i486" ]; then
  SLKCFLAGS="-O2 -march=i486 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
  SLKCFLAGS="-O2 -march=i686 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
  SLKCFLAGS="-O2 -fPIC"
  LIBDIRSUFFIX="64"
fi

if [ ! -d $TMP ]; then
	 mkdir -p $TMP
fi

if [ ! -d $PKG ]; then
	  mkdir -p $PKG
fi

cd $TMP
svn co https://kdenlive.svn.sourceforge.net/svnroot/kdenlive/trunk/kdenlive

echo -e "\E[0;32m+------------------------------------+\E[0;0m"
echo -e "\E[0;32m| Start SlackBuild $NAME-$VERSION |\E[0;0m"
echo -e "\E[0;32m+------------------------------------+\E[0;0m"

cd $PRGNAM

find . -perm 777 -exec chmod 755 {} \;
find . -perm 775 -exec chmod 755 {} \;
find . -perm 555 -exec chmod 755 {} \;
find . -perm 666 -exec chmod 644 {} \;
find . -perm 664 -exec chmod 644 {} \;
find . -perm 444 -exec chmod 644 {} \;

chown -R root:root .

cmake -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_C_FLAGS= \
-DCMAKE_CXX_FLAGS= \
. || exit 1

# cmake doesn't seem able to take CFLAGS and CXXFLAGS 'regoulary'
sed -i  s/"CMAKE_C_FLAGS:STRING="/"CMAKE_C_FLAGS:STRING=\'-O2
-march=i686 -mtune=i686\'"/ CMakeCache.txt
sed -i  s/"CMAKE_CXX_FLAGS:STRING="/"CMAKE_CXX_FLAGS:STRING=\'-O2
-march=i686 -mtune=i686\'"/ CMakeCache.txt

make || exit 1

make install DESTDIR=$PKG || exit 1

mkdir -p $PKG/usr/doc/$NAME-$VERSION
cp -a AUTHORS COPYING ChangeLog INSTALL NEWS README TODO
$PKG/usr/doc/$NAME-$VERSION

( cd $PKG
  find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : |
xargs strip --strip-unneeded 2> /dev/null
  find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d
: | xargs strip --strip-unneeded 2> /dev/null
  find . | xargs file | grep "current ar archive" | cut -f 1 -d : |
xargs strip -g 2> /dev/null
      )

mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/slack-desc > $PKG/usr/doc/$NAME-$VERSION/slack-desc
cat $CWD/$NAME.SlackBuild > $PKG/usr/doc/$NAME-$VERSION/$NAME.SlackBuild

cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.slackbuilds.org/pipermail/slackbuilds-users/attachments/20090805/6ae7ee25/attachment.htm>


More information about the SlackBuilds-users mailing list