File zoom.spec of Package zoom

%global __provides_exclude_from ^/opt/.*$
%global __requires_exclude_from ^/opt/.*$

%define rpm_version %(rpm -qp %{_sourcedir}/%{name}.rpm 2>/dev/null | sed "s|%{name}-\\(.\\+\\)-.*|\\1|")

Name:           zoom
Version:        %{rpm_version}
Release:        0%{?dist}
Summary:        Cloud Meetings
License:        SUSE-NonFree
Group:          Productivity/Networking/Other
URL:            https://www.zoom.us/

Source0:        %{name}.rpm

BuildRequires:  rpm
BuildRequires:  cpio
BuildRequires:  chrpath
BuildRequires:  fdupes

%description
Zoom Cloud Meetings
Zoom brings people together to connect and get more done in a frictionless, secure video environment. Our easy, reliable, and innovative video-first solutions provide video meetings and chat, with additional options for webinars and phone service.
 .
Zoom is the leading unified communications platform and helps individuals, schools, healthcare professionals and enterprises stay connected. Visit blog.zoom.us and follow @zoom_us.
 .
By installing this app, you agree to our Terms of Service (https://zoom.us/terms) and Privacy Statement (https://zoom.us/privacy).

%prep

%build

%install
rpm2cpio %{SOURCE0} | cpio -idm -D %{buildroot}
if [ -d "%{buildroot}/usr/lib/.build-id" ] ; then rm -rf %{buildroot}/usr/lib/.build-id ; fi

if [ -e "%{buildroot}/opt/%{name}/cef/chrome-sandbox" ] ; then
   chown root %{buildroot}/opt/%{name}/cef/chrome-sandbox && chmod 4755 %{buildroot}/opt/%{name}/cef/chrome-sandbox || true
fi
find %{buildroot}/opt -name "*.so*" -exec chrpath --delete '{}' \;
chrpath --delete %{buildroot}/opt/zoom/aomhost %{buildroot}/opt/zoom/zoom %{buildroot}/opt/zoom/zopen %{buildroot}/opt/zoom/ZoomLauncher %{buildroot}/opt/zoom/ZoomWebviewHost
find %{buildroot}/opt/zoom/ -type f -executable \( -name "*.pcm" -o -name "*.wav" -o -name "*.txt" -o -name "*.xml" -o -name "*.qm" -o -name "*.qml" \) -exec chmod -x '{}' \;
%fdupes %{buildroot}/

%files
%dir /opt/%{name}
/opt/%{name}/*
%{_bindir}/*
%{_datadir}/applications/*
%dir %{_datadir}/doc/%{name}
%{_datadir}/mime/packages/*
%{_datadir}/pixmaps/*

%changelog
openSUSE Build Service is sponsored by