diff options
author | Asaf Ohaion <asaf@lingnu.com> | 2011-07-03 13:55:45 -0400 |
---|---|---|
committer | Niels Horn <niels.horn@slackbuilds.org> | 2011-07-14 21:54:02 -0300 |
commit | e0f1aa4a109dfaa680f5b82ae313f0059919d568 (patch) | |
tree | 02f8de1b9f16b1e959c4e0371d29fb53c426d1a5 | |
parent | 6aad810e26d431cda35d53ae27e8735607fbe3e4 (diff) | |
download | slackbuilds-e0f1aa4a109dfaa680f5b82ae313f0059919d568.tar.gz |
system/incron: Added (inotify cron system)
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
-rw-r--r-- | system/incron/README | 5 | ||||
-rw-r--r-- | system/incron/fix-compiliation.diff | 57 | ||||
-rw-r--r-- | system/incron/fix-make-install.diff | 60 | ||||
-rw-r--r-- | system/incron/incron.SlackBuild | 76 | ||||
-rw-r--r-- | system/incron/incron.info | 10 | ||||
-rw-r--r-- | system/incron/slack-desc | 19 |
6 files changed, 227 insertions, 0 deletions
diff --git a/system/incron/README b/system/incron/README new file mode 100644 index 0000000000..595d6437ef --- /dev/null +++ b/system/incron/README @@ -0,0 +1,5 @@ +This program is an "inotify cron" system. It consists of +a daemon and a table manipulator. You can use it a similar way +as the regular cron. The difference is that the inotify cron +handles filesystem events rather than time periods. + diff --git a/system/incron/fix-compiliation.diff b/system/incron/fix-compiliation.diff new file mode 100644 index 0000000000..2acfdeffe1 --- /dev/null +++ b/system/incron/fix-compiliation.diff @@ -0,0 +1,57 @@ +diff -uNr incron-0.5.9/appargs.cpp incron-0.5.9_patched/appargs.cpp +--- incron-0.5.9/appargs.cpp 2009-06-21 23:27:24.000000000 +0300 ++++ incron-0.5.9_patched/appargs.cpp 2011-04-06 15:35:32.565888675 +0300 +@@ -22,6 +22,8 @@ + + #include <cstring> + ++#include <stdio.h> ++ + #include "strtok.h" + + #include "appargs.h" +diff -uNr incron-0.5.9/icd-main.cpp incron-0.5.9_patched/icd-main.cpp +--- incron-0.5.9/icd-main.cpp 2009-06-21 23:27:24.000000000 +0300 ++++ incron-0.5.9_patched/icd-main.cpp 2011-04-06 15:32:20.007891134 +0300 +@@ -23,6 +23,7 @@ + #include <errno.h> + #include <sys/poll.h> + #include <sys/stat.h> ++#include <stdio.h> + #include <cstring> + + #include "inotify-cxx.h" +diff -uNr incron-0.5.9/incroncfg.cpp incron-0.5.9_patched/incroncfg.cpp +--- incron-0.5.9/incroncfg.cpp 2009-06-21 23:27:24.000000000 +0300 ++++ incron-0.5.9_patched/incroncfg.cpp 2011-04-06 15:35:04.422890150 +0300 +@@ -181,7 +181,7 @@ + + bool IncronCfg::IsComment(const char* s) + { +- char* sx = strchr(s, '#'); ++ const char* sx = strchr(s, '#'); + if (sx == NULL) + return false; + +diff -uNr incron-0.5.9/inotify-cxx.cpp incron-0.5.9_patched/inotify-cxx.cpp +--- incron-0.5.9/inotify-cxx.cpp 2009-06-21 23:27:24.000000000 +0300 ++++ incron-0.5.9_patched/inotify-cxx.cpp 2011-04-06 15:32:39.878890586 +0300 +@@ -22,6 +22,7 @@ + + #include <errno.h> + #include <unistd.h> ++#include <stdio.h> + #include <fcntl.h> + + #include "inotify-cxx.h" +diff -uNr incron-0.5.9/usertable.cpp incron-0.5.9_patched/usertable.cpp +--- incron-0.5.9/usertable.cpp 2009-06-21 23:27:24.000000000 +0300 ++++ incron-0.5.9_patched/usertable.cpp 2011-04-06 15:33:09.499888673 +0300 +@@ -25,6 +25,7 @@ + #include <unistd.h> + #include <grp.h> + #include <stdlib.h> ++#include <stdio.h> + #include <sys/stat.h> + #include <cstring> + diff --git a/system/incron/fix-make-install.diff b/system/incron/fix-make-install.diff new file mode 100644 index 0000000000..ef197fc3bb --- /dev/null +++ b/system/incron/fix-make-install.diff @@ -0,0 +1,60 @@ +diff -uNr incron-0.5.9/Makefile incron-0.5.9_patched/Makefile +--- incron-0.5.9/Makefile 2009-06-21 23:27:24.000000000 +0300 ++++ incron-0.5.9_patched/Makefile 2011-04-06 18:09:10.661890554 +0300 +@@ -44,33 +44,35 @@ + distclean: clean + + install: all install-man +- [ -d $(PREFIX) ] +- $(INSTALL) -m 04755 -o $(USER) incrontab $(PREFIX)/bin/ +- $(INSTALL) -m 0755 incrond $(PREFIX)/sbin/ +- $(INSTALL) -m 0755 -o $(USER) -d $(USERDATADIR) +- $(INSTALL) -m 0755 -o $(USER) -d $(SYSDATADIR) +- $(INSTALL) -m 0644 -o $(USER) incron.conf.example $(CFGDIR) ++ [ -d $(DESTDIR)$(PREFIX) ] ++ $(INSTALL) -m 0755 -d $(DESTDIR)$(PREFIX)/bin ++ $(INSTALL) -m 0755 -d $(DESTDIR)$(PREFIX)/sbin ++ $(INSTALL) -m 04755 -o $(USER) incrontab $(DESTDIR)$(PREFIX)/bin/ ++ $(INSTALL) -m 0755 incrond $(DESTDIR)$(PREFIX)/sbin/ ++ $(INSTALL) -m 0755 -o $(USER) -d $(DESTDIR)$(USERDATADIR) ++ $(INSTALL) -m 0755 -o $(USER) -d $(DESTDIR)$(SYSDATADIR) ++ $(INSTALL) -m 0644 -o $(USER) incron.conf.example $(DESTDIR)$(CFGDIR) + + install-man: incrontab.1 incrontab.5 incrond.8 incron.conf.5 +- $(INSTALL) -m 0755 -d $(MANPATH)/man1 +- $(INSTALL) -m 0755 -d $(MANPATH)/man5 +- $(INSTALL) -m 0755 -d $(MANPATH)/man8 +- $(INSTALL) -m 0644 incrontab.1 $(MANPATH)/man1 +- $(INSTALL) -m 0644 incrontab.5 $(MANPATH)/man5 +- $(INSTALL) -m 0644 incrond.8 $(MANPATH)/man8 +- $(INSTALL) -m 0644 incron.conf.5 $(MANPATH)/man5 ++ $(INSTALL) -m 0755 -d $(DESTDIR)$(MANPATH)/man1 ++ $(INSTALL) -m 0755 -d $(DESTDIR)$(MANPATH)/man5 ++ $(INSTALL) -m 0755 -d $(DESTDIR)$(MANPATH)/man8 ++ $(INSTALL) -m 0644 incrontab.1 $(DESTDIR)$(MANPATH)/man1 ++ $(INSTALL) -m 0644 incrontab.5 $(DESTDIR)$(MANPATH)/man5 ++ $(INSTALL) -m 0644 incrond.8 $(DESTDIR)$(MANPATH)/man8 ++ $(INSTALL) -m 0644 incron.conf.5 $(DESTDIR)$(MANPATH)/man5 + + uninstall: uninstall-man +- [ -d $(PREFIX) ] +- rm -f $(PREFIX)/bin/incrontab +- rm -f $(PREFIX)/sbin/incrond +- rm -f $(CFGDIR)/incron.conf.example ++ [ -d $(DESTDIR)$(PREFIX) ] ++ rm -f $(DESTDIR)$(PREFIX)/bin/incrontab ++ rm -f $(DESTDIR)$(PREFIX)/sbin/incrond ++ rm -f $(DESTDIR)$(CFGDIR)/incron.conf.example + + uninstall-man: +- rm -f $(MANPATH)/man1/incrontab.1 +- rm -f $(MANPATH)/man5/incrontab.5 +- rm -f $(MANPATH)/man8/incrond.8 +- rm -f $(MANPATH)/man5/incron.conf.5 ++ rm -f $(DESTDIR)$(MANPATH)/man1/incrontab.1 ++ rm -f $(DESTDIR)$(MANPATH)/man5/incrontab.5 ++ rm -f $(DESTDIR)$(MANPATH)/man8/incrond.8 ++ rm -f $(DESTDIR)$(MANPATH)/man5/incron.conf.5 + + update: uninstall install + diff --git a/system/incron/incron.SlackBuild b/system/incron/incron.SlackBuild new file mode 100644 index 0000000000..d28075e4dc --- /dev/null +++ b/system/incron/incron.SlackBuild @@ -0,0 +1,76 @@ +#!/bin/sh + +# Slackware build script for incrond + +# Written by Asaf Ohaion asaf@lingnu.com + +PRGNAM=incron +VERSION=${VERSION:-0.5.9} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 +cd $PRGNAM-$VERSION +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +patch -p1 < $CWD/fix-compiliation.diff +patch -p1 < $CWD/fix-make-install.diff + +make PREFIX=/usr +make install DESTDIR=$PKG PREFIX=/usr MANPATH=/usr/man + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +find $PKG/usr/man -type f -exec gzip -9 {} \; +for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + doc/html CHANGELOG COPYING README LICENSE-* TODO VERSION \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/system/incron/incron.info b/system/incron/incron.info new file mode 100644 index 0000000000..97c453a036 --- /dev/null +++ b/system/incron/incron.info @@ -0,0 +1,10 @@ +PRGNAM="incron" +VERSION="0.5.9" +HOMEPAGE="http://inotify.aiken.cz" +DOWNLOAD="http://inotify.aiken.cz/download/incron/incron-0.5.9.tar.bz2" +MD5SUM="ccae2ca5cb4b142be002ab482250fb5f" +DOWNLOAD_x86_64="http://inotify.aiken.cz/download/incron/incron-0.5.9.tar.bz2" +MD5SUM_x86_64="ccae2ca5cb4b142be002ab482250fb5f" +MAINTAINER="Asaf Ohaion" +EMAIL="asaf@lingnu.com" +APPROVED="dsomero" diff --git a/system/incron/slack-desc b/system/incron/slack-desc new file mode 100644 index 0000000000..ba45b06ab1 --- /dev/null +++ b/system/incron/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +incron: incron (inotify cron system) +incron: +incron: This program is an "inotify cron" system. It consists of +incron: a daemon and a table manipulator. You can use it a similar way +incron: as the regular cron. The difference is that the inotify cron +incron: handles filesystem events rather than time periods. +incron: +incron: +incron: +incron: +incron: |