Username: Password: Remember me
# Maintainer: mike
 
_ubuntuver=16.04
_pkgbasename=acestream-engine
_enginename=acestreamengine
 
pkgname=acestream-engine
pkgver=3.1.16
pkgrel=7
pkgdesc="P2P utility for multimedia live streaming and file transfer (stable version)"
arch=("x86_64")
url="http://acestream.org/"
license=("custom")
depends=(
    "net-tools" 
    "openssl" 
    "python2-apsw" 
    "python2-lxml" 
    "python2-setuptools" 
    "python2-typing" 
    "python2-xlib")
optdepends=("python2-libappindicator: GTK2 GUI")
provides=("$_pkgbasename")
conflicts=("$_pkgbasename")
backup=("usr/lib/$_pkgbasename/acestream.conf")
install="$_pkgbasename.install"
source=(
    "$_pkgbasename.service"
    "$pkgname-$pkgver.tar.gz::http://dl.acestream.org/linux/acestream_${pkgver}_ubuntu_${_ubuntuver}_x86_64.tar.gz"
    "python2-m2crypto-0.24.0-4-x86_64.pkg.tar.xz"
    "$_pkgbasename.desktop"
    "LICENSE"
)
sha256sums=(
    "9446e4c36c2e92b4253a1c3fea5fa30d366d46295dcd1f1cac4ddfe8f002fcbe"
    "452bccb8ae8b5ff4497bbb796081dcf3fec2b699ba9ce704107556a3d6ad2ad7"
    "177c22681be64a7533b3303652da8724aa20edcbead87be90765bc5040f4cff5"
    "fad731aec3371b3e76065cf1668be6b61d33547d321c8cfb2b6018faa3d5b7b0"
    "SKIP"
)
 
package() {    
    cd "$srcdir/acestream_${pkgver}_ubuntu_${_ubuntuver}_$CARCH"
    sed -i "/ROOT=/c\ROOT=\/usr/lib\/${_pkgbasename}" "start-engine"
 
    install -Dm755 "$_enginename" "$pkgdir/usr/lib/$_pkgbasename/$_enginename"
    install -Dm755 "start-engine" "$pkgdir/usr/lib/$_pkgbasename/start-engine"
    install -Dm644 "acestream.conf" "$pkgdir/usr/lib/$_pkgbasename/acestream.conf"
    install -Dm644 "data/images/streamer-32.png" "$pkgdir/usr/share/pixmaps/$_pkgbasename.png"
    install -Dm644 "$srcdir/$_pkgbasename.service" "$pkgdir/usr/lib/systemd/system/$_pkgbasename.service"
    install -Dm644 "$srcdir/$_pkgbasename.desktop" "$pkgdir/usr/share/applications/$_pkgbasename.desktop"
    install -Dm644 "$srcdir/LICENSE" "$pkgdir/usr/share/licenses/$_pkgbasename/LICENSE"
 
    cp -a "data" "$pkgdir/usr/lib/$_pkgbasename/"
    cp -a "lib" "$pkgdir/usr/lib/$_pkgbasename/"
    cp -a "$srcdir/usr/lib/python2.7/site-packages/M2Crypto" "$pkgdir/usr/lib/$_pkgbasename/lib"
 
    rm "$pkgdir/usr/lib/$_pkgbasename/lib/lxml-3.7.2-py2.7-linux-x86_64.egg"
 
    mkdir -p "$pkgdir/usr/bin"
    ln -sf "/usr/lib/$_pkgbasename/start-engine" "$pkgdir/usr/bin/$_enginename"
}