source: packages/utils/tar/Makefile @ 17216

Last change on this file since 17216 was 17216, checked in by acinonyx, 7 years ago

[packages] tar: Update to v1.22 (closes #5667)

  • Property copyright set to Copyright (C) 2008 OpenWrt.org
  • Property licence set to GPLv2
  • Property svn:eol-style set to native
File size: 1.3 KB
Line 
1#
2# Copyright (C) 2008-2009 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=tar
11PKG_VERSION:=1.22
12PKG_RELEASE:=1
13
14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
16PKG_MD5SUM:=07fa517027f426bb80f5f5ff91b63585
17
18include $(INCLUDE_DIR)/package.mk
19
20define Package/tar
21  SECTION:=utils
22  CATEGORY:=Utilities
23  DEPENDS:=+bzip2
24  TITLE:=GNU tar
25  URL:=http://www.gnu.org/software/tar/
26endef
27
28define Package/tar/description
29        Tar is a program for packaging a set of files as a
30        single archive in tar format.
31endef
32
33define Package/tar/postinst
34#!/bin/sh
35if [ -e $${IPKG_INSTROOT}/bin/tar ]; then
36  rm -r $${IPKG_INSTROOT}/bin/tar;
37fi
38ln -sf $${IPKG_INSTROOT}/usr/bin/tar $${IPKG_INSTROOT}/bin/tar
39endef
40
41define Package/tar/postrm
42#!/bin/sh
43rm $${IPKG_INSTROOT}/bin/tar
44ln -s busybox $${IPKG_INSTROOT}/bin/tar
45$${IPKG_INSTROOT}/bin/tar 2>&1 | grep 'applet not found' > /dev/null 2>&1 && rm $${IPKG_INSTROOT}/bin/tar
46exit 0
47endef
48
49define Build/Compile
50        $(MAKE) -C $(PKG_BUILD_DIR) \
51                DESTDIR="$(PKG_INSTALL_DIR)" \
52                CFLAGS="$(TARGET_CFLAGS)" \
53                LDFLAGS="$(TARGET_LDLAGS)"
54endef
55
56define Package/tar/install
57        $(INSTALL_DIR) $(1)/usr/bin/
58        $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/$(PKG_NAME) $(1)/usr/bin/
59endef
60
61$(eval $(call BuildPackage,tar))
Note: See TracBrowser for help on using the repository browser.