* import from oldpackages * version bump, update hash * add PKG_LICENSE and PKG_LICENSE_FILES * update patches Signed-off-by: Phil Eichinger <phil@zankapfel.net>lilik-openwrt-22.03
@ -0,0 +1,59 @@ | |||||
# | |||||
# Copyright (C) 2008-2015 OpenWrt.org | |||||
# | |||||
# This is free software, licensed under the GNU General Public License v2. | |||||
# See /LICENSE for more information. | |||||
# | |||||
include $(TOPDIR)/rules.mk | |||||
PKG_NAME:=at | |||||
PKG_VERSION:=3.1.16 | |||||
PKG_RELEASE:=1 | |||||
PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz | |||||
PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/a/at | |||||
PKG_MD5SUM:=d05da75d9b75d93917ffb16ab48b1e19 | |||||
PKG_LICENSE:=GPL-2.0+ GPL-3.0+ ISC | |||||
PKG_LICENSE_FILES:=COPYING Copyright | |||||
PKG_MAINTAINER:=Phil Eichinger <phil@zankapfel.net> | |||||
include $(INCLUDE_DIR)/package.mk | |||||
define Package/at | |||||
SECTION:=utils | |||||
CATEGORY:=Utilities | |||||
DEPENDS:=+libelf1 | |||||
TITLE:=Delayed job execution and batch processing | |||||
URL:=http://packages.debian.org/stable/at | |||||
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) \ | |||||
$(TARGET_LDFLAGS) | |||||
CONFIGURE_ARGS+=--prefix=/usr \ | |||||
--with-daemon_username=nobody \ | |||||
--with-daemon_groupname=nogroup \ | |||||
--with-jobdir=/var/spool/cron/atjobs \ | |||||
--with-atspool=/var/spool/cron/atspool | |||||
CONFIGURE_VARS += \ | |||||
ac_cv_header_security_pam_appl_h=no | |||||
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/atd | |||||
$(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)) |
@ -0,0 +1,23 @@ | |||||
#!/bin/sh /etc/rc.common | |||||
# Copyright (C) 2011 OpenWrt.org | |||||
START=50 | |||||
SERVICE_USE_PID=1 | |||||
start() { | |||||
[ -d /var/spool/cron/atjobs ] || { | |||||
mkdir -m 0755 -p /var/spool/cron/atjobs | |||||
touch /var/spool/cron/atjobs/.SEQ | |||||
chown -R nobody:nogroup /var/spool/cron/atjobs | |||||
} | |||||
[ -d /var/spool/cron/atspool ] || { | |||||
mkdir -m 0755 -p /var/spool/cron/atspool | |||||
chown -R nobody:nogroup /var/spool/cron/atspool | |||||
} | |||||
service_start /usr/sbin/atd | |||||
} | |||||
stop() { | |||||
service_stop /usr/sbin/atd | |||||
} |
@ -0,0 +1,59 @@ | |||||
From 7f811d9c4ebc9444e613e251c31d6bf537a24dc1 Mon Sep 17 00:00:00 2001 | |||||
From: Khem Raj <raj.khem@gmail.com> | |||||
Date: Mon, 13 Apr 2015 16:35:30 -0700 | |||||
Subject: [PATCH] remove glibc assumption | |||||
glibc time.h header has an undocumented __isleap macro | |||||
that we are using anf musl is missing it. | |||||
Since it is undocumented & does not appear | |||||
on any other libc, stop using it and just define the macro in | |||||
locally instead. | |||||
Upstream-Status: Pending | |||||
Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||||
[patch from: http://patchwork.openembedded.org/patch/91893/ ] | |||||
Signed-off-by: Phil Eichinger <phil@zankapfel.net> | |||||
--- | |||||
parsetime.y | 11 +++++++---- | |||||
1 file changed, 7 insertions(+), 4 deletions(-) | |||||
diff --git a/parsetime.y b/parsetime.y | |||||
index 7005e88..324e6d3 100644 | |||||
--- a/parsetime.y | |||||
+++ b/parsetime.y | |||||
@@ -8,6 +8,9 @@ | |||||
#define YYDEBUG 1 | |||||
+#define is_leap_year(y) \ | |||||
+ ((y) % 4 == 0 && ((y) % 100 != 0 || (y) % 400 == 0)) | |||||
+ | |||||
struct tm exectm; | |||||
static int isgmt; | |||||
static int yearspec; | |||||
@@ -217,8 +220,8 @@ date : month_name day_number | |||||
mnum == 12) && dnum > 31) | |||||
|| ((mnum == 4 || mnum == 6 || mnum == 9 || | |||||
mnum == 11) && dnum > 30) | |||||
- || (mnum == 2 && dnum > 29 && __isleap(ynum+1900)) | |||||
- || (mnum == 2 && dnum > 28 && !__isleap(ynum+1900)) | |||||
+ || (mnum == 2 && dnum > 29 && is_leap_year(ynum+1900)) | |||||
+ || (mnum == 2 && dnum > 28 && !is_leap_year(ynum+1900)) | |||||
) | |||||
{ | |||||
yyerror("Error in day of month"); | |||||
@@ -261,8 +264,8 @@ date : month_name day_number | |||||
mnum == 12) && dnum > 31) | |||||
|| ((mnum == 4 || mnum == 6 || mnum == 9 || | |||||
mnum == 11) && dnum > 30) | |||||
- || (mnum == 2 && dnum > 29 && __isleap(ynum+1900)) | |||||
- || (mnum == 2 && dnum > 28 && !__isleap(ynum+1900)) | |||||
+ || (mnum == 2 && dnum > 29 && is_leap_year(ynum+1900)) | |||||
+ || (mnum == 2 && dnum > 28 && !is_leap_year(ynum+1900)) | |||||
) | |||||
{ | |||||
yyerror("Error in day of month"); | |||||
-- | |||||
2.1.4 | |||||
@ -0,0 +1,14 @@ | |||||
--- a/getloadavg.c | |||||
+++ b/getloadavg.c | |||||
@@ -69,8 +69,9 @@ Boston, MA 02110-1301 USA */ | |||||
#include <config.h> | |||||
#endif | |||||
-#include "lisp.h" | |||||
-#include "sysfile.h" /* for encapsulated open, close, read, write */ | |||||
+#include <sys/types.h> | |||||
+#include <sys/stat.h> | |||||
+#include <fcntl.h> | |||||
#ifndef HAVE_GETLOADAVG | |||||