Makefile 1.61 KB
Newer Older
1
#
2
## Copyright (C) 2013 CZ.NIC z.s.p.o. (http://www.nic.cz/)
3 4 5 6 7 8 9 10
#
## This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
# #
#
include $(TOPDIR)/rules.mk

PKG_NAME:=vixie-cron
11
PKG_VERSION:=7
Karel Koci's avatar
Karel Koci committed
12
PKG_RELEASE:=3
13 14 15 16
PKG_SOURCE_URL:=ftp://ftp.isc.org/isc/cron/
PKG_SOURCE_VERSION:=4.1
PKG_SOURCE:=cron_$(PKG_SOURCE_VERSION).shar
PKG_SOURCE_SUBDIR:=$(PKG_NAME)
17
PKG_MAINTAINER:=CZ.NIC <packaging@turris.cz>
18 19 20 21
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)

include $(INCLUDE_DIR)/package.mk

22 23
define Package/$(PKG_NAME)
	TITLE:=$(PKG_NAME)
24
	DEPENDS:= +syslog-ng3 @(!BUSYBOX_CONFIG_CROND&&!BUSYBOX_CONFIG_CRONTAB)
Karel Koci's avatar
Karel Koci committed
25
	PROVIDES:=cron
26 27 28 29 30 31 32 33
endef

define Build/Prepare
	(cp $(DL_DIR)/$(PKG_SOURCE) $(PKG_BUILD_DIR)/$(PKG_SOURCE); cd $(PKG_BUILD_DIR); /bin/sh $(PKG_SOURCE) );
	patch -p1 -d $(PKG_BUILD_DIR) < $(PATCH_DIR)/001*
	patch -p1 -d $(PKG_BUILD_DIR) < $(PATCH_DIR)/002*
endef

34
define Package/$(PKG_NAME)/postinst
35
#!/bin/sh
36 37 38 39
[ -n "$$IPKG_INSTROOT" ] || {
/etc/init.d/cron enable
/etc/init.d/cron restart
}
40 41
endef

42
define Package/$(PKG_NAME)/prerm
43 44 45 46 47
#!/bin/sh
/etc/init.d/cron disable
/etc/init.d/cron stop
endef

48
define Package/$(PKG_NAME)/install
49 50 51 52 53 54
	$(INSTALL_DIR) $(1)/usr/bin
	$(INSTALL_DIR) $(1)/usr/sbin
	$(INSTALL_DIR) $(1)/etc/init.d
	$(INSTALL_BIN) ./files/cron.init $(1)/etc/init.d/cron
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/cron  $(1)/usr/sbin
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/crontab  $(1)/usr/bin
55 56 57 58
	$(INSTALL_DIR) $(1)/etc/cron.d
	$(INSTALL_CONF) ./files/.keep $(1)/etc/cron.d/.keep
	$(INSTALL_DIR) $(1)/etc/crontabs
	$(INSTALL_CONF) ./files/.keep $(1)/etc/crontabs/.keep
59 60
endef

61
$(eval $(call BuildPackage,$(PKG_NAME)))