mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-18 22:54:00 +00:00
242 lines
8.8 KiB
Bash
242 lines
8.8 KiB
Bash
# Contributor graysky <graysky AT archlinux DOT org>
|
|
# Contributor BlackIkeEagle < ike DOT devolder AT gmail DOT com >
|
|
# Contributor Oleg Rakhmanov <oleg [at] archlinuxarm [dot] com>
|
|
# Contributor tomasgroth at yahoo.dk
|
|
# Contributor WarheadsSE <max@warheads.net>
|
|
# Contributor Adrian Fedoreanu <adrian [dot] fedoreanu [at] gmail [dot] com>
|
|
|
|
buildarch=20
|
|
|
|
_prefix=/usr
|
|
|
|
pkgbase=kodi-rbp-git
|
|
_suffix=rbp-git
|
|
pkgname=("kodi-$_suffix" "kodi-eventclients-$_suffix" "kodi-tools-texturepacker-$_suffix" "kodi-dev-$_suffix")
|
|
pkgver=18.0b1v2.20180827
|
|
pkgrel=1
|
|
_commit=f21b477993cae9f59f77b8798a1390159863f3f7
|
|
_short=${_commit::+7}
|
|
_codename=Leia
|
|
_tag="18.0b1v2-$_codename"
|
|
_rtype=Alpha
|
|
_ffmpeg_version="4.0.2-$_codename-$_rtype"3
|
|
_libdvdcss_version="1.4.1-$_codename-$_rtype"-3
|
|
_libdvdnav_version="6.0.0-$_codename-$_rtype"-3
|
|
_libdvdread_version="6.0.0-$_codename-$_rtype"-3
|
|
_fmt_version="3.0.1"
|
|
_crossguid_version="8f399e8bd4"
|
|
_fstrcmp_version="0.7.D001"
|
|
_flatbuffers_version="1.9.0"
|
|
arch=('armv6h' 'armv7h')
|
|
url="http://kodi.tv"
|
|
license=('GPL2')
|
|
makedepends=(
|
|
'afpfs-ng' 'bluez-libs' 'boost' 'cmake' 'curl' 'doxygen'
|
|
'gperf' 'hicolor-icon-theme' 'jasper' 'java-environment' 'libaacs' 'libass'
|
|
'libbluray' 'libcdio' 'libmariadbclient' 'libmicrohttpd' 'groff'
|
|
'libmodplug' 'libmpeg2' 'libnfs' 'libplist' 'libpulse' 'libssh' 'libcec-rpi'
|
|
'libxrandr' 'libxslt' 'lirc' 'lzo' 'nasm' 'nss-mdns' 'python2-pillow'
|
|
'python2-pybluez' 'python2-simplejson' 'raspberrypi-firmware' 'rtmpdump'
|
|
'shairplay' 'smbclient' 'speex' 'swig' 'taglib' 'tinyxml' 'unzip' 'upower'
|
|
'yajl' 'zip' 'giflib' 'rapidjson' 'polkit' 'libinput' 'libxkbcommon' 'ghostscript'
|
|
)
|
|
source=("xbmc-$_tag.tar.gz::https://api.github.com/repos/xbmc/xbmc/tarball/$_commit"
|
|
'kodi.service'
|
|
'99-kodi.rules'
|
|
'polkit.rules'
|
|
'hifiberry_digi.patch'
|
|
"ffmpeg-$_ffmpeg_version.tar.gz::https://github.com/xbmc/FFmpeg/archive/$_ffmpeg_version.tar.gz"
|
|
"libdvdcss-$_libdvdcss_version.tar.gz::https://github.com/xbmc/libdvdcss/archive/$_libdvdcss_version.tar.gz"
|
|
"libdvdnav-$_libdvdnav_version.tar.gz::https://github.com/xbmc/libdvdnav/archive/$_libdvdnav_version.tar.gz"
|
|
"libdvdread-$_libdvdread_version.tar.gz::https://github.com/xbmc/libdvdread/archive/$_libdvdread_version.tar.gz"
|
|
"http://mirrors.kodi.tv/build-deps/sources/fmt-$_fmt_version.tar.gz"
|
|
"http://mirrors.kodi.tv/build-deps/sources/crossguid-$_crossguid_version.tar.gz"
|
|
"http://mirrors.kodi.tv/build-deps/sources/fstrcmp-$_fstrcmp_version.tar.gz"
|
|
"http://mirrors.kodi.tv/build-deps/sources/flatbuffers-$_flatbuffers_version.tar.gz"
|
|
)
|
|
noextract=(
|
|
"libdvdcss-$_libdvdcss_version.tar.gz"
|
|
"libdvdnav-$_libdvdnav_version.tar.gz"
|
|
"libdvdread-$_libdvdread_version.tar.gz"
|
|
"ffmpeg-$_ffmpeg_version.tar.gz"
|
|
"fmt-$_fmt_version.tar.gz"
|
|
"crossguid-$_crossguid_version.tar.gz"
|
|
"fstrcmp-$_fstrcmp_version.tar.gz"
|
|
"flatbuffers-$_flatbuffers_version.tar.gz"
|
|
)
|
|
sha256sums=('be2ccdfd2e9d360893a81ca49580d786d78219e764ddb6d65865eb10806c6f38'
|
|
'aa96b6abb18329dcca7b5f775df69eee10beeb9ca727e867e7a96886953c66d0'
|
|
'b31570f95654434b01fd8531612fbb6be77cbc1c519dd60f92feae26eb160f3d'
|
|
'9ea592205023ba861603d74b63cdb73126c56372a366dc4cb7beb379073cbb96'
|
|
'0b9d951911a8576c26dec8a31f394282677e48afff49b9579448121d27b8509e'
|
|
'0e4980abac7b886e0eb5f4157941947be3c10d616a19bd311dc2f9fd2eb6a631'
|
|
'6af3d4f60e5af2c11ebe402b530c07c8878df1a6cf19372e16c92848d69419a5'
|
|
'071e414e61b795f2ff9015b21a85fc009dde967f27780d23092643916538a57a'
|
|
'a30b6aa0aad0f2c505bc77948af2d5531a80b6e68112addb4c123fca24d5d3bf'
|
|
'dce62ab75a161dd4353a98364feb166d35e7eea382169d59d9ce842c49c55bad'
|
|
'3d77d09a5df0de510aeeb940df4cb534787ddff3bb1828779753f5dfa1229d10'
|
|
'e4018e850f80700acee8da296e56e15b1eef711ab15157e542e7d7e1237c3476'
|
|
'5ca5491e4260cacae30f1a5786d109230db3f3a6e5a0eb45d0d0608293d247e3')
|
|
|
|
prepare() {
|
|
cd "xbmc-xbmc-$_short"
|
|
|
|
patch -Np1 -i "$srcdir/hifiberry_digi.patch"
|
|
[[ -d kodi-build ]] && rm -rf kodi-build
|
|
mkdir $srcdir/kodi-build
|
|
}
|
|
|
|
build() {
|
|
cd kodi-build
|
|
|
|
# _CPU=arm1176jzf-s for rpi1
|
|
# _CPU=cortex-a7 for rpi2
|
|
# _CPU=cortex-a53 for rpi3
|
|
|
|
if [[ $CARCH == "armv6h" ]]; then
|
|
_CPU=arm1176jzf-s
|
|
CFLAGS+=" -march=armv6zk"
|
|
CXXFLAGS="${CFLAGS}"
|
|
LDFLAGS+=" -latomic"
|
|
elif [[ $CARCH == "armv7h" ]]; then
|
|
_CPU=cortex-a7
|
|
CFLAGS+=" -march=armv7ve"
|
|
CXXFLAGS="${CFLAGS}"
|
|
fi
|
|
|
|
cmake -DCMAKE_INSTALL_PREFIX=/usr \
|
|
-DCMAKE_INSTALL_LIBDIR=/usr/lib \
|
|
-DCMAKE_PREFIX_PATH=/opt/vc \
|
|
-DCORE_PLATFORM_NAME=rbpi \
|
|
-DWITH_CPU="$_CPU" \
|
|
-DENABLE_EVENTCLIENTS=ON \
|
|
-DENABLE_OPENGL=OFF \
|
|
-DENABLE_VAAPI=OFF \
|
|
-DENABLE_VDPAU=OFF \
|
|
-Dlibdvdcss_URL="$srcdir/libdvdcss-$_libdvdcss_version.tar.gz" \
|
|
-Dlibdvdnav_URL="$srcdir/libdvdnav-$_libdvdnav_version.tar.gz" \
|
|
-Dlibdvdread_URL="$srcdir/libdvdread-$_libdvdread_version.tar.gz" \
|
|
-DFFMPEG_URL="$srcdir/ffmpeg-$_ffmpeg_version.tar.gz" \
|
|
-DFMT_URL="$srcdir/fmt-$_fmt_version.tar.gz" \
|
|
-DENABLE_INTERNAL_FMT=ON \
|
|
-DCROSSGUID_URL="$srcdir/crossguid-$_crossguid_version.tar.gz" \
|
|
-DENABLE_INTERNAL_CROSSGUID=ON \
|
|
-DFSTRCMP_URL="$srcdir/fstrcmp-$_fstrcmp_version.tar.gz" \
|
|
-DENABLE_INTERNAL_FSTRCMP=ON \
|
|
-DFLATBUFFERS_URL="$srcdir/flatbuffers-$_flatbuffers_version.tar.gz" \
|
|
-DENABLE_INTERNAL_FLATBUFFERS=ON \
|
|
../"xbmc-xbmc-$_short"
|
|
make
|
|
make preinstall
|
|
}
|
|
|
|
package_kodi-rbp-git() {
|
|
pkgdesc="A software media player and entertainment hub for digital media (Raspberry Pi)"
|
|
depends=(
|
|
'bluez-libs' 'desktop-file-utils' 'freetype2' 'fribidi' 'libcec-rpi'
|
|
'hicolor-icon-theme' 'libass' 'libcdio' 'libjpeg-turbo' 'libmariadbclient'
|
|
'libmicrohttpd' 'libpulse' 'libssh' 'libxrandr' 'lirc' 'raspberrypi-firmware'
|
|
'libxslt' 'lzo' 'python2-pillow' 'python2-simplejson' 'smbclient'
|
|
'speex' 'taglib' 'tinyxml' 'xorg-xdpyinfo' 'yajl' 'libinput' 'libxkbcommon' 'libbluray'
|
|
)
|
|
optdepends=(
|
|
'afpfs-ng: Apple shares support'
|
|
'bluez: Blutooth support'
|
|
'python2-pybluez: Bluetooth support'
|
|
'libnfs: NFS shares support'
|
|
'libplist: Limited AirPlay support'
|
|
'lsb-release: log distro information in crashlog'
|
|
'shairplay: Limited AirPlay support'
|
|
'unrar: Archives support'
|
|
'unzip: Archives support'
|
|
'upower: Display battery level'
|
|
)
|
|
install='kodi.install'
|
|
provides=('xbmc' 'kodi')
|
|
conflicts=('xbmc' 'kodi' 'arm-mem-git' 'shairplay-git')
|
|
replaces=('xbmc-rbp-git')
|
|
_components=('kodi' 'kodi-bin')
|
|
|
|
cd kodi-build
|
|
# install eventclients
|
|
for _cmp in ${_components[@]}; do
|
|
DESTDIR="$pkgdir" /usr/bin/cmake \
|
|
-DCMAKE_INSTALL_COMPONENT="$_cmp" \
|
|
-P cmake_install.cmake
|
|
done
|
|
|
|
# python2 is being used
|
|
cd "$pkgdir"
|
|
grep -lR '#!.*python' * | while read file; do sed -s 's/\(#!.*python\)/\12/g' -i "$file"; done
|
|
|
|
install -Dm0644 "$srcdir/kodi.service" "$pkgdir/usr/lib/systemd/system/kodi.service"
|
|
install -Dm0644 "$srcdir/polkit.rules" "$pkgdir/usr/share/polkit-1/rules.d/10-kodi.rules"
|
|
chmod 0750 "$pkgdir/usr/share/polkit-1/rules.d/"
|
|
|
|
# fix permissions necessary for accelerated video playback
|
|
install -Dm0644 "$srcdir/99-kodi.rules" "$pkgdir/etc/udev/rules.d/99-kodi.rules"
|
|
}
|
|
|
|
package_kodi-eventclients-rbp-git() {
|
|
pkgdesc="Kodi Event Clients (master branch)"
|
|
provides=('kodi-eventclients')
|
|
conflicts=('kodi-eventclients')
|
|
optdepends=('python2: most eventclients are implemented in python2')
|
|
_components=('kodi-eventclients-common'
|
|
'kodi-eventclients-ps3'
|
|
'kodi-eventclients-xbmc-send')
|
|
|
|
cd kodi-build
|
|
# install eventclients
|
|
for _cmp in ${_components[@]}; do
|
|
DESTDIR="$pkgdir" /usr/bin/cmake \
|
|
-DCMAKE_INSTALL_COMPONENT="$_cmp" \
|
|
-P cmake_install.cmake
|
|
done
|
|
|
|
# python2 is being used
|
|
cd "$pkgdir"
|
|
grep -lR '#!.*python' * | while read file; do sed -s 's/\(#!.*python\)/\12/g' -i "$file"; done
|
|
}
|
|
|
|
package_kodi-tools-texturepacker-rbp-git() {
|
|
pkgdesc="Kodi Texturepacker tool (master branch)"
|
|
depends=('libpng' 'giflib' 'libjpeg-turbo' 'lzo')
|
|
_components=('kodi-tools-texturepacker')
|
|
|
|
cd kodi-build
|
|
# install eventclients
|
|
for _cmp in ${_components[@]}; do
|
|
DESTDIR="$pkgdir" /usr/bin/cmake \
|
|
-DCMAKE_INSTALL_COMPONENT="$_cmp" \
|
|
-P cmake_install.cmake
|
|
done
|
|
}
|
|
|
|
package_kodi-dev-rbp-git() {
|
|
pkgdesc="Kodi dev files (master branch)"
|
|
depends=('kodi')
|
|
provides=('kodi-dev')
|
|
|
|
_components=('kodi-addon-dev'
|
|
'kodi-audio-dev'
|
|
'kodi-eventclients-dev'
|
|
'kodi-game-dev'
|
|
'kodi-inputstream-dev'
|
|
'kodi-peripheral-dev'
|
|
'kodi-pvr-dev'
|
|
'kodi-screensaver-dev'
|
|
'kodi-visualization-dev')
|
|
|
|
cd kodi-build
|
|
# install eventclients
|
|
for _cmp in ${_components[@]}; do
|
|
DESTDIR="$pkgdir" /usr/bin/cmake \
|
|
-DCMAKE_INSTALL_COMPONENT="$_cmp" \
|
|
-P cmake_install.cmake
|
|
done
|
|
|
|
# python2 is being used
|
|
cd "$pkgdir"
|
|
grep -lR '#!.*python' * | while read file; do sed -s 's/\(#!.*python\)/\12/g' -i "$file"; done
|
|
}
|