krb5: Remove leftover manual patching
[openwrt/svn-archive/archive.git] / utils / logrotate / Makefile
index 57f978bbaba5bcd1b99e0c42ecc7a2a59ada07d2..8585c953654fa8bd8a94557dd86e3245ec343e03 100644 (file)
@@ -1,22 +1,23 @@
-# Copyright (C) 2006 OpenWrt.org
+#
+# Copyright (C) 2006-2009 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
-# $Id$
 
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=logrotate
-PKG_VERSION:=3.7.1
+PKG_VERSION:=3.7.8
 PKG_RELEASE:=1
-PKG_MD5SUM:=552639142e163745f6bcd4f1f3816d8a
 
-PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/l/logrotate
 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz
-PKG_CAT:=zcat
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
-PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
+PKG_SOURCE_URL:= \
+       http://ftp.de.debian.org/debian/pool/main/l/logrotate \
+       http://ftp.debian.org/debian/pool/main/l/logrotate \
+       http://ftp.fr.debian.org/debian/pool/main/l/logrotate \
+       http://ftp.us.debian.org/debian/pool/main/l/logrotate
+PKG_MD5SUM:=b3589bea6d8d5afc8a84134fddaae973
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -25,29 +26,37 @@ define Package/logrotate
   CATEGORY:=Utilities
   DEPENDS:=+libpopt
   TITLE:=rotates, compresses, and mails system logs
-  DESCRIPTION:=logrotate  is  designed to ease administration of systems that generate\\\
-large numbers of log files.  It allows auto-matic rotation, compression,\\\
-removal, and mailing of log files. Each  log  file  may  be  handled\\\
-daily,  weekly,monthly, or when it grows too large.\\\
   URL:=http://packages.debian.org/unstable/admin/logrotate
 endef
 
+define Package/logrotate/description
+       logrotate is designed to ease administration of systems that generate 
+       large numbers of log files. It allows auto-matic rotation, compression, 
+       removal and mailing of log files. Each log file may be handled daily, 
+       weekly, monthly or when it grows too large.
+endef
+
 define Package/logrotate/conffiles
 /etc/logrotate.conf
 endef
 
+EXTRA_CFLAGS += $(TARGET_CPPFLAGS)
+EXTRA_LDFLAGS += $(TARGET_LDFLAGS)
+
 define Build/Compile
-       make -C ${PKG_BUILD_DIR} \
-               CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
-               LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
-               CC=$(TARGET_CC) logrotate
+       $(call Build/Compile/Default, \
+               RPM_OPT_FLAGS:="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
+               LDFLAGS="$(EXTRA_LDFLAGS)" \
+               logrotate \
+       )
 endef
 
 define Package/logrotate/install       
-       mkdir -p $(1)/usr/sbin
-       $(CP) ${PKG_BUILD_DIR}/logrotate $(1)/usr/sbin
-       mkdir -p $(1)/etc/logrotate.d
-       $(CP) ./files/logrotate.conf $(1)/etc
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(INSTALL_BIN) ${PKG_BUILD_DIR}/logrotate $(1)/usr/sbin/
+       $(INSTALL_DIR) $(1)/etc
+       $(INSTALL_DATA) ./files/logrotate.conf $(1)/etc/
+       $(INSTALL_DIR) $(1)/etc/logrotate.d
 endef
 
 $(eval $(call BuildPackage,logrotate))