Package Details: switchhosts-bin 3.5.4-5517

Git Clone URL: https://aur.archlinux.org/switchhosts-bin.git (read-only, click to copy)
Package Base: switchhosts-bin
Description: Switch hosts quickly!
Upstream URL: https://oldj.github.io/SwitchHosts
Keywords: adblock development hosts utility
Licenses: MIT
Submitter: dsa
Maintainer: berturion
Last Packager: berturion
Votes: 5
Popularity: 0.000161
First Submitted: 2017-07-24 04:49
Last Updated: 2020-04-26 05:09

Latest Comments

berturion commented on 2020-04-11 11:48

Here is a working PKGBUILD providing the latest version (v3.5.4). I get a white window the first time I open it but after minimizing and restoring the window, the content appears. I also have a problem with the icon in the application menu. I will try to fix those little things (at least the icons) and maybe provide a new AUR package if someone is interested. Personnaly, I love this software and I can't find good enough alternatives.

pkgname=switchhosts-bin
pkgver=3.5.4
pkgrel=5517
pkgdesc="Switch hosts quickly!"
arch=('any')
url="https://oldj.github.io/SwitchHosts"
license=("MIT")
options=(!strip)
depends=("gconf" "gtk2" "libnotify" "libxtst" "nss" "python2" "xdg-utils" "desktop-file-utils" "alsa-lib")
makedepends=("imagemagick" "npm")

source=(
    "https://github.com/oldj/SwitchHosts/releases/download/v${pkgver}/SwitchHosts._linux_x64_${pkgver}.${pkgrel}.zip"
    "https://raw.githubusercontent.com/oldj/SwitchHosts/master/app/assets/logo@512w.png"
    "${pkgname}.install"
    "${pkgname}.desktop"
)

md5sums=('bd23ba93ba19ed1377e0bd36f6f9376b'
         '06eb97a4b5b5ddf7a06841e01d5562eb'
         '0b6211b511da48346cecdc1d2f963c76'
         '30df36e53ef2d815a2c2395f0378f9bb')

package() {
    install -dm755 "$pkgdir/"{opt,usr/bin}
    cp -r "${srcdir}" "${pkgdir}/opt/${pkgname}"
    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
}

cjj25 commented on 2019-09-11 00:48

Please update the PKGBUILD

Maintainer: Douglas Soares de Andrade douglas@archlinux.org

pkgname=switchhosts-bin pkgver=3.5.0 pkgrel=5287 pkgdesc="Switch hosts quickly!" arch=('any') url="https://oldj.github.io/SwitchHosts" license=("MIT") options=(!strip) depends=("gconf" "gtk2" "libnotify" "libxtst" "nss" "python2" "xdg-utils" "desktop-file-utils" "alsa-lib") makedepends=("imagemagick" "npm")

source=( "https://github.com/oldj/SwitchHosts/releases/download/v3.5.0/SwitchHosts._linux_x64_3.5.0.5486.zip" "https://raw.githubusercontent.com/oldj/SwitchHosts/master/assets/app.ico" "${pkgname}.install" "${pkgname}.desktop" )

md5sums=('c051e239ce81a89d22b14c099c1afd66' '88fe4a72cf9630119dd512c91b54edd9' '0b6211b511da48346cecdc1d2f963c76' '30df36e53ef2d815a2c2395f0378f9bb')

package() { install -dm755 "$pkgdir/"{opt,usr/bin} cp -r "${srcdir}" "${pkgdir}/opt/${pkgname}" ln -s "/opt/${pkgname}/switchhosts" "$pkgdir/usr/bin/switchhosts" install -Dm644 ${srcdir}/${pkgname}.desktop "$pkgdir"/usr/share/applications/${pkgname}.desktop mkdir -p "icons" cd "icons" convert ${srcdir}/app.ico logo_icon.png cd - sizes=(256x256 128x128 48x48 32x32 16x16) for i in 0 1 2 3 4 5 ; do install -d "${pkgdir}/usr/share/icons/hicolor/${sizes[$i]}/apps" install -Dm644 "icons/logo_icon-${i}.png" \ "${pkgdir}/usr/share/icons/hicolor/${sizes[$i]}/apps/${pkgname}.png" done

berturion commented on 2018-10-03 07:40

Hello, can you please update this AUR package? Last version is 3.3.12 (2018-07-09). Thanks.