desktop/kdemultimedia-thumbnailers/PKGBUILD

104 lines
3.8 KiB
Bash

#
# KDE SC Packages for Chakra, part of chakra-project.org
#
# maintainer: Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
# include global config
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
pkgname="kdemultimedia-thumbnailers"
pkgdesc='KDE Thumbnailers for several formats'
arch=('x86_64')
pkgver=${_kdever}
pkgrel=1
depends=('mplayer' 'ffmpeg' 'kdelibs')
provides=('ffmpegthumbs' 'mplayerthumbs')
groups=("kde" "kdemultimedia" "kde-uninstall")
install=kdemultimedia.install
url="http://www.kde.org"
license=('GPL' 'LGPL' 'FDL')
options=('docs' '!header' 'debug' 'log')
conflicts=('audiothumbs')
provides=('audiothumbs')
makedepends=('pkg-config' 'cmake' 'automoc4' 'docbook-xsl')
source=($_mirror/ffmpegthumbs-$_kdever.tar.xz
$_mirror/mplayerthumbs-$_kdever.tar.xz
http://kenai.com/projects/kde-odf-thumbnail/downloads/download/1.0.0/kde-odf-thumbnail-1.0.0.tar.gz
http://kde-apps.org/CONTENT/content-files/107128-GimpResourcesThumbnailer-2.1.0.tar.gz
http://kde-apps.org/CONTENT/content-files/114885-AudioThumbs-0.1.tar.gz
mplayerthumbs-horizontal.patch
sprocket-large.png
sprocket-medium.png
sprocket-small.png)
sha1sums=(`grep ffmpegthumbs-$_kdever.tar.xz ../kde-sc.md5 | cut -d" " -f1`
`grep mplayerthumbs-$_kdever.tar.xz ../kde-sc.md5 | cut -d" " -f1`
'b8304d0719be703a48f46ad4ce061cf93ff990b6' # kde-odf-thumbnail-1.0.0.tar.gz
'3fc4ca2dd833e8c0b29c349ff9776437221fa4db' # 107128-GimpResourcesThumbnailer-2.1.0.tar.gz
'3d1e0cc84c38f817f150c1bb067328dc2388db90' # 114885-AudioThumbs-0.1.tar.gz
'8ef3787b0f3f03e6791088172b5fd4999827fd69' # mplayerthumbs-horizontal.patch
'e4b5fd3fa97b70ab0904fb8073f99fb9739a10bc' # sprocket-large.png
'27cf3454d8708bac021a03eb7809695804f11286' # sprocket-medium.png
'c7cf1ee783f2e0ad7be6bd31e5408877438b08f1') # sprocket-small.png
build() {
pushd ${srcdir}/ffmpegthumbs-${pkgver}
cmake . -DCMAKE_BUILD_TYPE=${_build_type} \
-DCMAKE_INSTALL_PREFIX=${_installprefix} \
-DCMAKE_{SHARED,MODULE,EXE}_LINKER_FLAGS='-Wl,--no-undefined -Wl,--as-needed'
make VERBOSE=1 || return 1
popd
pushd ${srcdir}/mplayerthumbs-${pkgver}
msg "applying patches ..."
patch -Np2 -i ${srcdir}/mplayerthumbs-horizontal.patch
cmake . -DCMAKE_BUILD_TYPE=${_build_type} \
-DCMAKE_INSTALL_PREFIX=${_installprefix} \
-DCMAKE_{SHARED,MODULE,EXE}_LINKER_FLAGS='-Wl,--no-undefined -Wl,--as-needed'
make VERBOSE=1 || return 1
popd
pushd $srcdir/kde-odf-thumbnail-1.0.0
cmake . -DCMAKE_BUILD_TYPE=${_build_type} \
-DCMAKE_INSTALL_PREFIX=${_installprefix} \
-DCMAKE_SKIP_RPATH=ON \
-DCMAKE_{SHARED,MODULE,EXE}_LINKER_FLAGS='-Wl,--no-undefined -Wl,--as-needed'
popd
pushd $srcdir/GimpResourcesThumbnailer-2.1.0
cmake . -DCMAKE_BUILD_TYPE=${_build_type} \
-DCMAKE_INSTALL_PREFIX=${_installprefix} \
-DCMAKE_{SHARED,MODULE,EXE}_LINKER_FLAGS='-Wl,--no-undefined -Wl,--as-needed'
popd
pushd $srcdir/AudioThumbs-0.1
cmake . -DCMAKE_BUILD_TYPE=${_build_type} \
-DCMAKE_INSTALL_PREFIX=${_installprefix} \
-DCMAKE_{SHARED,MODULE,EXE}_LINKER_FLAGS='-Wl,--no-undefined -Wl,--as-needed'
popd
}
package() {
splitdirs="mplayerthumbs ffmpegthumbs"
for i in ${splitdirs} ; do
cd ${srcdir}/${i}-${pkgver}
make DESTDIR=${pkgdir} install
done
install -D -m644 ${srcdir}/sprocket-large.png ${pkgdir}/usr/share/apps/videothumbnail/sprocket-large.png
install -D -m644 ${srcdir}/sprocket-medium.png ${pkgdir}/usr/share/apps/videothumbnail/sprocket-medium.png
install -D -m644 ${srcdir}/sprocket-small.png ${pkgdir}/usr/share/apps/videothumbnail/sprocket-small.png
cd $srcdir/kde-odf-thumbnail-1.0.0
make DESTDIR=${pkgdir} install
cd $srcdir/GimpResourcesThumbnailer-2.1.0
make DESTDIR=${pkgdir} install
cd $srcdir/AudioThumbs-0.1
make DESTDIR=${pkgdir} install
}