replace lots of manual install commands with INSTALL_* variables
[packages.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 PKG_CAT:=zcat
23
24 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
25 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
26
27 include $(INCLUDE_DIR)/package.mk
28
29 define Package/logrotate
30   SECTION:=utils
31   CATEGORY:=Utilities
32   DEPENDS:=+libpopt
33   TITLE:=rotates, compresses, and mails system logs
34   DESCRIPTION:=\
35         logrotate is designed to ease administration of systems that generate \\\
36         large numbers of log files. It allows auto-matic rotation, compression, \\\
37         removal and mailing of log files. Each log file may be handled daily, \\\
38         weekly, monthly or when it grows too large.
39   URL:=http://packages.debian.org/unstable/admin/logrotate
40 endef
41
42 define Package/logrotate/conffiles
43 /etc/logrotate.conf
44 endef
45
46 define Build/Compile
47         $(call Build/Compile/Default, \
48                 RPM_OPT_FLAGS="\$$$$(EXTRA_CFLAGS)" \
49                 LDFLAGS="\$$$$(EXTRA_LDFLAGS)" \
50                 logrotate \
51         )
52 endef
53
54 define Package/logrotate/install        
55         $(INSTALL_DIR) $(1)/usr/sbin
56         $(CP) ${PKG_BUILD_DIR}/logrotate $(1)/usr/sbin/
57         $(INSTALL_DIR) $(1)/etc
58         $(CP) ./files/logrotate.conf $(1)/etc/
59         $(INSTALL_DIR) $(1)/etc/logrotate.d
60 endef
61
62 $(eval $(call BuildPackage,logrotate))