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