74 lines
2.1 KiB
Bash
74 lines
2.1 KiB
Bash
# Template file for '1password'
|
|
pkgname=1password
|
|
version=8.10.13
|
|
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="a512570add16f7dab4caca004889a172a207b7c08e7e02ec3e61b8d2a40fa275
|
|
5d7a60db301af9c4f19350c737b4f5d8bbe71de510282dd14017f6167c761005"
|
|
;;
|
|
|
|
x86_64)
|
|
_arch="x64"
|
|
checksum="a3496d85278bccfe34b852f41f241433e759f3d27b119c957b78022abd9a116d
|
|
8a3d85b9bdcdbda34808d417363961018183c80f3022510bde921a56b4472ba0"
|
|
;;
|
|
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"
|
|
}
|