diff options
author | specter119 | 2022-04-05 20:25:13 +0800 |
---|---|---|
committer | specter119 | 2022-04-05 20:25:13 +0800 |
commit | 2c14e497bb74ef97f1632b7f193d5171fd42f70e (patch) | |
tree | df268e8d78badba536e36499841cb0286d5be929 /PKGBUILD | |
parent | bc9eeb475b3c171a96fa0c5f5501a8c48a141e9d (diff) | |
download | aur-2c14e497bb74ef97f1632b7f193d5171fd42f70e.tar.gz |
v 4.1.1 with fix
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 71 |
1 files changed, 26 insertions, 45 deletions
@@ -1,51 +1,32 @@ -# Maintainer: Berturion <berturion@free.fr> +# Maintainer: Specter119 <spcter119 AT gmail.com> +# Contributor: Berturion@free.fr> pkgname=switchhosts-bin -pkgver=3.5.4 -pkgrel=5517 -pkgdesc="Switch hosts quickly!" -arch=('x86_64') -url="https://oldj.github.io/SwitchHosts" -license=("MIT") +pkgver=4.1.1 +pkgrel=1 +pkgdesc='Switch hosts quickly!' +arch=(x86_64) +url=https://github.com/oldj/SwitchHosts +license=(MIT) options=(!strip) -depends=("desktop-file-utils") -makedepends=("imagemagick") -source=( - 'https://github.com/oldj/SwitchHosts/releases/download/v3.5.4/SwitchHosts._linux_x64_3.5.4.5517.zip' - 'https://raw.githubusercontent.com/oldj/SwitchHosts/master/app/assets/logo@512w.png' - 'switchhosts-bin.install' - 'switchhosts-bin.desktop' -) -sha256sums=( - 'c18e055e62a4509cbcf7e3b053783e45278e5bc26deb764d9b0c4c24f0b84e88' - 'b5ade225a7428f195babb47e3cf4760467b0514cca18f477011b339a7af9b685' - '9fe12f1bc573f5d431fcc8f9ca3ed17fc1e1d30248ae3b58209fc53084ae0a4e' - '7b17a4bd74b5652dae1d92054ca153e64b51e7271bf7ded0488d1f0aa8e2782c' -) -rm_src_files=( - 'SwitchHosts._linux_x64_3.5.4.5517.zip' - 'logo@512w.png' +depends=( + gtk3 + libnotify + nss + libxss + libxtst + xdg-utils + at-spi2-core + util-linux-libs + libsecret ) +optdepends=(libappindicator-gtk3) +source=($url/releases/download/v4.1.1/SwitchHosts_linux_amd64_4.1.1.6077.deb) +sha256sums=('1793245d257818e0a29ab4ea1481af06f56fbbefc96981f9f3b2eb77755ffb67') + package() { - install -dm755 "$pkgdir/"{opt,usr/bin} - cp -r "${srcdir}" "${pkgdir}/opt/${pkgname}" - # remove useless source files - for rm_src_file in ${rm_src_files[*]} ; do - rm "${pkgdir}/opt/${pkgname}/${rm_src_file}" - done - ln -s "/opt/${pkgname}/switchhosts" "$pkgdir/usr/bin/switchhosts" - install -Dm644 ${srcdir}/${pkgname}.desktop "$pkgdir"/usr/share/applications/${pkgname}.desktop - # icons generation - mkdir -p "icons" - cd "icons" - mv ${srcdir}/logo@512w.png logo_icon.png - convert -background transparent logo_icon.png -define icon:auto-resize=16,32,48,64,128,256 app.ico - convert app.ico logo_icon.png - # icons installation - sizes=(16 32 48 64 128 256) - for i in 0 1 2 3 4 ; do - install -d "${pkgdir}/usr/share/icons/hicolor/${sizes[$i]}x${sizes[$i]}/apps" - install -Dm644 "logo_icon-${i}.png" \ - "${pkgdir}/usr/share/icons/hicolor/${sizes[$i]}x${sizes[$i]}/apps/${pkgname}.png" - done + bsdtar -xf $srcdir/data.tar.xz -C $pkgdir + mkdir -p $pkgdir/usr/share/pixmaps/ + mv $pkgdir/usr/share/{icons/hicolor/0x0/apps,pixmaps}/switchhosts.png + rm -rf $pkgdir/usr/share/icons } |