desktop-base-openmamba/SRPMS/chromium-widevine/chromium-widevine.spec.in

70 lines
2.3 KiB
RPMSpec

Name: chromium-widevine
Version: @SRPMVERSION@
Release: @SRPMRELEASE@
Summary: Google Chrome's Widevine plugin for Chromium
Group: Applications/Web
Vendor: @vendor@
Distribution: @distribution@
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://www.widevine.com/
Source: LICENSE
License: Non Distributable
BuildPrereq: wget
BuildPrereq: /usr/bin/tempfile
# NOTE: requires the backward compatible version of the libstdc++ library
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
Google Chrome's Widevine plugin for Chromium.
%prep
%setup -c -n %{name}-%{version} -T
[ -r /etc/sysconfig/@sysconfigfile@ ] || exit 1
declare -A SRPMVERSION SRPMRELEASE
. /etc/sysconfig/@sysconfigfile@
[ "${CHROMIUM_WIDEVINE_PCK}" ] || exit 1
[ "${CHROMIUM_WIDEVINE_URL}" ] || \
CHROMIUM_WIDEVINE_URL="https://dl.google.com/linux/direct/"
tmpdir=$(mktemp -q -d -t chromium-widevine.XXXXXXXX)
[ $? -eq 0 ] || exit 1
[ -f ${tmpdir}/${WIDEVINE_PCK} ] ||
wget -nv --timeout=10 --tries=2 \
${CHROMIUM_WIDEVINE_URL}${CHROMIUM_WIDEVINE_PCK} -O ${tmpdir}/${CHROMIUM_WIDEVINE_PCK}
[ -f ${tmpdir}/${CHROMIUM_WIDEVINE_PCK} ] || exit 1
rpm2cpio ${tmpdir}/${CHROMIUM_WIDEVINE_PCK}|cpio -id
%build -q
%install
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
install -d -m0755 %{buildroot}%{_libdir}/chromium/WidevineCdm/_platform_specific/linux_x64
install -D -m0755 opt/google/chrome/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so %{buildroot}%{_libdir}/chromium/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so
ln -s WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so %{buildroot}%{_libdir}/chromium/libwidevinecdm.so
cp %{S:0} LICENSE
rm -fr ${tmpdir}
%clean
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
rm -rf %{_builddir}/%{name}-*
:
%files
%defattr(-,root,root)
%{_libdir}/chromium/libwidevinecdm.so
%{_libdir}/chromium/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so
%doc LICENSE
%changelog
* Sat Nov 02 2019 Silvan Calarco <silvan.calarco@mambasoft.it> @SRPMVERSION@-@SRPMRELEASE@
- make library available in the path searched by chromium 78+
* Sat Jun 16 2018 Silvan Calarco <silvan.calarco@mambasoft.it> @SRPMVERSION@-@SRPMRELEASE@
- first build for chromium-widevine