PKGNAME=wicd

repo_info() {
    echo
    echo "============================="
    echo "You can download the package in repo:"
    echo "[home_alextalker_aur_Arch_Extra]"
    echo "SigLevel = Never"
    echo 'Server = http://download.opensuse.org/repositories/home:/alextalker:/aur/Arch_Extra/$arch'
    echo "============================="
}

pre_remove () {
    for pyo in $(pacman -Qql $PKGNAME  | grep \.py$ | sed 's|.py$|.pyo|g'); do
        if [ -f "$pyo" ]; then
            rm "$pyo"
        fi
    done
}

post_install() {
  repo_info
  echo "==> You need to restart the dbus service after "
  echo "==> upgrading wicd."
  echo "==> Disable networkmanager, dhcpcd or other networking " 
  echo "==> utility and add 'wicd' to your systemd configuration."
  echo
  echo "==> To run: wicd-cli or wicd-curses"    
}

post_upgrade() {
    repo_info
}
