PKGBUILDs/alarm/kodi-rbp-git/PKGBUILD

236 lines
8 KiB
Bash
Raw Normal View History

# Contributor graysky <graysky AT archlinux DOT org>
# Contributor BlackIkeEagle < ike DOT devolder AT gmail DOT com >
# 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>
# Contributor Adrian Fedoreanu <adrian [dot] fedoreanu [at] gmail [dot] com>
2015-02-05 00:16:53 +00:00
buildarch=20
2012-09-20 14:27:56 +00:00
_prefix=/usr
pkgbase=kodi-rbp-git
_suffix=rbp-git
pkgname=("kodi-$_suffix" "kodi-eventclients-$_suffix" "kodi-tools-texturepacker-$_suffix" "kodi-dev-$_suffix")
pkgver=18.0a1.20180310
pkgrel=2
_codename=Leia
_tag="18.0a1-$_codename"
_rtype=Alpha
_rver=1
_ffmpeg_version="3.4.1-$_codename-$_rtype-$_rver"
_libdvdcss_version="1.4.1-$_codename-$_rtype-$_rver"
_libdvdnav_version="6.0.0-$_codename-$_rtype-$_rver"
_libdvdread_version="6.0.0-$_codename-$_rtype-$_rver"
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' 'libcec-rpi' 'libmariadbclient' 'libmicrohttpd'
'libmodplug' 'libmpeg2' 'libnfs' 'libplist' 'libpulse' 'libssh'
'libxrandr' 'libxslt' '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'
)
_ffmpeg_version="3.4.1-$_codename-$_rtype-$_rver"
_libdvdcss_version="1.4.1-$_codename-$_rtype-$_rver"
_libdvdnav_version="6.0.0-$_codename-$_rtype-$_rver"
_libdvdread_version="6.0.0-$_codename-$_rtype-$_rver"
source=("xbmc-$_tag.tar.gz::https://github.com/xbmc/xbmc/archive/$_tag.tar.gz"
'kodi.service'
'99-kodi.rules'
'polkit.rules'
'hifiberry_digi.patch'
"libdvdcss-$_libdvdcss_version.tar.gz::https://github.com/xbmc/libdvdcss/archive/1.4.1-$_codename-$_rtype-$_rver.tar.gz"
"libdvdnav-$_libdvdnav_version.tar.gz::https://github.com/xbmc/libdvdnav/archive/6.0.0-$_codename-$_rtype-$_rver.tar.gz"
"libdvdread-$_libdvdread_version.tar.gz::https://github.com/xbmc/libdvdread/archive/6.0.0-$_codename-$_rtype-$_rver.tar.gz"
"ffmpeg-$_ffmpeg_version.tar.gz::https://github.com/xbmc/FFmpeg/archive/$_ffmpeg_version.tar.gz"
)
noextract=(
"libdvdcss-$_libdvdcss_version.tar.gz"
"libdvdnav-$_libdvdnav_version.tar.gz"
"libdvdread-$_libdvdread_version.tar.gz"
"ffmpeg-$_ffmpeg_version.tar.gz"
)
sha256sums=('8892498d5248eea29c30db7c128a5910afc60d1b0b894aea472604bb879a0310'
'5235068d5800d69f0287087815990e7fe8d6572733d60c8800546d35f608e87f'
'b31570f95654434b01fd8531612fbb6be77cbc1c519dd60f92feae26eb160f3d'
'9ea592205023ba861603d74b63cdb73126c56372a366dc4cb7beb379073cbb96'
'0b9d951911a8576c26dec8a31f394282677e48afff49b9579448121d27b8509e'
'6e89b7fc36e26d27fcc8fadf97176ca7684f1702634ecdbe4d8df62a4a967de3'
'4af19a750f468a0b926ce5051e70951ee5815d5913d3dd44260dd93ca74fc4c1'
'd2c19c1d719caba031241fa9f4f7740ab84ad8033ab381bf9f7b8c59f259b441'
'5f7b367f2b451098302f5a78a73e35924bbea24e9b1ac0af73cd32b4ee5942e3')
2013-04-08 18:51:48 +00:00
prepare() {
cd "$srcdir/xbmc-$_tag"
patch -Np1 -i "$srcdir/hifiberry_digi.patch"
[[ -d kodi-build ]] && rm -rf kodi-build
mkdir $srcdir/kodi-build
2013-04-08 18:51:48 +00:00
}
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_INTERNAL_FMT=ON \
-DENABLE_EVENTCLIENTS=ON \
-DENABLE_OPENGL=OFF \
-DENABLE_X11=OFF \
-DENABLE_VAAPI=OFF \
-DENABLE_VDPAU=OFF \
-DENABLE_INTERNAL_CROSSGUID=ON \
-DLIRC_DEVICE=/run/lirc/lircd \
-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"
make
make preinstall
2012-09-20 14:27:56 +00:00
}
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'
'hicolor-icon-theme' 'libass' 'libcdio' 'libjpeg-turbo' 'libmariadbclient'
'libmicrohttpd' 'libpulse' 'libssh' 'libxrandr' 'raspberrypi-firmware'
'libxslt' 'lzo' 'python2-pillow' 'python2-simplejson' 'smbclient'
'speex' 'taglib' 'tinyxml' 'xorg-xdpyinfo' 'yajl'
)
optdepends=(
'afpfs-ng: Apple shares support'
'bluez: Blutooth support'
'python2-pybluez: Bluetooth support'
'libnfs: NFS shares support'
'libplist: Limited AirPlay support'
'libcec-rpi: Pulse-Eight USB-CEC adapter support'
'lirc: Remote controller 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')
2016-05-10 18:29:54 +00:00
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
2012-09-20 14:27:56 +00:00
# Licenses
install -dm755 "$pkgdir/usr/share/licenses/$pkgname"
2012-09-20 14:27:56 +00:00
for licensef in LICENSE.GPL copying.txt; do
mv "$pkgdir/usr/share/doc/kodi/$licensef" \
"$pkgdir/usr/share/licenses/$pkgname"
2012-09-20 14:27:56 +00:00
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"
2012-09-20 14:27:56 +00:00
}
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
}