PKGBUILDs/alarm/kodi-rbp/PKGBUILD

233 lines
8.5 KiB
Bash
Raw Normal View History

2016-05-07 09:28:51 +00:00
# Maintainer: Oleg Rakhmanov <oleg@archlinuxarm.org>
2017-02-04 02:21:39 +00:00
# Contributor graysky <graysky AT archlinux DOT org>
# Contributor BlackIkeEagle < ike DOT devolder AT gmail DOT com >
# Contributor tomasgroth at yahoo.dk
# Contributor WarheadsSE <max@warheads.net>
2017-02-04 02:21:39 +00:00
# Contributor Adrian Fedoreanu <adrian [dot] fedoreanu [at] gmail [dot] com>
2015-02-05 00:13:27 +00:00
buildarch=20
2015-03-31 03:54:30 +00:00
_prefix=/usr
pkgbase=kodi-rbp
2017-02-05 02:59:18 +00:00
pkgname=('kodi-rbp' 'kodi-rbp-eventclients' 'kodi-rbp-tools-texturepacker' 'kodi-rbp-dev')
2017-02-04 02:21:39 +00:00
_codename=Krypton
2017-11-17 00:26:44 +00:00
pkgver=17.6
2019-01-21 00:01:42 +00:00
pkgrel=7
2015-02-05 00:13:27 +00:00
arch=('armv6h' 'armv7h')
url="http://kodi.tv"
2015-03-31 03:54:30 +00:00
license=('GPL2')
2017-10-26 03:22:24 +00:00
makedepends=(
2018-03-09 01:37:47 +00:00
'afpfs-ng' 'bluez-libs' 'boost' 'cmake' 'curl' 'doxygen'
2017-10-28 20:12:13 +00:00
'gperf' 'hicolor-icon-theme' 'jasper' 'java-environment' 'libaacs' 'libass'
2019-01-21 00:01:42 +00:00
'libbluray' 'libcdio' 'libcec-rpi' 'mariadb-libs' 'libmicrohttpd'
2017-10-28 20:12:13 +00:00
'libmodplug' 'libmpeg2' 'libnfs' 'libplist' 'libpulse' 'libssh'
2018-03-09 01:37:47 +00:00
'libxrandr' 'libxslt' 'lzo' 'nasm' 'nss-mdns' 'python2-pillow'
2017-10-28 20:12:13 +00:00
'python2-pybluez' 'python2-simplejson' 'raspberrypi-firmware' 'rtmpdump'
'shairplay' 'smbclient' 'speex' 'swig' 'taglib' 'tinyxml' 'unzip' 'upower'
2018-02-13 00:44:01 +00:00
'yajl' 'zip' 'giflib'
2017-10-26 03:22:24 +00:00
)
_libdvdcss_commit="2f12236bc1c92f73c21e973363f79eb300de603f"
_libdvdnav_commit="981488f7f27554b103cca10c1fbeba027396c94a"
_libdvdread_commit="17d99db97e7b8f23077b342369d3c22a6250affd"
2017-11-17 00:26:44 +00:00
#_ffmpeg_version="3.1.11-$_codename-$pkgver"
_ffmpeg_version="3.1.11-$_codename-17.5"
source=(
2017-10-28 20:12:13 +00:00
"$pkgbase-$pkgver-$_codename.tar.gz::https://github.com/xbmc/xbmc/archive/$pkgver-$_codename.tar.gz"
"$pkgbase-libdvdcss-$_libdvdcss_commit.tar.gz::https://github.com/xbmc/libdvdcss/archive/$_libdvdcss_commit.tar.gz"
"$pkgbase-libdvdnav-$_libdvdnav_commit.tar.gz::https://github.com/xbmc/libdvdnav/archive/$_libdvdnav_commit.tar.gz"
"$pkgbase-libdvdread-$_libdvdread_commit.tar.gz::https://github.com/xbmc/libdvdread/archive/$_libdvdread_commit.tar.gz"
"$pkgbase-ffmpeg-$_ffmpeg_version.tar.gz::https://github.com/xbmc/FFmpeg/archive/$_ffmpeg_version.tar.gz"
'kodi.service'
'99-kodi.rules'
'https://github.com/popcornmix/xbmc/commit/0c320b6cdd4fb409be45008e6b9042463d54b742.patch'
'https://github.com/popcornmix/xbmc/commit/4d983105d7fd65b1d92f2ae2602e6e1cdcaddbe0.patch'
'polkit.rules'
'hifiberry_digi.patch'
'fix-python-lib-path.patch')
2017-10-26 03:22:24 +00:00
noextract=(
2017-10-28 20:12:13 +00:00
"$pkgbase-libdvdcss-$_libdvdcss_commit.tar.gz"
"$pkgbase-libdvdnav-$_libdvdnav_commit.tar.gz"
"$pkgbase-libdvdread-$_libdvdread_commit.tar.gz"
"$pkgbase-ffmpeg-$_ffmpeg_version.tar.gz"
2017-10-26 03:22:24 +00:00
)
2017-11-17 00:26:44 +00:00
sha256sums=('c8312fe92e5bab1cdac1da93d60baed88fa1574146c50c44e3c86d01671c2b1d'
2017-10-26 03:22:24 +00:00
'b6eb2d929ff56cb051152c32010afc5e7cf5fe8c5ae32dca412a2b46b6b57e34'
'312b3d15bc448d24e92f4b2e7248409525eccc4e75776026d805478e51c5ef3d'
'e7179b2054163652596a56301c9f025515cb08c6d6310b42b897c3ad11c0199b'
'7df8bce40765b39de5766ca9d08b5b9ac1f498c65c805c989461b907cee6b7c0'
2017-02-04 02:21:39 +00:00
'5235068d5800d69f0287087815990e7fe8d6572733d60c8800546d35f608e87f'
'b31570f95654434b01fd8531612fbb6be77cbc1c519dd60f92feae26eb160f3d'
2019-01-21 00:01:42 +00:00
'47572eb56439fe9e5b396089621aba8f8e657337a6cbe473191b692b495e33d9'
2017-05-25 01:57:09 +00:00
'82057eccc4cadbd568dda76103dcc667754194e926ede78e43d70b3a17bbb5e5'
'9ea592205023ba861603d74b63cdb73126c56372a366dc4cb7beb379073cbb96'
2017-05-28 18:42:21 +00:00
'0b9d951911a8576c26dec8a31f394282677e48afff49b9579448121d27b8509e'
'1c07c9fdd8e2958262cf917e4266c4933fcd06529c111e3cb0cbaaa05c934033')
2017-09-30 00:20:21 +00:00
2013-04-27 09:21:50 +00:00
prepare() {
cd "$srcdir/xbmc-$pkgver-$_codename"
2017-08-25 01:09:46 +00:00
# python2 path fix
patch -p1 -i "$srcdir/fix-python-lib-path.patch"
2017-02-04 02:21:39 +00:00
# ffmpeg: Automatic switch to software decode for GMC with more than one warp point
patch -Np1 -i "$srcdir/0c320b6cdd4fb409be45008e6b9042463d54b742.patch"
# fix for files with GMC
patch -Np1 -i "$srcdir/4d983105d7fd65b1d92f2ae2602e6e1cdcaddbe0.patch"
# fix for lack of passthrough audio with hifiberry-digi+ card
patch -Np1 -i "$srcdir/hifiberry_digi.patch"
2016-05-07 09:28:51 +00:00
2017-02-04 02:21:39 +00:00
[[ -d kodi-build ]] && rm -rf kodi-build
mkdir $srcdir/kodi-build
2013-04-27 09:21:50 +00:00
}
build() {
2017-05-28 18:42:21 +00:00
cd kodi-build
2017-02-04 02:21:39 +00:00
# -DCPU=arm1176jzf-s for rpi1
# -DCPU=cortex-a7 for rpi2
# -DCPU=cortex-a53 for rpi3
2017-08-25 01:09:46 +00:00
2017-06-25 14:48:06 +00:00
[[ $CARCH == "armv6h" ]] && _CPU=arm1176jzf-s && LDFLAGS+=" -latomic"
2017-02-04 02:21:39 +00:00
[[ $CARCH == "armv7h" ]] && _CPU=cortex-a7
cmake -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=/usr/lib \
-DCMAKE_PREFIX_PATH=/opt/vc \
-DCORE_SYSTEM_NAME=rbpi \
-DWITH_CPU="$_CPU" \
-DENABLE_EVENTCLIENTS=ON \
-DENABLE_OPENGL=OFF \
-DENABLE_X11=OFF \
-DENABLE_VAAPI=OFF \
-DENABLE_VDPAU=OFF \
2017-08-25 01:09:46 +00:00
-DENABLE_INTERNAL_CROSSGUID=ON \
2017-02-04 02:21:39 +00:00
-DLIRC_DEVICE=/run/lirc/lircd \
2017-10-26 03:22:24 +00:00
-Dlibdvdcss_URL="$srcdir/$pkgbase-libdvdcss-$_libdvdcss_commit.tar.gz" \
-Dlibdvdnav_URL="$srcdir/$pkgbase-libdvdnav-$_libdvdnav_commit.tar.gz" \
-Dlibdvdread_URL="$srcdir/$pkgbase-libdvdread-$_libdvdread_commit.tar.gz" \
-DFFMPEG_URL="$srcdir/$pkgbase-ffmpeg-$_ffmpeg_version.tar.gz" \
2017-02-04 02:21:39 +00:00
../"xbmc-$pkgver-$_codename"/project/cmake
make
2017-02-04 02:21:39 +00:00
make preinstall
}
2015-03-31 03:54:30 +00:00
package_kodi-rbp() {
pkgdesc="A software media player and entertainment hub for digital media (Raspberry Pi)"
2017-10-26 03:22:24 +00:00
depends=(
2018-03-09 01:37:47 +00:00
'bluez-libs' 'desktop-file-utils' 'freetype2' 'fribidi'
2019-01-21 00:01:42 +00:00
'hicolor-icon-theme' 'libass' 'libcdio' 'libjpeg-turbo' 'mariadb-libs'
2017-10-28 20:12:13 +00:00
'libmicrohttpd' 'libpulse' 'libssh' 'libxrandr' 'raspberrypi-firmware'
2018-03-09 01:37:47 +00:00
'libxslt' 'lzo' 'python2-pillow' 'python2-simplejson' 'smbclient'
2018-04-08 20:49:00 +00:00
'speex' 'taglib' 'tinyxml' 'xorg-xdpyinfo' 'yajl' 'polkit'
2017-10-26 03:22:24 +00:00
)
2015-03-31 03:54:30 +00:00
optdepends=(
2017-10-26 03:22:24 +00:00
'afpfs-ng: Apple shares support'
'bluez: Blutooth support'
'python2-pybluez: Bluetooth support'
2017-02-04 02:21:39 +00:00
'libnfs: NFS shares support'
2017-10-28 20:12:13 +00:00
'libplist: Limited AirPlay support'
2017-10-26 03:22:24 +00:00
'libcec-rpi: Pulse-Eight USB-CEC adapter support'
'lirc: Remote controller support'
2017-02-04 02:21:39 +00:00
'lsb-release: log distro information in crashlog'
2017-10-28 20:12:13 +00:00
'shairplay: Limited AirPlay support'
2017-10-26 03:22:24 +00:00
'unrar: Archives support'
'unzip: Archives support'
'upower: Display battery level'
)
2017-02-04 02:21:39 +00:00
install='kodi.install'
2015-03-31 03:54:30 +00:00
provides=('xbmc' 'kodi')
2016-05-05 07:05:05 +00:00
conflicts=('xbmc' 'kodi' 'arm-mem-git' 'shairplay-git')
2017-02-04 02:21:39 +00:00
replaces=('xbmc-rbp-git')
_components=('kodi' 'kodi-bin')
2017-02-04 02:21:39 +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
# Licenses
2017-02-05 02:59:18 +00:00
install -dm755 "$pkgdir/usr/share/licenses/$pkgname"
for licensef in LICENSE.GPL copying.txt; do
2017-02-05 02:59:18 +00:00
mv "$pkgdir/usr/share/doc/kodi/$licensef" \
"$pkgdir/usr/share/licenses/$pkgname"
done
2017-02-04 02:21:39 +00:00
# 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"
2017-05-25 01:57:09 +00:00
chmod 0750 "$pkgdir/usr/share/polkit-1/rules.d/"
2017-02-04 02:21:39 +00:00
# fix permissions necessary for accelerated video playback
install -Dm0644 "$srcdir/99-kodi.rules" "$pkgdir/etc/udev/rules.d/99-kodi.rules"
}
2015-03-31 03:54:30 +00:00
package_kodi-rbp-eventclients() {
2017-02-05 02:59:18 +00:00
pkgdesc="Kodi event clients (Raspberry Pi)"
2015-03-31 03:54:30 +00:00
provides=('kodi-eventclients')
conflicts=('kodi-eventclients')
2018-02-13 00:44:01 +00:00
optdepends=('python2: most eventclients are implemented in python2')
2017-02-05 02:59:18 +00:00
_components=('kodi-eventclients-common'
2017-02-04 02:21:39 +00:00
'kodi-eventclients-ps3'
2017-02-05 02:59:18 +00:00
'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-rbp-tools-texturepacker() {
pkgdesc="Kodi texturepacker tool (Raspberry Pi)"
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-rbp-dev() {
pkgdesc="Kodi dev files (Raspberry Pi)"
depends=('kodi')
provides=('kodi-dev')
2017-02-05 02:59:18 +00:00
_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')
2017-02-04 02:21:39 +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 03:54:30 +00:00
2017-02-04 02:21:39 +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 03:54:30 +00:00
}