contrib/transcode/Pkgfile

85 lines
2.5 KiB
Plaintext
Raw Normal View History

2007-04-30 04:46:40 +02:00
# Description: Command line utilities for transcoding various media formats.
# URL: http://www.transcoding.org/cgi-bin/transcode
# Maintainer: Danny Rawlins, romster at shortcircuit dot net dot au
# Packager: Martin Opel, mo at obbl-net dot de
2008-03-03 23:09:28 +01:00
# Depends on: ffmpeg mpeg2dec libdvdnav liba52 xorg-libxv
# Optional: avifile libtheora libdv libquicktime lzo mjpegtools libfame imagemagick
2007-04-30 04:46:40 +02:00
name=transcode
2008-03-03 23:09:28 +01:00
version=1.0.5
2007-04-30 04:46:40 +02:00
release=1
2008-03-03 23:09:28 +01:00
source=(http://transcode.kabewm.com/transcode-$version.tar.bz2 \
http://dl.sourceforge.net/subtitleripper/subtitleripper-0.3-4.tgz \
ImageMagick-library-rename-fix.patch)
2007-04-30 04:46:40 +02:00
build() {
2008-03-03 23:09:28 +01:00
local config
cd transcode-$version
patch -p1 -i ../ImageMagick-library-rename-fix.patch
if pkginfo -i |grep '^avifile ' > /dev/null; then
config="--enable-avifile"
fi
if pkginfo -i |grep '^libtheora ' > /dev/null; then
config="$config --enable-theora"
fi
if pkginfo -i |grep '^libdv ' > /dev/null; then
config="$config --enable-libdv"
fi
if pkginfo -i |grep '^libquicktime ' > /dev/null; then
config="$config --enable-libquicktime"
fi
if pkginfo -i |grep '^lzo ' > /dev/null; then
config="$config --enable-lzo"
#config="$config --with-lzo-includes='/usr/include/lzo'" # doesn't work? have to use the line below.
export CPPFLAGS="-I/usr/include/lzo"
fi
if pkginfo -i |grep '^mjpegtools ' > /dev/null; then
config="$config --enable-mjpegtools"
fi
if pkginfo -i |grep '^libfame ' > /dev/null; then
config="$config --enable-fame"
fi
if pkginfo -i |grep '^imagemagick ' > /dev/null; then
config="$config --enable-imagemagick"
#config="$config --with-imagemagick-includes='/usr/include/ImageMagick'" # doesn't work? have to use the line below.
export CPPFLAGS="$CPPFLAGS `pkg-config ImageMagick --cflags-only-I`"
fi
CFLAGS="-O3 `echo $CFLAGS |sed -e 's/-O[s0-3] //'`" \
./configure \
--prefix=/usr \
--enable-libpostproc \
--enable-freetype2 \
--enable-a52 \
--enable-a52-default-decoder \
--enable-ogg \
--enable-vorbis \
--enable-libxml2 \
--enable-sdl \
$config
2007-06-25 10:39:32 +02:00
2007-04-30 04:46:40 +02:00
make
make DESTDIR=$PKG install
2008-03-03 23:09:28 +01:00
if [ -n "$CPPFLAGS" ]; then unset CPPFLAGS; fi
2007-04-30 04:46:40 +02:00
rm -r $PKG/usr/share
# Subtitle support (Han Boetes)
mkdir -p contrib/subrip
cd contrib/subrip
cp ../../../subtitleripper/* .
2008-03-03 23:09:28 +01:00
sed -i Makefile -e 's|.*ppm.*||i'
2007-04-30 04:46:40 +02:00
make clean all
install -D srttool subtitle2pgm subtitle2vobsub $PKG/usr/bin
}