2010-05-11 20:01:19 +02:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Pierre Cazenave (LQ.org pwc101)
|
|
|
|
# revision date 11/11/2007 (Armistice Day)
|
2010-05-13 00:34:59 +02:00
|
|
|
# re-revised for 12.2 and new udev locations on 23/12/2008 (day before
|
2010-05-12 17:42:42 +02:00
|
|
|
# Christmas Eve!).
|
2010-06-28 01:23:56 +02:00
|
|
|
# Updated for version 1.3.4 17/06/2010 Thanks for Heinz Wiesinger for the
|
|
|
|
# nudge.
|
2010-05-11 20:01:19 +02:00
|
|
|
#
|
|
|
|
# I have set the -enable-local-ffmpeg option since I can't figure
|
2010-05-11 22:24:49 +02:00
|
|
|
# out how to get the ffmpeg subdirectory configure script to be
|
|
|
|
# passed the correct install directory for the creation of the
|
|
|
|
# package. I figured this wasn't too much of an issue, since
|
2010-05-11 20:01:19 +02:00
|
|
|
# there's a ffmpeg SlackBuild script already.
|
|
|
|
#
|
2010-05-11 22:24:49 +02:00
|
|
|
# If you can figure out how to get it to compile so that ffmpeg
|
2010-05-11 20:01:19 +02:00
|
|
|
# obeys the variables we set, please modify this accordinly.
|
|
|
|
|
|
|
|
# Modified by Robby Workman <rworkman@slackbuilds.org> for better
|
|
|
|
# consistency with other scripts in our repository
|
|
|
|
# Re the note above, I wouldn't bother -- better to use ffmpeg
|
|
|
|
# that's installed on the system.
|
|
|
|
|
|
|
|
PRGNAM=kino
|
2010-06-28 01:23:56 +02:00
|
|
|
VERSION=1.3.4
|
|
|
|
BUILD=${BUILD:-1}
|
2010-05-11 20:01:19 +02:00
|
|
|
TAG=${TAG:-_SBo}
|
2010-05-11 22:24:49 +02:00
|
|
|
|
2010-05-21 08:41:23 +02:00
|
|
|
if [ -z "$ARCH" ]; then
|
|
|
|
case "$( uname -m )" in
|
2010-06-04 07:11:45 +02:00
|
|
|
i?86) ARCH=i486 ;;
|
|
|
|
arm*) ARCH=arm ;;
|
|
|
|
*) ARCH=$( uname -m ) ;;
|
2010-05-21 08:41:23 +02:00
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
2010-05-11 20:01:19 +02:00
|
|
|
CWD=$(pwd)
|
|
|
|
TMP=${TMP:-/tmp/SBo}
|
|
|
|
PKG=$TMP/package-$PRGNAM
|
|
|
|
OUTPUT=${OUTPUT:-/tmp}
|
|
|
|
|
|
|
|
if [ "$ARCH" = "i486" ]; then
|
|
|
|
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
|
2010-05-13 00:34:59 +02:00
|
|
|
LIBDIRSUFFIX=""
|
|
|
|
elif [ "$ARCH" = "i686" ]; then
|
2010-05-11 20:01:19 +02:00
|
|
|
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
|
2010-05-13 00:34:59 +02:00
|
|
|
LIBDIRSUFFIX=""
|
|
|
|
elif [ "$ARCH" = "x86_64" ]; then
|
2010-05-11 20:01:19 +02:00
|
|
|
SLKCFLAGS="-O2 -fPIC"
|
2010-05-13 00:34:59 +02:00
|
|
|
LIBDIRSUFFIX="64"
|
2010-05-21 08:41:23 +02:00
|
|
|
else
|
|
|
|
SLKCFLAGS="-O2"
|
|
|
|
LIBDIRSUFFIX=""
|
2010-05-11 20:01:19 +02:00
|
|
|
fi
|
|
|
|
|
2010-06-28 01:23:56 +02:00
|
|
|
set -eu
|
2010-05-11 20:01:19 +02:00
|
|
|
|
2010-05-11 22:24:49 +02:00
|
|
|
rm -rf $TMP/$PRGNAM-$VERSION $PKG
|
2010-05-11 20:01:19 +02:00
|
|
|
mkdir -p $TMP $PKG $OUTPUT
|
|
|
|
cd $TMP
|
|
|
|
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
|
|
|
|
cd $PRGNAM-$VERSION
|
|
|
|
chown -R root:root .
|
|
|
|
chmod -R u+w,go+r-w,a-s .
|
|
|
|
|
|
|
|
CFLAGS="$SLKCFLAGS" \
|
|
|
|
./configure \
|
|
|
|
--prefix=/usr \
|
2010-05-13 00:34:59 +02:00
|
|
|
--libdir=/usr/lib$LIBDIRSUFFIX \
|
2010-05-11 20:01:19 +02:00
|
|
|
--sysconfdir=/etc \
|
|
|
|
--localstatedir=/var \
|
|
|
|
--mandir=/usr/man \
|
|
|
|
--disable-static \
|
2010-06-28 01:23:56 +02:00
|
|
|
--enable-quicktime \
|
2010-05-11 22:24:49 +02:00
|
|
|
--disable-local-ffmpeg
|
2010-05-11 20:01:19 +02:00
|
|
|
|
|
|
|
make
|
|
|
|
make install DESTDIR=$PKG
|
|
|
|
|
2010-05-11 22:24:49 +02:00
|
|
|
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
|
|
|
|
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
|
2010-05-11 20:01:19 +02:00
|
|
|
|
2010-05-21 08:41:23 +02:00
|
|
|
find $PKG/usr/man -type f -exec gzip -9 {} \;
|
2010-05-11 20:01:19 +02:00
|
|
|
|
2010-05-13 00:34:59 +02:00
|
|
|
# Give the udev rules a number prefix to be consistent with other rules files
|
2010-05-12 17:42:42 +02:00
|
|
|
# and move to the new location for 12.2; then remove $PKG/etc directory
|
|
|
|
mkdir -p $PKG/lib/udev/rules.d
|
|
|
|
mv $PKG/etc/udev/rules.d/kino.rules $PKG/lib/udev/rules.d/96-kino.rules
|
|
|
|
rm -rf $PKG/etc
|
2010-05-11 20:01:19 +02:00
|
|
|
|
|
|
|
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
|
|
|
cp -a ChangeLog AUTHORS BUGS COPYING INSTALL NEWS README TODO help/ \
|
|
|
|
$PKG/usr/doc/$PRGNAM-$VERSION
|
|
|
|
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
|
|
|
find $PKG/usr/doc/$PRGNAM-$VERSION -type f -exec chmod 644 {} \;
|
|
|
|
|
2010-05-12 17:42:42 +02:00
|
|
|
# Fix incorrect ownership/permissions on help directory (from sshd to root).
|
2010-05-11 22:24:49 +02:00
|
|
|
chown -R root:root $PKG/usr/share/kino/help
|
|
|
|
find $PKG/usr/share/kino/help/en -type d -exec chmod 0755 {} \;
|
|
|
|
find $PKG/usr/share/kino/help/en -type f -exec chmod 0644 {} \;
|
|
|
|
|
2010-05-11 20:01:19 +02:00
|
|
|
mkdir -p $PKG/install
|
|
|
|
cat $CWD/slack-desc > $PKG/install/slack-desc
|
2010-05-11 22:24:49 +02:00
|
|
|
cat $CWD/doinst.sh > $PKG/install/doinst.sh
|
2010-05-11 20:01:19 +02:00
|
|
|
|
|
|
|
cd $PKG
|
2010-05-13 00:34:59 +02:00
|
|
|
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
|