Want more features on Pastebin? Sign Up, it's FREE!
Guest

Test

By: a guest on Nov 24th, 2011  |  syntax: None  |  size: 1.98 KB  |  views: 65  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # Maintainer:  Jekyll Wu <adaptee at gmail dot com>
  2. # Contributor: Xavion <Xavion (dot) 0 (at) Gmail (dot) com>
  3. # Contributor: Rick W. Chen <stuffcorpse@archlinux.us>
  4. # Contributor: Pierre Schmitz <pierre@archlinux.de>
  5. # Contributor: Marek Kubica <marek@xivilization.net>
  6.  
  7. realname=phonon
  8. bename=mplayer
  9. pkgname=${realname}-${bename}-git
  10. pkgver=20111124
  11. pkgrel=1
  12. pkgdesc="Mplayer backend for phonon, the multimedia API of KDE."
  13. arch=("i686" "x86_64")
  14. url="http://projects.kde.org/projects/kdesupport/${realname}/${realname}-${bename}"
  15. license=("LGPL")
  16. depends=("${realname}" "${bename}")
  17. source=('fix_find_config.patch')
  18. makedepends=("pkg-config" "cmake" "automoc4" "git")
  19. provides=("${realname}-${bename}" "${realname}-backend")
  20. conflicts=("${realname}-${bename}" )
  21. md5sums=('75a2330045f39871b7d0b8f8c308f5c1')
  22. sha256sums=('7aa102bc455a7b51c716b3482ef4bde87110b437b183b479b108351475550a57')
  23.  
  24. _gitroot="git://anongit.kde.org/${realname}-${bename}.git"
  25. _gitname="${realname}-${bename}"
  26.  
  27. build() {
  28.  
  29.     # Config
  30.     [ ${CARCH} = 'x86_64' ] && CXXFLAGS="$CXXFLAGS -fPIC"
  31.  
  32.     cd ${srcdir}
  33.  
  34.     # Repository
  35.     msg "Connecting to GIT server...."
  36.     if [ -d ${_gitname} ] ; then
  37.         cd ${_gitname} && git pull origin
  38.         msg "The local files are updated."
  39.     else
  40.         git clone ${_gitroot} ${_gitname}
  41.         msg "GIT checkout done"
  42.     fi
  43.  
  44.  
  45.     if [ -d ${srcdir}/build ]; then
  46.         rm ${srcdir}/build/* -rf
  47.     else
  48.         mkdir ${srcdir}/build/
  49.     fi
  50.  
  51.     # Build
  52.     patch -Np1 -i ${srcdir}/fix_find_config.patch
  53.     cd ${srcdir}/build
  54.     msg "Starting make..."
  55.  
  56.     { type -P kde4-config &>/dev/null && _prefix=$(kde4-config --prefix) ; } || _prefix=/usr
  57.     cmake \
  58.             -DCMAKE_BUILD_TYPE=Release \
  59.             -DCMAKE_INSTALL_PREFIX=$_prefix \
  60.             -DPLUGIN_INSTALL_DIR=$_prefix/lib/kde4 \
  61.             -DSERVICES_INSTALL_DIR=$_prefix/share/kde4/services \
  62.             ../${_gitname}
  63.  
  64.     make || return 1
  65. }
  66.  
  67.  
  68. package () {
  69.     cd ${srcdir}/build
  70.     make DESTDIR=${pkgdir} install || return 1
  71. }
clone this paste RAW Paste Data