summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO17
-rwxr-xr-x.install99
-rw-r--r--PKGBUILD31
3 files changed, 147 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..13aa8706b3b
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = fnotify
+ pkgdesc = irssi plugin to notify discussions over desktop
+ pkgver = 0.0.4
+ pkgrel = 2
+ url = http://www.mtroy.net
+ install = .install
+ arch = any
+ license = GPL2
+ depends = perl
+ depends = irssi,
+ depends = xfce4-notifyd
+ source = fnotify-0.0.4.tar.gz::http://pkg.helios.so:44000/src/fnotify-0.0.4.tar.gz
+ validpgpkeys = CE8D66E2FBEE8306
+ sha512sums = cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e
+
+pkgname = fnotify
+
diff --git a/.install b/.install
new file mode 100755
index 00000000000..00e7c6b3d07
--- /dev/null
+++ b/.install
@@ -0,0 +1,99 @@
+USER=$([[ `id -u` = 0 ]] && echo "$SUDO_USER" || echo "$USER")
+#$(( $UID == 0 ? $SUDO_SER : $USER ))
+
+ENDPATH=/home/$USER/.irssi/scripts
+NAME=fnotify
+BIN=fnotify.pl
+VER=0.0.4
+
+
+
+post_install() {
+
+USER=$([[ `id -u` = 0 ]] && echo "$SUDO_USER" || echo "$USER")
+#$(( $UID == 0 ? $SUDO_SER : $USER ))
+
+ENDPATH=/home/$USER/.irssi/scripts
+NAME=fnotify
+BIN=fnotify.pl
+VER=0.0.4
+
+cp /usr/share/irssi/scripts/$BIN $ENDPATH
+cd $ENDPATH
+
+if [ ! -d autorun ];
+then
+ mkdir autorun && cd autorun
+else
+ cd autorun
+fi
+
+ln -sf $ENDPATH/$BIN .
+cd $ENDPATH
+chown -R $USER: $BIN autorun
+
+
+
+cls=$(tput cols);
+bar=$(($cls-12));
+#bar=$(($cls*80/100));
+#bor=$(($cls-$bar/2));
+#bar=$(yes "20 " | head -n $cls | tr '\n' ' ')
+
+#cls=$(printf "20 %.0s" {1..40})
+#cls=$(printf "%-${cls}s" "20 ")
+#echo "${s// /*}"
+
+#echo $(seq -s'20 ' 1 $cls)
+
+#for i in {16..21} $(printf "20 %.0s" {1..50}) {21..16};
+for i in {16..21} $(yes "20 " 2>/dev/null | head -n $bar | tr '\n' ' ') {21..16};
+do
+ echo -en "\e[38;5;${i}m§\e[0m";
+done;
+echo
+
+banner="$(tr '[:lower:]' '[:upper:]' <<< ${NAME:0:1})${NAME:1}-$VER successfully installed !"
+printf "\e[104m%*s\e[104m\n\e[49m" $[$cls/2+15] "$banner"
+#echo -e "\e[104mInstall successfull\e[49m"
+
+for i in {16..21} $(yes "20 " 2>/dev/null | head -n $bar | tr '\n' ' ') {21..16};
+do
+ echo -en "\e[38;5;${i}m§\e[0m";
+done;
+echo
+
+cat << EOF
+
+Plugin is now linked in autorun config of irssi.
+
+Note:
+If script is not active during irc instance, you may load it manually like:
+ /script load $NAME
+
+And check if its loaded correctly (list all running scripts)
+ /script load
+
+EOF
+}
+
+
+post_upgrade() {
+ post_install $1
+}
+
+
+post_remove() {
+
+USER=$([[ `id -u` = 0 ]] && echo "$SUDO_USER" || echo "$USER")
+#$(( $UID == 0 ? $SUDO_SER : $USER ))
+
+ENDPATH=/home/$USER/.irssi/scripts
+NAME=fnotify
+BIN=fnotify.pl
+VER=0.0.4
+
+
+ rm $ENDPATH/$NAME.pl
+ rm $ENDPATH/autorun/$NAME.pl
+}
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..5be5789cd65
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,31 @@
+# Maintainer: MTroy <mtroy[at]helios[dot]so>
+# Contributor:
+
+pkgname=fnotify
+pkgver=0.0.4
+pkgrel=2
+pkgdesc="irssi plugin to notify discussions over desktop"
+url="http://www.mtroy.net"
+arch=('any')
+license=('GPL2')
+install=.install
+depends=('perl' 'irssi', 'xfce4-notifyd')
+source=(${pkgname}-${pkgver}.tar.gz::http://pkg.helios.so:44000/src/${pkgname}-${pkgver}.tar.gz)
+sha512sums=('cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e')
+validpgpkeys=('CE8D66E2FBEE8306')
+
+#build() {
+
+#}
+
+package() {
+
+# cd "$srcdir/$pkgname-$pkgver"
+# cd "$pkgname-$pkgver"
+# cd ${srcdir}
+
+ mkdir -p "$pkgdir/usr/share/irssi/scripts"
+ install -D -m755 $srcdir/usr/share/irssi/scripts/$pkgname.pl $pkgdir/usr/share/irssi/scripts/
+}
+
+