initial import
This commit is contained in:
35
herbe/PKGBUILD
Normal file
35
herbe/PKGBUILD
Normal file
@@ -0,0 +1,35 @@
|
||||
# Maintainer: Jesus E. <heckyel@riseup.net>
|
||||
|
||||
pkgname=herbe
|
||||
pkgver=1.0.0
|
||||
pkgrel=1
|
||||
epoch=1
|
||||
pkgdesc='Daemon-less notifications, minimal and lightweight.'
|
||||
arch=('i686' 'x86_64')
|
||||
url='https://github.com/dudik/herbe'
|
||||
license=('Expat' 'Public-Domain')
|
||||
depends=('libx11' 'libxft')
|
||||
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/dudik/${pkgname}/archive/${pkgver}.tar.gz"
|
||||
"notify-send")
|
||||
sha512sums=('3f49de25fd92194d1354054c207616343d9c21a9d82c6c4e3316ebc5228c0bd90650621438d14cd4730135f328c0438ef054a2b6843f3bd4d15f9cb47a22df12'
|
||||
'bc6f21bf1e483a9b73bc13a57505c2b964528b30fe02f45c68b57570e3b838fb04e77d407e5b947fa76954f49098bd4dcf6b951c66ba57938ac93eb0c185771d')
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/${pkgname}-${pkgver}"
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/${pkgname}-${pkgver}"
|
||||
make DESTDIR="${pkgdir}" install
|
||||
|
||||
# handling binaries
|
||||
install -d -m0755 "${pkgdir}/usr/bin"
|
||||
mv "${pkgdir}/usr/local/bin/herbe" "${pkgdir}/usr/bin/herbe"
|
||||
rm -rf "${pkgdir}/usr/local/"
|
||||
cp "${srcdir}/notify-send" "${pkgdir}/usr/bin/"
|
||||
chmod +x "${pkgdir}/usr/bin/notify-send"
|
||||
|
||||
# license
|
||||
install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/$pkgname"
|
||||
}
|
||||
81
herbe/notify-send
Normal file
81
herbe/notify-send
Normal file
@@ -0,0 +1,81 @@
|
||||
#!/bin/sh
|
||||
# Shell script to redirect notify-send calls to herbe. The purpose is to ignore
|
||||
# options passed to notify-send.
|
||||
#
|
||||
# Option parser generated by getoptions
|
||||
# URL: https://github.com/ko1nksm/getoptions
|
||||
# LICENSE: Creative Commons Zero v1.0 Universal
|
||||
|
||||
usage() {
|
||||
printf '%s\n' "${0##*/}: notify-send replacement for herbe" "accepts but ignores all notify-send options."
|
||||
}
|
||||
|
||||
REST=''
|
||||
parse() {
|
||||
OPTIND=$(($#+1))
|
||||
while [ $# -gt 0 ] && OPTARG=; do
|
||||
case $1 in
|
||||
--?*=*) OPTARG=$1; shift
|
||||
eval 'set -- "${OPTARG%%\=*}" "${OPTARG#*\=}"' ${1+'"$@"'}
|
||||
;;
|
||||
-[utich]?*) OPTARG=$1; shift
|
||||
eval 'set -- "${OPTARG%"${OPTARG#??}"}" "${OPTARG#??}"' ${1+'"$@"'}
|
||||
;;
|
||||
-[!-]?*) OPTARG=$1; shift
|
||||
eval 'set -- "${OPTARG%"${OPTARG#??}"}" "-${OPTARG#??}"' ${1+'"$@"'}
|
||||
OPTARG= ;;
|
||||
esac
|
||||
case $1 in
|
||||
-u | --urgency)
|
||||
[ $# -le 1 ] && set -- "$1" required && break
|
||||
OPTARG=$2
|
||||
_=$OPTARG
|
||||
shift ;;
|
||||
-t | --expire-time)
|
||||
[ $# -le 1 ] && set -- "$1" required && break
|
||||
OPTARG=$2
|
||||
_=$OPTARG
|
||||
shift ;;
|
||||
-i | --icon)
|
||||
[ $# -le 1 ] && set -- "$1" required && break
|
||||
OPTARG=$2
|
||||
_=$OPTARG
|
||||
shift ;;
|
||||
-c | --category)
|
||||
[ $# -le 1 ] && set -- "$1" required && break
|
||||
OPTARG=$2
|
||||
_=$OPTARG
|
||||
shift ;;
|
||||
-h | --hint)
|
||||
[ $# -le 1 ] && set -- "$1" required && break
|
||||
OPTARG=$2
|
||||
_=$OPTARG
|
||||
shift ;;
|
||||
-? | --help)
|
||||
usage
|
||||
exit 0 ;;
|
||||
--) shift
|
||||
while [ $# -gt 0 ]; do
|
||||
REST="${REST} \"\${$(($OPTIND-$#))}\""
|
||||
shift
|
||||
done
|
||||
break ;;
|
||||
[-]?*) set -- "$1" unknown && break ;;
|
||||
*) REST="${REST} \"\${$(($OPTIND-$#))}\""
|
||||
esac
|
||||
shift
|
||||
done
|
||||
[ $# -eq 0 ] && return 0
|
||||
case $2 in
|
||||
unknown) echo "unrecognized option '$1'" ;;
|
||||
noarg) echo "option '$1' doesn't allow an argument" ;;
|
||||
required) echo "option '$1' requires an argument" ;;
|
||||
pattern) echo "option '$1' does not match the pattern ($3)" ;;
|
||||
*) echo "option '$1' validation error: $2"
|
||||
esac >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
parse "$@"
|
||||
eval set -- "$REST"
|
||||
herbe "$@" &
|
||||
Reference in New Issue
Block a user