summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2014-05-28 10:24:47 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2014-05-28 10:24:47 +0200
commitcd4740237a8257dde31ace29230f5544aa130328 (patch)
tree02b7130c9c219dd0b8e7c58414f5c98a02994d12
parentaac657a90afe72d3e4ff1e7dbbcdbd236e0ba586 (diff)
add new package rsyslog and dependencies
-rw-r--r--package/libestr/Makefile27
-rw-r--r--package/liblogging/Makefile30
-rw-r--r--package/rsyslog/Makefile35
-rw-r--r--package/rsyslog/files/rsyslog.conf20
-rw-r--r--package/rsyslog/files/rsyslog.init28
-rw-r--r--package/rsyslog/files/rsyslog.postinst3
6 files changed, 143 insertions, 0 deletions
diff --git a/package/libestr/Makefile b/package/libestr/Makefile
new file mode 100644
index 000000000..3ed7bce13
--- /dev/null
+++ b/package/libestr/Makefile
@@ -0,0 +1,27 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:= libestr
+PKG_VERSION:= 0.1.9
+PKG_RELEASE:= 1
+PKG_MD5SUM:= 681ca0ed7e5ae6ddff70fdec413096e4
+PKG_DESCR:= some essentials for string handling
+PKG_SECTION:= libs
+PKG_URL:= http://libestr.adiscon.com/
+PKG_SITES:= http://libestr.adiscon.com/files/download/
+PKG_OPTS:= dev
+
+DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.gz
+
+include $(TOPDIR)/mk/package.mk
+
+$(eval $(call PKG_template,LIBESTR,libestr,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
+
+libestr-install:
+ $(INSTALL_DIR) $(IDIR_LIBESTR)/usr/lib
+ $(CP) $(WRKINST)/usr/lib/libestr*.so* \
+ $(IDIR_LIBESTR)/usr/lib
+
+include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/liblogging/Makefile b/package/liblogging/Makefile
new file mode 100644
index 000000000..c9bdb50cf
--- /dev/null
+++ b/package/liblogging/Makefile
@@ -0,0 +1,30 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:= liblogging
+PKG_VERSION:= 1.0.4
+PKG_RELEASE:= 1
+PKG_MD5SUM:= 034083ef1424a566fdeefc56a719691f
+PKG_DESCR:= standard logging library
+PKG_SECTION:= libs
+PKG_URL:= http://www.liblogging.org/
+PKG_SITES:= http://download.rsyslog.com/liblogging/
+PKG_OPTS:= dev
+
+DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.gz
+
+include $(TOPDIR)/mk/package.mk
+
+$(eval $(call PKG_template,LIBLOGGING,liblogging,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
+
+CONFIGURE_ARGS+= --disable-man-pages \
+ --disable-journal
+
+liblogging-install:
+ $(INSTALL_DIR) $(IDIR_LIBLOGGING)/usr/lib
+ $(CP) $(WRKINST)/usr/lib/liblogging*.so* \
+ $(IDIR_LIBLOGGING)/usr/lib
+
+include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/rsyslog/Makefile b/package/rsyslog/Makefile
new file mode 100644
index 000000000..cf421068a
--- /dev/null
+++ b/package/rsyslog/Makefile
@@ -0,0 +1,35 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:= rsyslog
+PKG_VERSION:= 8.2.1
+PKG_RELEASE:= 1
+PKG_MD5SUM:= be8c0117e29b6a0313a3b8148f562e07
+PKG_DESCR:= syslog daemon
+PKG_SECTION:= misc
+PKG_BUILDDEP:= libestr liblogging json-c util-linux zlib
+PKG_BUILDDEP+= ncurses
+PKG_DEPENDS:= libestr liblogging json-c libuuid zlib
+PKG_DEPENDS+= libpthread librt libncurses
+PKG_URL:= http://www.rsyslog.com/
+PKG_SITES:= http://www.rsyslog.com/files/download/rsyslog/
+
+DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.gz
+
+include $(TOPDIR)/mk/package.mk
+
+$(eval $(call PKG_template,RSYSLOG,rsyslog,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+
+rsyslog-install:
+ $(INSTALL_DIR) $(IDIR_RSYSLOG)/etc
+ $(CP) ./files/rsyslog.conf $(IDIR_RSYSLOG)/etc
+ $(INSTALL_DIR) $(IDIR_RSYSLOG)/usr/lib/rsyslog
+ $(CP) $(WRKINST)/usr/lib/rsyslog/*.so \
+ $(IDIR_RSYSLOG)/usr/lib/rsyslog
+ $(INSTALL_DIR) $(IDIR_RSYSLOG)/usr/sbin
+ $(INSTALL_BIN) $(WRKINST)/usr/sbin/rsyslogd \
+ $(IDIR_RSYSLOG)/usr/sbin
+
+include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/rsyslog/files/rsyslog.conf b/package/rsyslog/files/rsyslog.conf
new file mode 100644
index 000000000..1a32d68ce
--- /dev/null
+++ b/package/rsyslog/files/rsyslog.conf
@@ -0,0 +1,20 @@
+$ModLoad imuxsock # provides support for local system logging
+$ModLoad imklog # provides kernel logging support
+
+# provides UDP syslog reception
+#$ModLoad imudp
+#$UDPServerRun 514
+
+# provides TCP syslog reception
+#$ModLoad imtcp
+#$InputTCPServerRun 514
+
+$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
+$FileOwner root
+$FileGroup adm
+$FileCreateMode 0640
+$DirCreateMode 0755
+$Umask 0022
+$WorkDirectory /var/spool/rsyslog
+
+*.* -/var/log/messages
diff --git a/package/rsyslog/files/rsyslog.init b/package/rsyslog/files/rsyslog.init
new file mode 100644
index 000000000..78b9831c0
--- /dev/null
+++ b/package/rsyslog/files/rsyslog.init
@@ -0,0 +1,28 @@
+#!/bin/sh
+#PKG rsyslog
+#INIT 05
+. /etc/rc.conf
+
+case $1 in
+autostop) ;;
+autostart)
+ test x"${rsyslog:-NO}" = x"NO" && exit 0
+ test x"$rsyslog" = x"DAEMON" && test -x /bin/mksh && exec mksh -T- $0 start
+ exec sh $0 start
+ ;;
+start)
+ [ -d /var/spool/rsyslog ] || mkdir -p /var/spool/rsyslog
+ /usr/sbin/rsyslogd
+ ;;
+stop)
+ kill $(pgrep -f /usr/sbin/rsyslogd)
+ ;;
+restart)
+ sh $0 stop
+ sh $0 start
+ ;;
+*)
+ echo "usage: $0 {start | stop | restart}"
+ ;;
+esac
+exit $?
diff --git a/package/rsyslog/files/rsyslog.postinst b/package/rsyslog/files/rsyslog.postinst
new file mode 100644
index 000000000..074abc34e
--- /dev/null
+++ b/package/rsyslog/files/rsyslog.postinst
@@ -0,0 +1,3 @@
+#!/bin/sh
+. $IPKG_INSTROOT/etc/functions.sh
+add_rcconf rsyslog NO