kodi/kodi.spec

394 lines
12 KiB
RPMSpec
Raw Permalink Normal View History

# note: build for raspberrypi
# autospec --define _with_raspberrypi=1 xbmc.spec
# -or-
# rpmbuild --with raspberrypi xbmc.spec
%if "%{?_with_raspberrypi}"
%define pckname %{name}-rpi
%else
%define pckname %name
%endif
%define pkgver %(echo %version | cut -d_ -f1)
%define pkgrel %(echo %version | cut -d_ -f2)
%define codenameadd -Omega
%define _libdvdcss_version 1.4.3-Next-Nexus-Alpha2-2
%define _libdvdnav_version 6.1.1-Next-Nexus-Alpha2-2
%define _libdvdread_version 6.1.3-Next-Nexus-Alpha2-2
%define _ffmpeg_version 6.0.1
%define _crossguid_version ca1bf4b810e2d188d04cb6286f957008ee1b7681
%define _fstrcmp_version 0.7.D001
%define _flatbuffers_version 23.3.3
%define _libudfread_version 1.1.2
Name: kodi
Version: 21.0
Release: 1mamba
Summary: A media player and entertainment hub for digital media
Group: Graphical Desktop/Applications/Multimedia
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://kodi.tv/
Source: https://github.com/xbmc/xbmc/archive/%{version}%{?codenameadd}.tar.gz
Source1: https://github.com/xbmc/libdvdcss/archive/%{_libdvdcss_version}.tar.gz
Source2: https://github.com/xbmc/libdvdnav/archive/%{_libdvdnav_version}.tar.gz
Source3: https://github.com/xbmc/libdvdread/archive/%{_libdvdread_version}.tar.gz
Source4: https://ffmpeg.org/releases/ffmpeg-%{_ffmpeg_version}.tar.gz
Source5: https://mirrors.kodi.tv/build-deps/sources/crossguid-%{_crossguid_version}.tar.gz
Source6: https://mirrors.kodi.tv/build-deps/sources/fstrcmp-%{_fstrcmp_version}.tar.gz
Source7: https://mirrors.kodi.tv/build-deps/sources/flatbuffers-%{_flatbuffers_version}.tar.gz
Source8: https://mirrors.kodi.tv/build-deps/sources/libudfread-%{_libudfread_version}.tar.gz
Patch1: xbmc-12.0-set_native_cxxflags.patch
Patch2: xbmc-12.0-relax_badcolordepth_check.patch
Patch3: kodi-20.2-binutils-2.41.patch
Patch4: kodi-20.4-swig-4.2.0.patch
License: GPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libX11-devel
BuildRequires: libXext-devel
BuildRequires: libXrandr-devel
BuildRequires: libXv-devel
BuildRequires: libalsa-devel
BuildRequires: libass-devel
BuildRequires: libatomic-devel
BuildRequires: libavahi-devel
BuildRequires: libbluetooth-devel
BuildRequires: libbluray-devel
BuildRequires: libbrotli-devel
BuildRequires: libbzip2-devel
BuildRequires: libcap-devel
BuildRequires: libcdio-devel
BuildRequires: libcec-devel
%ifarch x86_64 %{ix86}
BuildRequires: libcrystalhd-devel
%endif
BuildRequires: libcurl-devel
BuildRequires: libdav1d-devel
BuildRequires: libdbus-devel
BuildRequires: libdrm-devel
BuildRequires: libfmt-devel
BuildRequires: libfreetype-devel
BuildRequires: libfribidi-devel
BuildRequires: libfstrcmp-devel
BuildRequires: libgcc
BuildRequires: libgif-devel
BuildRequires: libglvnd-devel
BuildRequires: libgmp-devel
BuildRequires: libgnutls-devel
BuildRequires: libharfbuzz-devel
BuildRequires: libidn2-devel
BuildRequires: libinput-devel
BuildRequires: libjpeg-devel
BuildRequires: liblcms2-devel
BuildRequires: liblzma-devel
BuildRequires: liblzo-devel
BuildRequires: libmariadb-devel
BuildRequires: libmesa-devel
BuildRequires: libmicrohttpd-devel
BuildRequires: libnettle-devel
BuildRequires: libnfs-devel
BuildRequires: libopenssl-devel
BuildRequires: libp11-kit-devel
BuildRequires: libpcre-devel
BuildRequires: libpipewire-devel
BuildRequires: libplist-devel
BuildRequires: libpng-devel
BuildRequires: libpulseaudio-devel
BuildRequires: libpulseaudio-glib-devel
BuildRequires: libpython3-devel
BuildRequires: libsmbclient-devel
BuildRequires: libsndio-devel
BuildRequires: libspdlog-devel
BuildRequires: libsqlite-devel
BuildRequires: libstdc++6-devel
BuildRequires: libtag-devel
BuildRequires: libtasn1-devel
BuildRequires: libtinyxml-devel
BuildRequires: libudev-devel
BuildRequires: libunistring-devel
BuildRequires: libuuid-devel
BuildRequires: libva-devel
BuildRequires: libvdpau-devel
BuildRequires: libwaylandpp-devel
BuildRequires: libxkbcommon-devel
BuildRequires: libxml2-devel
BuildRequires: libxslt-devel
BuildRequires: libz-devel
BuildRequires: libzstd-devel
BuildRequires: lirc-devel
BuildRequires: trousers-devel
## AUTOBUILDREQ-END
BuildRequires: doxygen
BuildRequires: gperf
BuildRequires: java-openjdk17
BuildRequires: nasm
BuildRequires: swig
BuildRequires: unzip
BuildRequires: libdvdcss-devel
BuildRequires: libflac-devel
BuildRequires: libfmt-devel >= 10.1.0
BuildRequires: libGLESv2-devel
BuildRequires: liblame-devel
BuildRequires: libmad-devel
BuildRequires: libmodplug-devel
BuildRequires: libmpeg2-devel
BuildRequires: libogg-devel
BuildRequires: librtmp-devel
BuildRequires: libusb-devel
BuildRequires: libtinyxml2-devel
BuildRequires: libvorbis-devel
BuildRequires: libzip-devel
%if "%{?_with_raspberrypi}"
BuildRequires: libraspberrypi-devel
%endif
BuildRequires: libprojectM-devel
BuildRequires: libdcadec-devel
BuildRequires: libcrossguid-devel
BuildRequires: libflatbuffers-devel
BuildRequires: librapidjson-devel
BuildRequires: libspdlog-devel >= 1.13.0
BuildRequires: libwaylandpp-devel >= 1.0.0
Requires: mesa-tests
Requires: xdpyinfo
Requires: libprojectM
Provides: xbmc
Obsoletes: xbmc < 18.9
%description
XBMC is an award-winning free and open source (GPL) software media player and entertainment hub for digital media.
%package devel
Summary: Development package for %{name}
Group: Development/Libraries
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
Provides: xbmc-devel
Obsoletes: xbmc-devel < 18.9
%description devel
XBMC is an award-winning free and open source (GPL) software media player and entertainment hub for digital media.
This package contains headers for %{name} development.
%if "%{?_with_raspberrypi}"
%package -n %{name}-rpi
Summary: A media player and entertainment hub for digital media
Group: Graphical Desktop/Applications/Multimedia
Provides: xbmc-rpi
Obsoletes: xbmc-rpi < 18.9
%description -n %{name}-rpi
XBMC is an award-winning free and open source (GPL) software media player and entertainment hub for digital media.
%endif
%debug_package
%prep
%setup -q -n xbmc-%{pkgver}%{?codenameadd}
#-D -T
#:<< ___EOF
%if "%{?_with_raspberrypi}"
%patch 1 -p1
%patch 2 -p1
%endif
#%patch 3 -p1
#%patch 4 -p1
%build
export JAVA_HOME=%{jvmdir}/java-17
#:<< ___EOF
%cmake -d build \
-DENABLE_INTERNAL_RapidJSON=OFF \
-DENABLE_INTERNAL_FFMPEG=ON \
-DENABLE_INTERNAL_CROSSGUID=ON \
-DENABLE_INTERNAL_FSTRCMP=ON \
-DENABLE_INTERNAL_FLATBUFFERS=ON \
-DENABLE_INTERNAL_UDFREAD=ON \
-Dlibdvdcss_URL="%{SOURCE1}" \
-Dlibdvdnav_URL="%{SOURCE2}" \
-Dlibdvdread_URL="%{SOURCE3}" \
-DFFMPEG_URL="%{SOURCE4}" \
-DCROSSGUID_URL="%{SOURCE5}" \
-DFSTRCMP_URL="%{SOURCE6}" \
-DFLATBUFFERS_URL="%{SOURCE7}" \
-DUDFREAD_URL="%{SOURCE8}" \
%ifarch x86_64 %{ix86}
-DAPP_RENDER_SYSTEM="gl" \
%endif
%ifarch aarch64 arm
-DAPP_RENDER_SYSTEM="gles"
%endif
%if "%{?_with_raspberrypi}"
# -Wno-psabi: just to avoid the annoying flooding of gcc warnings
# "the mangling of va_list has changed in GCC 4.4"
# We cannot use pipes rather than intermediate files ('-pipe') because
# this option requires too much memory and the build will end with an error
# (xbmc/music/MusicDatabase.o -- Error: unknown pseudo-op: '.uleb')
BUILD_FLAGS="\
-O2 -fomit-frame-pointer -Wno-psabi \
-lvchostif \
-I/opt/vc/include \
-I/opt/vc/include/IL \
-I/opt/vc/include/interface/vcos/pthreads \
-I/opt/vc/include/interface/vmcs_host/linux"
export CXXFLAGS="$BUILD_FLAGS"
export LDFLAGS="$LDFLAGS -L/opt/vc/lib"
%endif
%make
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall -C build
rm -fr %{buildroot}%{_datadir}/doc
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%pre
if [ $1 -ge 1 ]; then
[ -L %{_libdir}/xbmc ] || rm -rf %{_libdir}/xbmc
fi
exit 0
%post -n %{pckname}
/bin/touch --no-create %{_datadir}/icons/hicolor >/dev/null 2>&1
:
%postun -n %{pckname}
if [ $1 -eq 0 ] ; then
/bin/touch --no-create %{_datadir}/icons/hicolor >/dev/null 2>&1
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor >/dev/null 2>&1
fi
:
%posttrans -n %{pckname}
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor >/dev/null 2>&1
:
%files -n %{pckname}
%defattr(-,root,root)
%{_bindir}/kodi
%{_bindir}/kodi-standalone
%{_bindir}/kodi-TexturePacker
%{_bindir}/TexturePacker
%dir %{_datadir}/kodi
%{_datadir}/kodi/*
%{_datadir}/applications/kodi.desktop
%{_datadir}/metainfo/org.xbmc.kodi.metainfo.xml
%{_datadir}/wayland-sessions/kodi-gbm.desktop
%{_datadir}/xsessions/kodi.desktop
%{_datadir}/icons/hicolor/*/*/*.png
%{_prefix}/lib/firewalld/services/kodi-*.xml
%dir %{_libdir}/kodi
%{_libdir}/kodi/*
%doc LICENSE.md
%files devel
%defattr(-,root,root)
%dir %{_includedir}/kodi
%{_includedir}/kodi/*
%doc README.md
%changelog
* Thu Apr 11 2024 Silvan Calarco <silvan.calarco@mambasoft.it> 21.0-1mamba
- update to 21.0
* Sun Mar 03 2024 Automatic Build System <autodist@openmamba.org> 20.5-1mamba
- automatic version update by autodist
* Sun Feb 11 2024 Automatic Build System <autodist@openmamba.org> 20.4-1mamba
- automatic version update by autodist
* Sat Aug 26 2023 Automatic Build System <autodist@mambasoft.it> 20.2-1mamba
- automatic version update by autodist
* Sun Mar 12 2023 Automatic Build System <autodist@mambasoft.it> 20.1-1mamba
- automatic version update by autodist
* Mon Jan 23 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 20.0-1mamba
- update to 20.0
* Sun Dec 25 2022 Automatic Build System <autodist@mambasoft.it> 19.5-1mamba
- automatic version update by autodist
* Sat Jun 04 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 19.4-1mamba
- update to 19.4
* Tue Oct 26 2021 Automatic Build System <autodist@mambasoft.it> 19.3-1mamba
- automatic version update by autodist
* Thu Oct 14 2021 Automatic Build System <autodist@mambasoft.it> 19.2-1mamba
- automatic version update by autodist
* Wed Jun 02 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 19.1-1mamba
- update to 19.1
* Thu Mar 25 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 18.9-1mamba
- update to 18.9
* Sun Dec 08 2019 Silvan Calarco <silvan.calarco@mambasoft.it> 18.5-1mamba
- update to 18.5
* Sun Jul 29 2018 Silvan Calarco <silvan.calarco@mambasoft.it> 17.6-1mamba
- update to 17.6
* Thu May 19 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 16.1-1mamba
- update to 16.1
* Mon Mar 14 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 16.0-1mamba
- update to 16.0
* Sun Feb 14 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 15.2-3mamba
- rebuilt with gcc 5.3.0
* Wed Nov 18 2015 Silvan Calarco <silvan.calarco@mambasoft.it> 15.2-2mamba
- fix kodi vs xbmc libdir weirdness
* Sun Nov 15 2015 Automatic Build System <autodist@mambasoft.it> 15.2-1mamba
- automatic version update by autodist
* Tue Sep 22 2015 Silvan Calarco <silvan.calarco@mambasoft.it> 15.1-1mamba
- update to 15.1
* Fri Sep 19 2014 Automatic Build System <autodist@mambasoft.it> 13.2-1mamba
- automatic update by autodist
* Mon Jun 23 2014 Automatic Build System <autodist@mambasoft.it> 13.1-1mamba
- automatic update by autodist
* Wed Jun 04 2014 Automatic Build System <autodist@mambasoft.it> 13.0_r2-1mamba
- automatic update by autodist
* Sat Jan 04 2014 Automatic Build System <autodist@mambasoft.it> 12.3-1mamba
- automatic version update by autodist
* Sat Jun 01 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 12.2-2mamba
- python 2.7 mass rebuild
* Tue May 07 2013 Automatic Build System <autodist@mambasoft.it> 12.2-1mamba
- automatic version update by autodist
* Tue Mar 26 2013 Automatic Build System <autodist@mambasoft.it> 12.1-1mamba
- automatic version update by autodist
* Sat Mar 09 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 12.0-4mamba
- require libprojectM
- raspberrypi: don't disable libprojectM
* Mon Feb 25 2013 openmamba WebBuild System <webbuild@openmamba.org> 12.0-3mamba
- - simplify the conditional statements by using a syntax that autospec can understand
* Sun Feb 24 2013 openmamba WebBuild System <webbuild@openmamba.org> 12.0-2mamba
- make raspberrypi a conditional build target
* Fri Feb 15 2013 Davide Madrisan <davide.madrisan@gmail.com> 12.0-1mamba
- package created by autospec