add more logrotate mirrors
[openwrt/svn-archive/archive.git] / utils / logrotate / Makefile
1 # Copyright (C) 2006 OpenWrt.org
2 #
3 # This is free software, licensed under the GNU General Public License v2.
4 # See /LICENSE for more information.
5 #
6 # $Id$
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=logrotate
11 PKG_VERSION:=3.7.1
12 PKG_RELEASE:=1
13 PKG_MD5SUM:=552639142e163745f6bcd4f1f3816d8a
14
15 PKG_SOURCE_URL:= \
16 http://ftp.de.debian.org/debian/pool/main/l/logrotate \
17 http://ftp.debian.org/debian/pool/main/l/logrotate \
18 http://ftp.fr.debian.org/debian/pool/main/l/logrotate \
19 http://ftp.us.debian.org/debian/pool/main/l/logrotate
20 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz
21 PKG_CAT:=zcat
22 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
23 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
24
25 include $(INCLUDE_DIR)/package.mk
26
27 define Package/logrotate
28 SECTION:=utils
29 CATEGORY:=Utilities
30 DEPENDS:=+libpopt
31 TITLE:=rotates, compresses, and mails system logs
32 DESCRIPTION:=logrotate is designed to ease administration of systems that generate\\\
33 large numbers of log files. It allows auto-matic rotation, compression,\\\
34 removal, and mailing of log files. Each log file may be handled\\\
35 daily, weekly,monthly, or when it grows too large.\\\
36 URL:=http://packages.debian.org/unstable/admin/logrotate
37 endef
38
39 define Package/logrotate/conffiles
40 /etc/logrotate.conf
41 endef
42
43 define Build/Compile
44 make -C ${PKG_BUILD_DIR} \
45 CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
46 LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
47 CC="$(TARGET_CC)" logrotate
48 endef
49
50 define Package/logrotate/install
51 mkdir -p $(1)/usr/sbin
52 $(CP) ${PKG_BUILD_DIR}/logrotate $(1)/usr/sbin
53 mkdir -p $(1)/etc/logrotate.d
54 $(CP) ./files/logrotate.conf $(1)/etc
55 endef
56
57 $(eval $(call BuildPackage,logrotate))