2017-01-15 17:29:58 +00:00
|
|
|
# Contributor graysky <graysky AT archlinux DOT org>
|
|
|
|
# Contributor BlackIkeEagle < ike DOT devolder AT gmail DOT com >
|
2015-03-31 05:40:41 +00:00
|
|
|
# Contributor Oleg Rakhmanov <oleg [at] archlinuxarm [dot] com>
|
2012-09-20 14:27:56 +00:00
|
|
|
# Contributor tomasgroth at yahoo.dk
|
|
|
|
# Contributor WarheadsSE <max@warheads.net>
|
2015-12-06 14:56:10 +00:00
|
|
|
# Contributor Adrian Fedoreanu <adrian [dot] fedoreanu [at] gmail [dot] com>
|
2013-06-12 04:52:38 +00:00
|
|
|
|
2015-02-05 00:16:53 +00:00
|
|
|
buildarch=20
|
2012-09-20 14:27:56 +00:00
|
|
|
|
2015-03-31 05:40:41 +00:00
|
|
|
_prefix=/usr
|
|
|
|
|
|
|
|
pkgbase=kodi-rbp-git
|
2017-01-15 17:29:58 +00:00
|
|
|
_suffix=rbp-git
|
|
|
|
pkgname=("kodi-$_suffix" "kodi-eventclients-$_suffix" "kodi-tools-texturepacker-$_suffix" "kodi-dev-$_suffix")
|
2018-06-21 22:10:56 +00:00
|
|
|
pkgver=18.0a2.20180621
|
2018-07-14 12:08:52 +00:00
|
|
|
pkgrel=4
|
2018-03-10 20:29:17 +00:00
|
|
|
_codename=Leia
|
2018-06-21 22:10:56 +00:00
|
|
|
_tag="18.0a2-$_codename"
|
2018-03-10 20:29:17 +00:00
|
|
|
_rtype=Alpha
|
2018-06-30 19:47:42 +00:00
|
|
|
_ffmpeg_version="4.0.1-$_codename-$_rtype"3-1
|
|
|
|
_libdvdcss_version="1.4.1-$_codename-$_rtype"-3
|
|
|
|
_libdvdnav_version="6.0.0-$_codename-$_rtype"-3
|
|
|
|
_libdvdread_version="6.0.0-$_codename-$_rtype"-3
|
2015-03-31 05:40:41 +00:00
|
|
|
arch=('armv6h' 'armv7h')
|
2014-11-19 05:48:23 +00:00
|
|
|
url="http://kodi.tv"
|
2015-03-31 05:40:41 +00:00
|
|
|
license=('GPL2')
|
2018-03-10 20:29:17 +00:00
|
|
|
makedepends=(
|
|
|
|
'afpfs-ng' 'bluez-libs' 'boost' 'cmake' 'curl' 'doxygen'
|
|
|
|
'gperf' 'hicolor-icon-theme' 'jasper' 'java-environment' 'libaacs' 'libass'
|
2018-06-21 22:10:56 +00:00
|
|
|
'libbluray' 'libcdio' 'libmariadbclient' 'libmicrohttpd'
|
2018-07-14 12:08:52 +00:00
|
|
|
'libmodplug' 'libmpeg2' 'libnfs' 'libplist' 'libpulse' 'libssh' 'libcec-rpi'
|
2018-06-21 22:10:56 +00:00
|
|
|
'libxrandr' 'libxslt' 'lirc' 'lzo' 'nasm' 'nss-mdns' 'python2-pillow'
|
2018-03-10 20:29:17 +00:00
|
|
|
'python2-pybluez' 'python2-simplejson' 'raspberrypi-firmware' 'rtmpdump'
|
|
|
|
'shairplay' 'smbclient' 'speex' 'swig' 'taglib' 'tinyxml' 'unzip' 'upower'
|
2018-06-21 22:10:56 +00:00
|
|
|
'yajl' 'zip' 'giflib' 'rapidjson' 'polkit' 'libinput' 'libxkbcommon'
|
2018-03-10 20:29:17 +00:00
|
|
|
)
|
2016-11-05 07:22:38 +00:00
|
|
|
source=("xbmc-$_tag.tar.gz::https://github.com/xbmc/xbmc/archive/$_tag.tar.gz"
|
2018-03-10 20:29:17 +00:00
|
|
|
'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"
|
2018-06-30 19:47:42 +00:00
|
|
|
"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"
|
2018-03-10 20:29:17 +00:00
|
|
|
)
|
|
|
|
noextract=(
|
|
|
|
"libdvdcss-$_libdvdcss_version.tar.gz"
|
|
|
|
"libdvdnav-$_libdvdnav_version.tar.gz"
|
|
|
|
"libdvdread-$_libdvdread_version.tar.gz"
|
|
|
|
"ffmpeg-$_ffmpeg_version.tar.gz"
|
|
|
|
)
|
2018-06-21 22:10:56 +00:00
|
|
|
sha256sums=('937d755c638324bf388fc9e971c5d8f90fcc0ab9362f0b15bbad5e47f0bc67d6'
|
2018-07-14 12:08:52 +00:00
|
|
|
'aa96b6abb18329dcca7b5f775df69eee10beeb9ca727e867e7a96886953c66d0'
|
2016-11-22 08:08:59 +00:00
|
|
|
'b31570f95654434b01fd8531612fbb6be77cbc1c519dd60f92feae26eb160f3d'
|
2017-08-13 22:02:29 +00:00
|
|
|
'9ea592205023ba861603d74b63cdb73126c56372a366dc4cb7beb379073cbb96'
|
|
|
|
'0b9d951911a8576c26dec8a31f394282677e48afff49b9579448121d27b8509e'
|
2018-06-30 19:47:42 +00:00
|
|
|
'20c38f8153384335a777806facdd4444e6b1a73bec9a16f557d6f98ca7a30f54'
|
2018-06-21 22:10:56 +00:00
|
|
|
'6af3d4f60e5af2c11ebe402b530c07c8878df1a6cf19372e16c92848d69419a5'
|
|
|
|
'071e414e61b795f2ff9015b21a85fc009dde967f27780d23092643916538a57a'
|
2018-06-30 19:47:42 +00:00
|
|
|
'a30b6aa0aad0f2c505bc77948af2d5531a80b6e68112addb4c123fca24d5d3bf')
|
2016-09-17 23:47:54 +00:00
|
|
|
|
2013-04-08 18:51:48 +00:00
|
|
|
prepare() {
|
2016-11-05 07:22:38 +00:00
|
|
|
cd "$srcdir/xbmc-$_tag"
|
2015-03-31 05:40:41 +00:00
|
|
|
|
2018-03-10 20:29:17 +00:00
|
|
|
patch -Np1 -i "$srcdir/hifiberry_digi.patch"
|
2016-11-24 05:42:20 +00:00
|
|
|
|
2017-01-15 17:29:58 +00:00
|
|
|
[[ -d kodi-build ]] && rm -rf kodi-build
|
|
|
|
mkdir $srcdir/kodi-build
|
2013-04-08 18:51:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
2017-08-13 22:02:29 +00:00
|
|
|
cd kodi-build
|
2017-01-15 17:29:58 +00:00
|
|
|
|
2018-03-10 20:29:17 +00:00
|
|
|
# _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
|
2017-08-26 17:00:21 +00:00
|
|
|
|
2017-01-15 17:29:58 +00:00
|
|
|
cmake -DCMAKE_INSTALL_PREFIX=/usr \
|
|
|
|
-DCMAKE_INSTALL_LIBDIR=/usr/lib \
|
|
|
|
-DCMAKE_PREFIX_PATH=/opt/vc \
|
2018-03-10 20:29:17 +00:00
|
|
|
-DCORE_PLATFORM_NAME=rbpi \
|
2017-01-15 17:29:58 +00:00
|
|
|
-DWITH_CPU="$_CPU" \
|
2018-03-10 20:29:17 +00:00
|
|
|
-DENABLE_INTERNAL_FMT=ON \
|
2017-01-15 17:29:58 +00:00
|
|
|
-DENABLE_EVENTCLIENTS=ON \
|
|
|
|
-DENABLE_OPENGL=OFF \
|
|
|
|
-DENABLE_X11=OFF \
|
|
|
|
-DENABLE_VAAPI=OFF \
|
|
|
|
-DENABLE_VDPAU=OFF \
|
2017-08-26 17:00:21 +00:00
|
|
|
-DENABLE_INTERNAL_CROSSGUID=ON \
|
2018-03-10 20:29:17 +00:00
|
|
|
-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" \
|
|
|
|
../"xbmc-$_tag"
|
2017-08-13 22:02:29 +00:00
|
|
|
make
|
2017-01-15 17:29:58 +00:00
|
|
|
make preinstall
|
2012-09-20 14:27:56 +00:00
|
|
|
}
|
|
|
|
|
2015-03-31 05:40:41 +00:00
|
|
|
package_kodi-rbp-git() {
|
|
|
|
pkgdesc="A software media player and entertainment hub for digital media (Raspberry Pi)"
|
2018-03-10 20:29:17 +00:00
|
|
|
depends=(
|
2018-07-14 12:08:52 +00:00
|
|
|
'bluez-libs' 'desktop-file-utils' 'freetype2' 'fribidi' 'libcec-rpi'
|
2018-03-10 20:29:17 +00:00
|
|
|
'hicolor-icon-theme' 'libass' 'libcdio' 'libjpeg-turbo' 'libmariadbclient'
|
2018-06-21 22:10:56 +00:00
|
|
|
'libmicrohttpd' 'libpulse' 'libssh' 'libxrandr' 'lirc' 'raspberrypi-firmware'
|
2018-03-10 20:29:17 +00:00
|
|
|
'libxslt' 'lzo' 'python2-pillow' 'python2-simplejson' 'smbclient'
|
2018-06-21 22:10:56 +00:00
|
|
|
'speex' 'taglib' 'tinyxml' 'xorg-xdpyinfo' 'yajl' 'libinput' 'libxkbcommon'
|
2018-03-10 20:29:17 +00:00
|
|
|
)
|
2015-03-31 05:40:41 +00:00
|
|
|
optdepends=(
|
2018-03-10 20:29:17 +00:00
|
|
|
'afpfs-ng: Apple shares support'
|
|
|
|
'bluez: Blutooth support'
|
|
|
|
'python2-pybluez: Bluetooth support'
|
2017-01-15 17:29:58 +00:00
|
|
|
'libnfs: NFS shares support'
|
2018-03-10 20:29:17 +00:00
|
|
|
'libplist: Limited AirPlay support'
|
2017-01-15 17:29:58 +00:00
|
|
|
'lsb-release: log distro information in crashlog'
|
2018-03-10 20:29:17 +00:00
|
|
|
'shairplay: Limited AirPlay support'
|
|
|
|
'unrar: Archives support'
|
|
|
|
'unzip: Archives support'
|
|
|
|
'upower: Display battery level'
|
|
|
|
)
|
2016-11-05 07:22:38 +00:00
|
|
|
install='kodi.install'
|
2015-03-31 05:40:41 +00:00
|
|
|
provides=('xbmc' 'kodi')
|
2016-05-10 18:29:54 +00:00
|
|
|
conflicts=('xbmc' 'kodi' 'arm-mem-git' 'shairplay-git')
|
2015-03-31 05:40:41 +00:00
|
|
|
replaces=('xbmc-rbp-git')
|
2017-03-06 22:47:06 +00:00
|
|
|
_components=('kodi' 'kodi-bin')
|
2017-01-15 17:29:58 +00:00
|
|
|
|
|
|
|
cd kodi-build
|
|
|
|
# install eventclients
|
|
|
|
for _cmp in ${_components[@]}; do
|
|
|
|
DESTDIR="$pkgdir" /usr/bin/cmake \
|
|
|
|
-DCMAKE_INSTALL_COMPONENT="$_cmp" \
|
|
|
|
-P cmake_install.cmake
|
|
|
|
done
|
2012-09-20 14:27:56 +00:00
|
|
|
|
|
|
|
# Licenses
|
2017-08-13 22:02:29 +00:00
|
|
|
install -dm755 "$pkgdir/usr/share/licenses/$pkgname"
|
2012-09-20 14:27:56 +00:00
|
|
|
for licensef in LICENSE.GPL copying.txt; do
|
2017-08-13 22:02:29 +00:00
|
|
|
mv "$pkgdir/usr/share/doc/kodi/$licensef" \
|
|
|
|
"$pkgdir/usr/share/licenses/$pkgname"
|
2012-09-20 14:27:56 +00:00
|
|
|
done
|
|
|
|
|
2017-01-15 17:29:58 +00:00
|
|
|
# python2 is being used
|
|
|
|
cd "$pkgdir"
|
|
|
|
grep -lR '#!.*python' * | while read file; do sed -s 's/\(#!.*python\)/\12/g' -i "$file"; done
|
|
|
|
|
2016-11-05 07:22:38 +00:00
|
|
|
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"
|
2017-08-13 22:02:29 +00:00
|
|
|
chmod 0750 "$pkgdir/usr/share/polkit-1/rules.d/"
|
2016-11-01 07:29:16 +00:00
|
|
|
|
|
|
|
# fix permissions necessary for accelerated video playback
|
2016-11-05 07:22:38 +00:00
|
|
|
install -Dm0644 "$srcdir/99-kodi.rules" "$pkgdir/etc/udev/rules.d/99-kodi.rules"
|
2012-09-20 14:27:56 +00:00
|
|
|
}
|
2015-03-31 05:40:41 +00:00
|
|
|
|
2017-01-15 17:29:58 +00:00
|
|
|
package_kodi-eventclients-rbp-git() {
|
|
|
|
pkgdesc="Kodi Event Clients (master branch)"
|
2017-03-06 22:47:06 +00:00
|
|
|
provides=('kodi-eventclients')
|
2015-03-31 05:40:41 +00:00
|
|
|
conflicts=('kodi-eventclients')
|
2018-03-10 20:29:17 +00:00
|
|
|
optdepends=('python2: most eventclients are implemented in python2')
|
2017-03-06 22:47:06 +00:00
|
|
|
_components=('kodi-eventclients-common'
|
2017-01-15 17:29:58 +00:00
|
|
|
'kodi-eventclients-ps3'
|
2017-08-13 22:02:29 +00:00
|
|
|
'kodi-eventclients-xbmc-send')
|
2017-01-15 17:29:58 +00:00
|
|
|
|
|
|
|
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')
|
2017-03-06 22:47:06 +00:00
|
|
|
_components=('kodi-tools-texturepacker')
|
2017-01-15 17:29:58 +00:00
|
|
|
|
|
|
|
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')
|
2017-05-07 18:50:36 +00:00
|
|
|
provides=('kodi-dev')
|
2017-01-15 17:29:58 +00:00
|
|
|
|
2017-03-06 22:47:06 +00:00
|
|
|
_components=('kodi-addon-dev'
|
2017-01-15 17:29:58 +00:00
|
|
|
'kodi-audio-dev'
|
|
|
|
'kodi-eventclients-dev'
|
|
|
|
'kodi-game-dev'
|
|
|
|
'kodi-inputstream-dev'
|
|
|
|
'kodi-peripheral-dev'
|
|
|
|
'kodi-pvr-dev'
|
|
|
|
'kodi-screensaver-dev'
|
2017-03-06 22:47:06 +00:00
|
|
|
'kodi-visualization-dev')
|
2017-01-15 17:29:58 +00:00
|
|
|
|
|
|
|
cd kodi-build
|
|
|
|
# install eventclients
|
|
|
|
for _cmp in ${_components[@]}; do
|
|
|
|
DESTDIR="$pkgdir" /usr/bin/cmake \
|
|
|
|
-DCMAKE_INSTALL_COMPONENT="$_cmp" \
|
|
|
|
-P cmake_install.cmake
|
|
|
|
done
|
2015-03-31 05:40:41 +00:00
|
|
|
|
2017-01-15 17:29:58 +00:00
|
|
|
# python2 is being used
|
|
|
|
cd "$pkgdir"
|
|
|
|
grep -lR '#!.*python' * | while read file; do sed -s 's/\(#!.*python\)/\12/g' -i "$file"; done
|
2015-03-31 05:40:41 +00:00
|
|
|
}
|