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