PKGBUILDs/alarm/kodi-rbp/PKGBUILD

240 lines
8.8 KiB
Bash
Raw Normal View History

2017-02-04 02:21:39 +00:00
# Contributor graysky <graysky AT archlinux DOT org>
# Contributor BlackIkeEagle < ike DOT devolder AT gmail DOT com >
2019-01-29 00:28:50 +00:00
# Contributor Oleg Rakhmanov <oleg [at] archlinuxarm [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')
2019-01-29 00:28:50 +00:00
pkgver=18.0
pkgrel=1
_codename=Leia
_tag="18.0-$_codename"
_ffmpeg_version="4.0.3-$_codename-RC5"
_libdvdcss_version="1.4.2-$_codename-Beta-5"
_libdvdnav_version="6.0.0-$_codename-Alpha-3"
_libdvdread_version="6.0.0-$_codename-Alpha-3"
_fmt_version="5.1.0"
_crossguid_version="8f399e8bd4"
_fstrcmp_version="0.7.D001"
_flatbuffers_version="1.9.0"
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-29 00:28:50 +00:00
'libbluray-kodi-rbp' 'libcdio' 'mariadb-libs' 'libmicrohttpd' 'groff'
'libmodplug' 'libmpeg2' 'libnfs' 'libplist' 'libpulse' 'libssh' 'libcec-rpi'
'libxrandr' 'libxslt' 'lirc' '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'
2019-01-29 00:28:50 +00:00
'yajl' 'zip' 'giflib' 'rapidjson' 'polkit' 'libinput' 'libxkbcommon' 'ghostscript'
2017-10-26 03:22:24 +00:00
)
2019-01-29 00:28:50 +00:00
source=("https://github.com/popcornmix/xbmc/archive/newclock5_$_tag.tar.gz"
2017-10-28 20:12:13 +00:00
'kodi.service'
2019-01-29 00:28:50 +00:00
'kodi-framebuffer'
2017-10-28 20:12:13 +00:00
'99-kodi.rules'
'polkit.rules'
2019-01-29 00:28:50 +00:00
'00-fix.building.with.mariadb.patch::https://github.com/wsnipex/xbmc/commit/cd20c8eb8a0394db1f028b118c4ca9b91b7e746a.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"
)
2017-10-26 03:22:24 +00:00
noextract=(
2019-01-29 00:28:50 +00:00
"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"
2017-10-26 03:22:24 +00:00
)
2019-01-29 00:28:50 +00:00
sha256sums=('9c056808eecc7dd2e72fffd3f3412d83c60fe3742bc0d96f16f9abdfc55c8012'
'6eded8b5f52808d5ffa77de546fbf799a255dde2473540e8a8bd46daa6f753d9'
'fe7a1ab2a6e2bf00f756c76545a338d2763003052764d722d492b06b1bc05f5e'
2017-02-04 02:21:39 +00:00
'b31570f95654434b01fd8531612fbb6be77cbc1c519dd60f92feae26eb160f3d'
'9ea592205023ba861603d74b63cdb73126c56372a366dc4cb7beb379073cbb96'
2019-01-29 00:28:50 +00:00
'849daf1d5b081ef6d0e428bbc7d448799fc43a8ac9e79cd7513de0eb5a91b0bb'
'9a971662e44353c120f2ccf87655571998956e699a2dd800ec708b8b928a53c8'
'38816f8373e243bc5950449b4f3b18938c4e1c59348e3411e23f31db4072e40d'
'071e414e61b795f2ff9015b21a85fc009dde967f27780d23092643916538a57a'
'a30b6aa0aad0f2c505bc77948af2d5531a80b6e68112addb4c123fca24d5d3bf'
'73d4cab4fa8a3482643d8703de4d9522d7a56981c938eca42d929106ff474b44'
'3d77d09a5df0de510aeeb940df4cb534787ddff3bb1828779753f5dfa1229d10'
'e4018e850f80700acee8da296e56e15b1eef711ab15157e542e7d7e1237c3476'
'5ca5491e4260cacae30f1a5786d109230db3f3a6e5a0eb45d0d0608293d247e3')
2017-09-30 00:20:21 +00:00
2013-04-27 09:21:50 +00:00
prepare() {
2019-01-29 00:28:50 +00:00
cd "xbmc-newclock5_$_tag"
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
2019-01-29 00:28:50 +00:00
patch -Np1 -i ../00-fix.building.with.mariadb.patch
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
2019-01-29 00:28:50 +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-02-04 02:21:39 +00:00
cmake -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=/usr/lib \
-DCMAKE_PREFIX_PATH=/opt/vc \
2019-01-29 00:28:50 +00:00
-DCORE_PLATFORM_NAME=rbpi \
2017-02-04 02:21:39 +00:00
-DWITH_CPU="$_CPU" \
-DENABLE_EVENTCLIENTS=ON \
-DENABLE_OPENGL=OFF \
2019-01-29 00:28:50 +00:00
-DENABLE_INTERNAL_FFMPEG=ON \
-DENABLE_INTERNAL_FMT=ON \
2017-08-25 01:09:46 +00:00
-DENABLE_INTERNAL_CROSSGUID=ON \
2019-01-29 00:28:50 +00:00
-DENABLE_INTERNAL_FSTRCMP=ON \
-DENABLE_INTERNAL_FLATBUFFERS=ON \
-DENABLE_MARIADBCLIENT=ON \
-DENABLE_MYSQLCLIENT=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" \
-DCROSSGUID_URL="$srcdir/crossguid-$_crossguid_version.tar.gz" \
-DFSTRCMP_URL="$srcdir/fstrcmp-$_fstrcmp_version.tar.gz" \
-DFLATBUFFERS_URL="$srcdir/flatbuffers-$_flatbuffers_version.tar.gz" \
../"xbmc-newclock5_$_tag"
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=(
2019-01-29 00:28:50 +00:00
'bluez-libs' 'desktop-file-utils' 'freetype2' 'fribidi' 'libcec-rpi'
2019-01-21 00:01:42 +00:00
'hicolor-icon-theme' 'libass' 'libcdio' 'libjpeg-turbo' 'mariadb-libs'
2019-01-29 00:28:50 +00:00
'libmicrohttpd' 'libpulse' 'libssh' 'libxrandr' 'lirc' 'raspberrypi-firmware'
2018-03-09 01:37:47 +00:00
'libxslt' 'lzo' 'python2-pillow' 'python2-simplejson' 'smbclient'
2019-01-29 00:28:50 +00:00
'speex' 'taglib' 'tinyxml' 'xorg-xdpyinfo' 'yajl' 'libinput' 'libxkbcommon' 'libbluray-kodi-rbp'
'fbset' 'libnfs' 'curl'
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-10-28 20:12:13 +00:00
'libplist: Limited AirPlay 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
for _cmp in ${_components[@]}; do
DESTDIR="$pkgdir" /usr/bin/cmake \
-DCMAKE_INSTALL_COMPONENT="$_cmp" \
-P cmake_install.cmake
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"
2019-01-29 00:28:50 +00:00
install -Dm0644 "$srcdir/kodi-framebuffer" "$pkgdir/etc/conf.d/kodi-framebuffer"
2017-02-04 02:21:39 +00:00
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() {
2019-01-29 00:28:50 +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'
2019-01-29 00:28:50 +00:00
'kodi-eventclients-kodi-send')
2017-02-05 02:59:18 +00:00
cd kodi-build
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() {
2019-01-29 00:28:50 +00:00
pkgdesc="Kodi Texturepacker tool (Raspberry Pi)"
2017-02-05 02:59:18 +00:00
depends=('libpng' 'giflib' 'libjpeg-turbo' 'lzo')
_components=('kodi-tools-texturepacker')
cd kodi-build
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
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
}