void-packages/srcpkgs/plex-media-server/template

53 lines
1.8 KiB
Bash
Raw Normal View History

# Template file for 'plex-media-server'
pkgname=plex-media-server
version=1.15.3.876
revision=1
_suffix=ad6e39743
archs="i686 x86_64 armv7 aarch64"
create_wrksrc=yes
short_desc="Plex Media Server"
maintainer="Anachron <gith@cron.world>"
license="Proprietary"
homepage="https://www.plex.tv/media-server-downloads"
restricted=yes
repository=nonfree
# See https://support.plex.tv/articles/categories/plex-media-server/
case "$XBPS_TARGET_MACHINE" in
i686*)
distfiles="https://downloads.plex.tv/${pkgname}-new/${version}-${_suffix}/debian/plexmediaserver_${version}-${_suffix}_i386.deb"
checksum="47dd162e48749d68c37093b4d1796a91fdbdfb5b8e68980ce126380d4894da66"
;;
x86_64*)
distfiles="https://downloads.plex.tv/${pkgname}-new/${version}-${_suffix}/debian/plexmediaserver_${version}-${_suffix}_amd64.deb"
checksum="a432d6a46fdc0117e9f3529e032ab1fc7ad25f705b9be5dad850108d89a5ca79"
;;
armv7*)
distfiles="https://downloads.plex.tv/${pkgname}-new/${version}-${_suffix}/debian/plexmediaserver_${version}-${_suffix}_armhf.deb"
checksum="0ec9ad17fe3e3df2e278477eb6139f15261dfc8faac3830b3723c07502772b75"
;;
aarch64*)
distfiles="https://downloads.plex.tv/${pkgname}-new/${version}-${_suffix}/debian/plexmediaserver_${version}-${_suffix}_arm64.deb"
checksum="3c343bb7f6f335637a1fec15d790e53a9a8e73ec66918ae11f41b4d11073d110"
;;
esac
nopie="yes"
nopie_files="/usr/lib/plexmediaserver/Plex DLNA Server"
do_extract() {
fn="${distfiles##*/}"
ar x "${XBPS_SRCDISTDIR}/${pkgname}-${version}/${fn}"
tar xf data.tar.xz
mv usr/{s,}bin
sed -i 's/export PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR.*/'\
'export PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR="${HOME}\/.pms"/g' usr/bin/start_pms
rm -r etc/{apt,init}
}
do_install() {
vcopy etc /
vcopy usr /
vlicense "${FILESDIR}/LICENSE"
}