desktop/avidemux/PKGBUILD
2010-07-19 11:35:51 +00:00

100 lines
4.5 KiB
Bash

#
# Chakra Packages for Chakra, part of chakra-project.org
#
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
# include global config
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
pkgbase=avidemux
pkgname=('avidemux-cli' 'avidemux')
pkgver=2.5.3
pkgrel=1
arch=('i686' 'x86_64')
license=('GPL')
url="http://fixounet.free.fr/avidemux/"
makedepends=('cmake' 'libxslt' 'qt' 'jack' 'esound' 'libvorbis' 'sdl' 'libxv'
'alsa-lib' 'lame' 'xvidcore' 'faad2' 'faac' 'x264' 'libsamplerate' 'opencore-amr' 'yasm')
source=(http://downloads.sourceforge.net/avidemux/avidemux_${pkgver}.tar.gz
2.5.3_field_asm_fix.diff)
md5sums=('5a688029895b66b65ca86b7c85a03ee3'
'7eaae393f6c0890a68d382f32925e07d')
build() {
cd "${srcdir}/${pkgbase}_${pkgver}"
patch -Np1 -i "${srcdir}/2.5.3_field_asm_fix.diff" || return 1
mkdir build
cd build
cmake -D CMAKE_INSTALL_PREFIX=/usr -D CMAKE_BUILD_TYPE=Release -D CMAKE_SKIP_RPATH=ON -D GTK=0 -D QT4=1 .. || return 1
make || return 1
# plugin build expects libraries to be already installed; we fake a prefix
# in build/ by symlinking all libraries to build/lib/
mkdir -p lib
cd lib
find ../avidemux -name '*.so*' | xargs ln -sft . || return 1
cd ../../plugins
mkdir build
cd build
cmake -D CMAKE_INSTALL_PREFIX=/usr -D AVIDEMUX_SOURCE_DIR=${srcdir}/avidemux_${pkgver} \
-D AVIDEMUX_CORECONFIG_DIR=${srcdir}/avidemux_${pkgver}/build/config \
-D AVIDEMUX_INSTALL_PREFIX=${srcdir}/avidemux_${pkgver}/build \
-D CMAKE_BUILD_TYPE=Release -D CMAKE_SKIP_RPATH=ON -D GTK=0 -D QT4=1 .. || return 1
make || return 1
}
package_avidemux-cli() {
pkgdesc="A graphical tool to edit video (filter/re-encode/split)"
depends=('libxv' 'libxml2' 'sdl')
optdepends=('lame: for the corresponding audio encoder plugin' \
'faac: for the corresponding audio encoder plugin' \
'faad2: for the corresponding audio decoder plugin' \
'opencore-amr: for the corresponding audio decoder plugin' \
'esound: for the corresponding audio device plugin' \
'jack: for the corresponding audio device plugin' \
'sdl: for the corresponding audio device plugin' \
'x264: for the corresponding video encoder plugin' \
'xvidcore: for the corresponding video encoder plugin')
cd "${srcdir}/${pkgbase}_${pkgver}/build"
make DESTDIR="${pkgdir}" install || return 1
cd "${srcdir}/${pkgbase}_${pkgver}/plugins/build"
make DESTDIR="${pkgdir}" install || return 1
rm -r "${pkgdir}"/usr/share/avidemux
rm "${pkgdir}"/usr/bin/avidemux2_qt4
rm "${pkgdir}"/usr/lib/*{_qt4,QT4}.so
rm "${pkgdir}"/usr/lib/ADM_plugins/videoEncoder/x264/*Qt.so
rm "${pkgdir}"/usr/lib/ADM_plugins/videoEncoder/xvid/*Qt.so
rm "${pkgdir}"/usr/lib/ADM_plugins/videoFilter/*_qt4.so
ln -s /usr/lib/ADM_plugins/videoEncoder/libADM_vidEnc_xvid.so "${pkgdir}/usr/lib/libADM_vidEnc_xvid.so"
ln -s /usr/lib/ADM_plugins/videoEncoder/libADM_vidEnc_x264.so "${pkgdir}/usr/lib/libADM_vidEnc_x264.so"
install -D -m644 ../../avidemux_icon.png "${pkgdir}/usr/share/pixmaps/avidemux.png" || return 1
install -D -m644 ../../man/avidemux.1 "${pkgdir}/usr/share/man/man1/avidemux.1" || return 1
}
package_avidemux() {
pkgdesc="A graphical tool to edit video (filter/re-encode/split)"
depends=('avidemux-cli' 'qt')
cd "${srcdir}/${pkgbase}_${pkgver}"
install -D -m755 build/avidemux/avidemux2_qt4 "${pkgdir}/usr/bin/avidemux" || return 1
install -d "${pkgdir}"/usr/lib/ADM_plugins/videoEncoder/{x264,xvid}
install -d "${pkgdir}"/usr/lib/ADM_plugins/videoFilter
install -D -m755 build/lib/*{_qt4,QT4}.so "${pkgdir}/usr/lib"
install -D -m755 plugins/build/ADM_videoEncoder/ADM_vidEnc_x264/qt4/*Qt.so "${pkgdir}/usr/lib/ADM_plugins/videoEncoder/x264"
install -D -m755 plugins/build/ADM_videoEncoder/ADM_vidEnc_xvid/qt4/*Qt.so "${pkgdir}/usr/lib/ADM_plugins/videoEncoder/xvid"
install -D -m755 plugins/build/ADM_videoFilters/*/*_qt4.so "${pkgdir}/usr/lib/ADM_plugins/videoFilter"
install -d "${pkgdir}/usr/share/avidemux/i18n"
install -D -m644 build/po/*.qm "${pkgdir}/usr/share/avidemux/i18n"
install -D -m644 avidemux2.desktop "${pkgdir}/usr/share/applications/avidemux.desktop" || return 1
sed -i 's/Name=avidemux2/Name=avidemux/' "${pkgdir}/usr/share/applications/avidemux.desktop" || return 1
sed -i 's/avidemux2_gtk/avidemux/' "${pkgdir}/usr/share/applications/avidemux.desktop" || return 1
}