netsrpms/SRPMS/chromium-widevine/chromium-widevine.spec.in
2022-06-24 23:54:56 +02:00

75 lines
2.4 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
# 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
ar x ${tmpdir}/${CHROMIUM_WIDEVINE_PCK}
bsdtar -x --strip-components 4 -f data.tar.xz opt/google/chrome/WidevineCdm
%build -q
%install
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
install -d -m0755 %{buildroot}%{_libdir}/chromium/
cp -a WidevineCdm %{buildroot}%{_libdir}/chromium/
ln -s WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so %{buildroot}%{_libdir}/chromium/
#cp %{S:0} LICENSE
rm -fr ${tmpdir}
%clean
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
rm -rf %{_builddir}/%{name}-*
:
%files
%defattr(-,root,root)
%dir %{_libdir}/chromium/WidevineCdm
%{_libdir}/chromium/WidevineCdm/manifest.json
%{_libdir}/chromium/WidevineCdm/LICENSE
%{_libdir}/chromium/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so
%{_libdir}/chromium/libwidevinecdm.so
#%doc LICENSE
%changelog
* Fri Jun 24 2022 Silvan Calarco <silvan.calarco@mambasoft.it> @SRPMVERSION@-@SRPMRELEASE@
- provide symlink %{_libdir}/chromium/libwidevinecdm.so for QtWebengine based applications
* 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