74 lines
2.1 KiB
Bash
74 lines
2.1 KiB
Bash
# Template file for '1password'
|
|
pkgname=1password
|
|
version=8.10.18
|
|
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="3ac9a01cf940b7d2bbcad5cc33c04034670a703dd4d4e2ddd8c2df392e2573a4
|
|
e218d8e8dc3497b70f77dcb9a1f16458e7734b406c3cd0f69f2243aba5a256e5"
|
|
;;
|
|
|
|
x86_64)
|
|
_arch="x64"
|
|
checksum="de82bc273cf8f93638216f2801e9f31e8eca41e3f9f2267ea27e4f3658819fb2
|
|
8bc56cdcaa8d8ed7e2fa0605fb91443e743a52a519c58cbb72f7ab17d0b4782c"
|
|
;;
|
|
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"
|
|
}
|