From 018f667f483a843abeee7d155cf953d28ad9adc7 Mon Sep 17 00:00:00 2001 From: Oliver Ertl Date: Sat, 22 Mar 2008 18:20:55 +0000 Subject: [PATCH] Add utils/tar SVN-Revision: 10648 --- utils/tar/Makefile | 62 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 utils/tar/Makefile diff --git a/utils/tar/Makefile b/utils/tar/Makefile new file mode 100644 index 000000000..5fb83e27d --- /dev/null +++ b/utils/tar/Makefile @@ -0,0 +1,62 @@ +# +# Copyright (C) 2008 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:=tar +PKG_VERSION:=1.18 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=@GNU/$(PKG_NAME) +PKG_MD5SUM:=70170208d7c1bb9ab40120579434b6a3 + +include $(INCLUDE_DIR)/package.mk + +define Package/tar + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+bzip2 + TITLE:=GNU tar + URL:=http://www.gnu.org/software/tar/ +endef + +define Package/tar/description + Tar is a program for packaging a set of files as a + single archive in tar format. +endef + +define Package/tar/postinst +#!/bin/sh +if [ -e $${IPKG_INSTROOT}/bin/tar ]; then + rm -r $${IPKG_INSTROOT}/bin/tar; +fi +ln -sf $${IPKG_INSTROOT}/usr/bin/tar /bin/tar +endef + +define Package/tar/postrm +#!/bin/sh +rm $${IPKG_INSTROOT}/bin/tar +ln -s busybox $${IPKG_INSTROOT}/bin/tar +$${IPKG_INSTROOT}/bin/tar 2>&1 | grep 'applet not found' > /dev/null 2>&1 && rm $${IPKG_INSTROOT}/bin/tar +exit 0 +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + CFLAGS="$(TARGET_CFLAGS)" \ + LDFLAGS="$(TARGET_LDLAGS)" +endef + +define Package/tar/install + $(INSTALL_DIR) $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/$(PKG_NAME) $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,tar)) -- 2.30.2