74 lines
2.1 KiB
Bash
74 lines
2.1 KiB
Bash
# Template file for '1password'
|
|
pkgname=1password
|
|
version=8.10.16
|
|
revision=1
|
|
archs="x86_64 aarch64"
|
|
hostmakedepends="gnupg"
|
|
short_desc="Password manager"
|
|
maintainer="Mohammed Anas <triallax@tutanota.com>"
|
|
license="custom:Proprietary"
|
|
homepage="https://www.1password.com"
|
|
|
|
case "${XBPS_TARGET_MACHINE}" in
|
|
aarch64)
|
|
_arch="arm64"
|
|
checksum="4721b5433984af0262df5a72b653a3584e907e15a3bd942e69312d204a60d369
|
|
92fbaa0ac00c6d22060fb00c13a4ba1aa95ab424d995bbdb03abff9e7d1a02b4"
|
|
;;
|
|
|
|
x86_64)
|
|
_arch="x64"
|
|
checksum="a7d253254c0fa89000ca485f57094490f96a819d21f552d04772b60580019f92
|
|
b0d3ac1995043819654e068a3e423ea50c906add595e562be182d663d6d5230b"
|
|
;;
|
|
esac
|
|
|
|
distfiles="https://downloads.1password.com/linux/tar/stable/${XBPS_TARGET_MACHINE}/1password-${version}.${_arch}.tar.gz
|
|
https://downloads.1password.com/linux/tar/stable/${XBPS_TARGET_MACHINE}/1password-${version}.${_arch}.tar.gz.sig"
|
|
_filename="1password-${version}.${_arch}.tar.gz"
|
|
_1passworddir="${_filename%.tar.*}"
|
|
_gpg_key=3FEF9748469ADBE15DA7CA80AC2D62742012EA22
|
|
_resources="opt/1Password/resources"
|
|
system_groups="_onepassword"
|
|
repository=nonfree
|
|
restricted=yes
|
|
nostrip=yes
|
|
noshlibprovides=yes
|
|
skip_extraction="$_filename.sig"
|
|
|
|
post_extract() {
|
|
# verify gpg key
|
|
if ! gpg --recv-keys "${_gpg_key}"; then
|
|
msg_error "Incorrect gpg key: ${_gpg_key}\n"
|
|
fi
|
|
if ! gpg --verify "${XBPS_SRCDISTDIR}/${pkgname}-${version}/${_filename}.sig" \
|
|
"${XBPS_SRCDISTDIR}/${pkgname}-${version}/${_filename}"
|
|
then
|
|
msg_error "gpg verify failed\n"
|
|
fi
|
|
}
|
|
|
|
do_install() {
|
|
vmkdir opt/1Password
|
|
vlicense ${FILESDIR}/EULA
|
|
vcopy "*" opt/1Password
|
|
|
|
# Install the icons
|
|
for _s in 32 64 256 512; do
|
|
# Create xdg directory
|
|
vmkdir usr/share/icons/hicolor/${_s}x${_s}/apps
|
|
|
|
# Copy the 1Password icon
|
|
mv ${DESTDIR}/${_resources}/icons/hicolor/${_s}x${_s}/apps/1password.png \
|
|
${DESTDIR}/usr/share/icons/hicolor/${_s}x${_s}/apps/1password.png
|
|
done
|
|
|
|
# Install the .desktop file
|
|
vmkdir usr/share/applications
|
|
mv ${DESTDIR}/${_resources}/1password.desktop \
|
|
${DESTDIR}/usr/share/applications/1password.desktop
|
|
|
|
vinstall resources/custom_allowed_browsers 644 usr/share/doc/1password/examples/
|
|
vbin "${FILESDIR}/1password"
|
|
}
|