add quotes to TARGET_CC and TARGET_CROSS to help with distcc and ccache (yet again)
[packages.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:=http://ftp.debian.org/debian/pool/main/l/logrotate
16 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz
17 PKG_CAT:=zcat
18 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
19 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/logrotate
24   SECTION:=utils
25   CATEGORY:=Utilities
26   DEPENDS:=+libpopt
27   TITLE:=rotates, compresses, and mails system logs
28   DESCRIPTION:=logrotate  is  designed to ease administration of systems that generate\\\
29 large numbers of log files.  It allows auto-matic rotation, compression,\\\
30 removal, and mailing of log files. Each  log  file  may  be  handled\\\
31 daily,  weekly,monthly, or when it grows too large.\\\
32   URL:=http://packages.debian.org/unstable/admin/logrotate
33 endef
34
35 define Package/logrotate/conffiles
36 /etc/logrotate.conf
37 endef
38
39 define Build/Compile
40         make -C ${PKG_BUILD_DIR} \
41                 CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
42                 LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
43                 CC="$(TARGET_CC)" logrotate
44 endef
45
46 define Package/logrotate/install        
47         mkdir -p $(1)/usr/sbin
48         $(CP) ${PKG_BUILD_DIR}/logrotate $(1)/usr/sbin
49         mkdir -p $(1)/etc/logrotate.d
50         $(CP) ./files/logrotate.conf $(1)/etc
51 endef
52
53 $(eval $(call BuildPackage,logrotate))