init
This commit is contained in:
25
.SRCINFO
Normal file
25
.SRCINFO
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
pkgbase = cato-client-bin
|
||||||
|
pkgdesc = VPN client from Cato Networks to connect to the Cato Cloud.
|
||||||
|
pkgver = 5.7.0.5525
|
||||||
|
pkgrel = 1
|
||||||
|
url = https://clientdownload.catonetworks.com/
|
||||||
|
install = cato-client-bin.install
|
||||||
|
arch = x86_64
|
||||||
|
license = custom
|
||||||
|
makedepends = libarchive
|
||||||
|
makedepends = curl
|
||||||
|
depends = glibc
|
||||||
|
depends = gcc-libs
|
||||||
|
depends = zlib
|
||||||
|
depends = ca-certificates-utils
|
||||||
|
provides = cato-linux-client
|
||||||
|
conflicts = cato-linux-client
|
||||||
|
noextract = cato-client-install.deb
|
||||||
|
source = cato-client-install.deb::https://clientdownload.catonetworks.com/public/clients/cato-client-install.deb
|
||||||
|
source = cato-client-bin.sysusers
|
||||||
|
source = cato-client-bin.tmpfiles
|
||||||
|
sha256sums = SKIP
|
||||||
|
sha256sums = 3c51ce0ebde44edf062e2c9db69c95949ee2031f4e85156f2f401d6e8767f704
|
||||||
|
sha256sums = d381f7126126f45ca36e43bd33772bfa0aa6d9cbc9a720e2485fc6061cdd9435
|
||||||
|
|
||||||
|
pkgname = cato-client-bin
|
||||||
16
.gitignore
vendored
Normal file
16
.gitignore
vendored
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
# makepkg build dirs
|
||||||
|
src/
|
||||||
|
pkg/
|
||||||
|
|
||||||
|
# built packages
|
||||||
|
*.pkg.tar.zst
|
||||||
|
*.pkg.tar.xz
|
||||||
|
*.pkg.tar.gz
|
||||||
|
*.src.tar.gz
|
||||||
|
|
||||||
|
# upstream binary (re-downloaded on every build)
|
||||||
|
cato-client-install.deb
|
||||||
|
|
||||||
|
# signatures / logs
|
||||||
|
*.sig
|
||||||
|
*.log
|
||||||
80
PKGBUILD
Normal file
80
PKGBUILD
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
# Maintainer: aheuwes
|
||||||
|
# Previous maintainers: mreschke, Didrole
|
||||||
|
|
||||||
|
pkgname=cato-client-bin
|
||||||
|
pkgver=5.7.0.5525
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc='VPN client from Cato Networks to connect to the Cato Cloud.'
|
||||||
|
arch=('x86_64')
|
||||||
|
url='https://clientdownload.catonetworks.com/'
|
||||||
|
license=('custom')
|
||||||
|
depends=('glibc' 'gcc-libs' 'zlib' 'ca-certificates-utils')
|
||||||
|
makedepends=('libarchive' 'curl')
|
||||||
|
conflicts=('cato-linux-client')
|
||||||
|
provides=('cato-linux-client')
|
||||||
|
install=cato-client-bin.install
|
||||||
|
|
||||||
|
_deb_url='https://clientdownload.catonetworks.com/public/clients/cato-client-install.deb'
|
||||||
|
|
||||||
|
source=(
|
||||||
|
"cato-client-install.deb::${_deb_url}"
|
||||||
|
cato-client-bin.sysusers
|
||||||
|
cato-client-bin.tmpfiles
|
||||||
|
)
|
||||||
|
noextract=('cato-client-install.deb')
|
||||||
|
sha256sums=(
|
||||||
|
'SKIP'
|
||||||
|
'3c51ce0ebde44edf062e2c9db69c95949ee2031f4e85156f2f401d6e8767f704'
|
||||||
|
'd381f7126126f45ca36e43bd33772bfa0aa6d9cbc9a720e2485fc6061cdd9435'
|
||||||
|
)
|
||||||
|
|
||||||
|
_fetch_deb() {
|
||||||
|
curl -fsSL -o cato-client-install.deb "${_deb_url}"
|
||||||
|
}
|
||||||
|
|
||||||
|
pkgver() {
|
||||||
|
cd "$srcdir"
|
||||||
|
_fetch_deb
|
||||||
|
bsdtar -xf cato-client-install.deb control.tar.xz
|
||||||
|
bsdtar -xOf control.tar.xz control \
|
||||||
|
| awk -F': ' '/^Version:/ { print $2 }' \
|
||||||
|
| sed 's/-release$//'
|
||||||
|
}
|
||||||
|
|
||||||
|
prepare() {
|
||||||
|
cd "$srcdir"
|
||||||
|
_fetch_deb
|
||||||
|
bsdtar -xf cato-client-install.deb
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
bsdtar -xf "${srcdir}/data.tar.xz" -C "${pkgdir}/"
|
||||||
|
|
||||||
|
# Debian layout -> Arch layout
|
||||||
|
mv "${pkgdir}/lib/systemd" "${pkgdir}/usr/lib/"
|
||||||
|
rmdir "${pkgdir}/lib/"
|
||||||
|
|
||||||
|
if [[ -f "${pkgdir}/usr/sbin/cato-clientd" ]]; then
|
||||||
|
install -Dm755 "${pkgdir}/usr/sbin/cato-clientd" "${pkgdir}/usr/bin/cato-clientd"
|
||||||
|
rm -f "${pkgdir}/usr/sbin/cato-clientd"
|
||||||
|
fi
|
||||||
|
|
||||||
|
rmdir "${pkgdir}/usr/sbin" 2>/dev/null || true
|
||||||
|
rmdir "${pkgdir}/usr/local/lib" 2>/dev/null || true
|
||||||
|
|
||||||
|
# usr-merge safe paths in the unit file
|
||||||
|
sed -i \
|
||||||
|
-e 's|/usr/sbin/cato-clientd|/usr/bin/cato-clientd|g' \
|
||||||
|
-e 's|WorkingDirectory=/usr/sbin/|WorkingDirectory=/usr/bin/|g' \
|
||||||
|
"${pkgdir}/usr/lib/systemd/system/cato-client.service"
|
||||||
|
|
||||||
|
# Arch trusts CAs from this path, not update-ca-certificates
|
||||||
|
install -Dm644 \
|
||||||
|
"${pkgdir}/usr/local/share/ca-certificates/CatoNetworksRootCA.crt" \
|
||||||
|
"${pkgdir}/etc/ca-certificates/trust-source/anchors/CatoNetworksRootCA.crt"
|
||||||
|
|
||||||
|
install -Dm644 "${srcdir}/cato-client-bin.sysusers" \
|
||||||
|
"${pkgdir}/usr/lib/sysusers.d/cato-client-bin.conf"
|
||||||
|
install -Dm644 "${srcdir}/cato-client-bin.tmpfiles" \
|
||||||
|
"${pkgdir}/usr/lib/tmpfiles.d/cato-client-bin.conf"
|
||||||
|
}
|
||||||
20
cato-client-bin.install
Normal file
20
cato-client-bin.install
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
post_install() {
|
||||||
|
ldconfig
|
||||||
|
update-ca-trust
|
||||||
|
systemd-sysusers
|
||||||
|
systemd-tmpfiles --create cato-client-bin.conf
|
||||||
|
rm -f /var/run/cato-sdp.i /var/run/cato-sdp.o
|
||||||
|
systemctl daemon-reload
|
||||||
|
systemctl enable cato-client.service
|
||||||
|
systemctl try-restart cato-client.service
|
||||||
|
}
|
||||||
|
|
||||||
|
post_upgrade() {
|
||||||
|
post_install
|
||||||
|
}
|
||||||
|
|
||||||
|
post_remove() {
|
||||||
|
rm -f /var/run/cato-sdp.i /var/run/cato-sdp.o
|
||||||
|
systemctl disable --now cato-client.service 2>/dev/null || true
|
||||||
|
systemctl daemon-reload
|
||||||
|
}
|
||||||
1
cato-client-bin.sysusers
Normal file
1
cato-client-bin.sysusers
Normal file
@@ -0,0 +1 @@
|
|||||||
|
g cato-client -
|
||||||
2
cato-client-bin.tmpfiles
Normal file
2
cato-client-bin.tmpfiles
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
z /usr/bin/cato-clientd 02770 root cato-client
|
||||||
|
z /usr/bin/cato-sdp 02755 root cato-client
|
||||||
Reference in New Issue
Block a user