2021-12-08 10:35:46 +01:00
|
|
|
# Template file for '1password'
|
|
|
|
pkgname=1password
|
|
|
|
version=8.4.1
|
|
|
|
revision=1
|
|
|
|
archs="x86_64"
|
|
|
|
hostmakedepends="w3m gnupg"
|
|
|
|
short_desc="Password manager"
|
|
|
|
maintainer="b-l-a-i-n-e <blaine.gilbreth@gmail.com>"
|
|
|
|
license="custom:Proprietary"
|
|
|
|
homepage="https://www.1password.com"
|
2022-10-23 10:56:07 +02:00
|
|
|
distfiles="https://downloads.1password.com/linux/tar/stable/x86_64/1password-${version}.x64.tar.gz
|
|
|
|
https://downloads.1password.com/linux/tar/stable/x86_64/1password-${version}.x64.tar.gz.sig"
|
|
|
|
checksum="f5c2468127c363b3a3d2fa5857b6ff0979eeaf1485c1afb114b3929c1fc4a7df
|
|
|
|
0739424395377f56c9528c1169ef72d6a941e21f1bc9d728481bf5de8563bf01"
|
|
|
|
_filename="1password-${version}.x64.tar.gz"
|
2021-12-08 10:35:46 +01:00
|
|
|
_1passworddir="${_filename%.tar.*}"
|
|
|
|
_license_checksum=b8f6ff9297488416f3d8063a151109ed5e8a2df6fa546856a4beaa715cbc0fda
|
|
|
|
_gpg_key=3FEF9748469ADBE15DA7CA80AC2D62742012EA22
|
|
|
|
system_groups="_onepassword"
|
|
|
|
repository=nonfree
|
|
|
|
restricted=yes
|
|
|
|
nostrip=yes
|
|
|
|
noshlibprovides=yes
|
2022-10-23 10:56:07 +02:00
|
|
|
skip_extraction="$_filename.sig"
|
2021-12-08 10:35:46 +01:00
|
|
|
|
|
|
|
post_extract() {
|
|
|
|
# verify gpg key
|
|
|
|
if ! gpg --recv-keys "${_gpg_key}"; then
|
|
|
|
msg_error "Incorrect gpg key: ${_gpg_key}\n"
|
|
|
|
fi
|
2022-10-23 10:56:07 +02:00
|
|
|
if ! gpg --verify "${XBPS_SRCDISTDIR}/${pkgname}-${version}/${_filename}.sig" \
|
|
|
|
"${XBPS_SRCDISTDIR}/${pkgname}-${version}/${_filename}"
|
|
|
|
then
|
2021-12-08 10:35:46 +01:00
|
|
|
msg_error "gpg verify failed\n"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# verify EULA
|
|
|
|
$XBPS_FETCH_CMD -o eula https://1password.com/legal/terms-of-service/
|
|
|
|
cat eula |
|
|
|
|
w3m -dump -I utf-8 -T text/html |
|
|
|
|
sed -n '/Service Agreement for 1Password/,/We clarified what happens if we part ways./p' > EULA
|
|
|
|
filesum="$($XBPS_DIGEST_CMD EULA)"
|
|
|
|
if [ "$filesum" != "$_license_checksum" ]; then
|
|
|
|
msg_error "SHA256 mismatch for EULA:\n$filesum\n"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
do_install() {
|
|
|
|
vmkdir opt/1Password
|
|
|
|
vlicense EULA
|
2022-10-23 10:56:07 +02:00
|
|
|
rm -f EULA eula
|
|
|
|
vcopy "*" opt/1Password
|
|
|
|
vinstall com.1password.1Password.policy 644 usr/share/polkit-1/actions/
|
|
|
|
vinstall resources/custom_allowed_browsers 644 usr/share/doc/1password/examples/
|
|
|
|
vbin "${FILESDIR}/1password"
|
2021-12-08 10:35:46 +01:00
|
|
|
}
|