Browse Source

add new package rsyslog and dependencies

Waldemar Brodkorb 11 years ago
parent
commit
cd4740237a

+ 27 - 0
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

+ 30 - 0
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

+ 35 - 0
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

+ 20 - 0
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

+ 28 - 0
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 $?

+ 3 - 0
package/rsyslog/files/rsyslog.postinst

@@ -0,0 +1,3 @@
+#!/bin/sh
+. $IPKG_INSTROOT/etc/functions.sh
+add_rcconf rsyslog NO