opera: change distfile to rpm, adopt.

Also:
     - enable sandboxing with user namespaces.
This commit is contained in:
mobinmob 2021-10-30 15:45:37 +03:00 committed by Érico Nogueira Rolim
parent 724f8b6482
commit 42ae642fa3
1 changed files with 17 additions and 19 deletions

View File

@ -1,35 +1,33 @@
# Template file for 'opera'
pkgname=opera
version=80.0.4170.72
revision=1
revision=2
archs="x86_64"
create_wrksrc=yes
hostmakedepends="rpmextract"
depends="ffmpeg desktop-file-utils hicolor-icon-theme"
short_desc="Fast, secure, easy to use browser"
maintainer="Diogo Leal <diogo@diogoleal.com>"
maintainer="mobinmob <mobinmob@disroot.org>"
license="custom:Proprietary"
homepage="https://www.opera.com/computer"
distfiles="http://get.geo.opera.com/pub/opera/desktop/${version}/linux/${pkgname}-stable_${version}_amd64.deb"
checksum=f6b9e132c9cd2f7343ffb5fae1edb80a08087bac90ddb53d5fb2e475f834177a
distfiles="https://rpm.opera.com/rpm/opera_stable-${version}-linux-release-x64-signed.rpm"
checksum=3f3ece9bae6576b6ef5e2908733c112695ea535801bc6fb422b9fe7a79c097cc
repository="nonfree"
nostrip=yes
do_extract() {
ar x ${XBPS_SRCDISTDIR}/${pkgname}-${version}/${pkgname}-stable_${version}_amd64.deb
bsdtar xf data.tar.xz --exclude=./usr/share/{lintian,menu}
}
do_install() {
vmkdir /usr/lib
vcopy usr/lib/x86_64-linux-gnu/opera /usr/lib
# Create necessary dirs
vmkdir usr/bin
vmkdir usr/lib
vmkdir /usr/bin
ln -s ../lib/opera/opera ${DESTDIR}/usr/bin/opera
# Copy files
vcopy usr/lib64/opera /usr/lib/
vcopy usr/share /usr/share/
vlicense usr/share/doc/opera-stable/copyright
rm -rf usr/share/doc
# Link executable in path
ln -s ../lib/opera/opera "${DESTDIR}/usr/bin/opera"
vcopy usr/share /usr
# suid opera_sandbox
chmod 4755 ${DESTDIR}/usr/lib/opera/opera_sandbox
# Install licenses
vlicense usr/lib64/opera/resources/eula_desktop_eea.txt
vlicense usr/lib64/opera/resources/eula_desktop_row.txt
}