From: Matteo Croce Date: Mon, 21 Apr 2008 20:46:26 +0000 (+0000) Subject: packaged the atd daemon X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=926c2444632dedfd26de7a64a108867b919aa3ec;p=openwrt%2Fsvn-archive%2Fpackages.git packaged the atd daemon SVN-Revision: 10904 --- diff --git a/utils/at/Makefile b/utils/at/Makefile new file mode 100644 index 000000000..37cc19d81 --- /dev/null +++ b/utils/at/Makefile @@ -0,0 +1,45 @@ +# +# Copyright (C) 2008 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# $Id$ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=at +PKG_VERSION:=3.1.10ubuntu4 + +PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://archive.ubuntu.com/ubuntu/pool/main/a/at +PKG_MD5SUM:=64eec8c9e5a6e16e775ee9efe31b8508 + +include $(INCLUDE_DIR)/package.mk + +define Package/at + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Delayed job execution and batch processing +endef + +define Package/at/description + At and batch read shell commands from standard input + storing them as a job to be scheduled for execution in the + future. +endef + +export SENDMAIL=/bin/true +EXTRA_CFLAGS:=-DNEED_YYWRAP -I$(PKG_BUILD_DIR) +CONFIGURE_ARGS+=--with-daemon_username=nobody --with-daemon_groupname=nogroup + +define Package/at/install + $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/sbin $(1)/etc/init.d/ + $(INSTALL_BIN) ./files/atd.init $(1)/etc/init.d/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/at $(1)/usr/bin + ln -sf at $(1)/usr/bin/atq + ln -sf at $(1)/usr/bin/atrm + $(INSTALL_BIN) $(PKG_BUILD_DIR)/atd $(1)/usr/sbin +endef + +$(eval $(call BuildPackage,at)) diff --git a/utils/at/files/atd.init b/utils/at/files/atd.init new file mode 100755 index 000000000..cdfc14697 --- /dev/null +++ b/utils/at/files/atd.init @@ -0,0 +1,15 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2008 OpenWrt.org +START=50 + +start() { + [ -d /var/spool/cron/atjobs ] || mkdir -p /var/spool/cron/atjobs + [ -d /var/spool/cron/atspool ] || mkdir -p /var/spool/cron/atspool + [ -f /var/spool/cron/atspool ] || > /var/spool/cron/atjobs/.SEQ + chown -R nobody:nogroup /var/spool/cron/atjobs /var/spool/cron/atspool + atd +} + +stop() { + killall atd +} diff --git a/utils/at/patches/100-cross-compile.patch b/utils/at/patches/100-cross-compile.patch new file mode 100644 index 000000000..55dd2ca47 --- /dev/null +++ b/utils/at/patches/100-cross-compile.patch @@ -0,0 +1,11 @@ +--- at-3.1.10ubuntu4/configure 2008-04-21 21:14:40.000000000 +0200 ++++ at-3.1.10ubuntu4/configure 2008-04-21 21:18:09.000000000 +0200 +@@ -1037,7 +1037,7 @@ + echo $ac_n "checking Trying to compile a trivial ANSI C program""... $ac_c" 1>&6 + echo "configure:1039: checking Trying to compile a trivial ANSI C program" >&5 + if test "$cross_compiling" = yes; then +- { echo "configure: error: Could not compile and run even a trivial ANSI C program - check CC." 1>&2; exit 1; } ++ { echo "configure: error: Could not compile and run even a trivial ANSI C program, ignoring as we're cross compiling." 1>&2 ; } + else + cat > conftest.$ac_ext < + #endif + +-#include "lisp.h" +-#include "sysfile.h" /* for encapsulated open, close, read, write */ ++#include ++#include ++#include + + #ifndef HAVE_GETLOADAVG +