酷我音乐播放器for linux客户端 PKGBUILD文件

# Maintainer: axlrose <zlbgps AT gmail.com>
_pkgname=kwplayer
pkgname=${_pkgname}-git
pkgver=20131012
pkgrel=1
pkgdesc="KW music player is used to get music resources from Internet."
arch=('any')
url="https://github.com/LiuLang/kwplayer"
license=('GPL')
depends=('gst-libav' 'python' 'rsync')
#Depends: python3-gi, gstreamer1.0-libav|gstreamer0.10-ffmpeg, gstreamer1.0-plugins-base|gstreamer0.10-plugins-base, gir1.2-gstreamer-1.0|gir1.2-gstreamer-0.10, gir1.2-gst-plugins-base-1.0|gir1.2-gst-plugins-base-0.10, python3-cairo, python3-gi-cairo, gnome-icon-theme-symbolic
#Suggests: python3-leveldb
optdepends=('lieveldb: fast key/value database')
makedepends=('git')
provides=("${_pkgname}")
conflicts=("${_pkgname}")
source=()
md5sums=()
_gitroot=https://github.com/LiuLang/kwplayer.git
_gitname=${_pkgname}
build() {
  cd ${srcdir}
  msg "Connecting to projects.archlinux.org GIT server..."
  if [ -d ${srcdir}/$_gitname ]; then
    cd $_gitname && git pull origin
    msg "The local files are updated."
  else
    git clone $_gitroot
  fi
  msg "GIT checkout done or server timeout"
  msg "Starting make..."
    
  if [ -d ${srcdir}/$_gitname-build ]; then
    rm -rf ${srcdir}/$_gitname-build
  fi
  git clone ${srcdir}/$_gitname ${srcdir}/$_gitname-build || return 1
  cd ${srcdir}/$_gitname-build/ || return 1
  #make DESTDIR="$pkgdir" install
}
package()
{
    cd ${srcdir}/$_gitname-build/ || return 1
    cd ${srcdir}/$_gitname-build/build/
    ./generate_mo.sh
    ./generate_pot.sh
    cd ${srcdir}/$_gitname-build/ || return 1
    python_ver=3.3
    PYLIB="${pkgdir}/usr/lib/python${python_ver}/site-packages/"
    mkdir -pv $PYLIB
    mkdir -pv ${pkgdir}/usr/bin/
    #mkdir -pv ${pkgdir}/usr/share
    cp -v kwplayer ${pkgdir}/usr/bin/
    cp -rvf kuwo $PYLIB/
    cp -rvf mutagenx $PYLIB/
    rm -rvf $PYLIB/mutagenx/__pycache__
    cp -rvf share ${pkgdir}/usr/
}
# vim:set ts=4 sw=4 et:


你可能感兴趣的:(archLinux,PKGBUILD文件,酷我音乐器)