sctp: moved to github
[packages.git] / utils / gzip / Makefile
1 #
2 # Copyright (C) 2006-2012 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=gzip
11 PKG_VERSION:=1.4
12 PKG_RELEASE:=3
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@GNU/gzip
16 PKG_MD5SUM:=e381b8506210c794278f5527cba0e765
17
18 PKG_INSTALL:=1
19
20 include $(INCLUDE_DIR)/package.mk
21
22 define Package/gzip
23   SECTION:=utils
24   CATEGORY:=Utilities
25   TITLE:=gzip (GNU zip) is a compression utility.
26   URL:=http://www.gzip.org/
27 endef
28
29 define Package/gzip/description
30         gzip (GNU zip) is a compression utility designed to be a \
31         replacement for compress.
32 endef
33
34 CONFIGURE_VARS += \
35         gl_cv_func_getopt_gnu=yes \
36         ac_cv_search_clock_gettime=no
37
38 define Package/gzip/install
39         $(SED) 's,/bin/bash,/bin/sh,g' $(PKG_INSTALL_DIR)/usr/bin/{gunzip,zcat}
40         $(INSTALL_DIR) $(1)/usr/bin
41         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{gunzip,gzip,zcat} $(1)/usr/bin/
42 endef
43
44 define Package/gzip/postinst
45 #!/bin/sh
46 for app in gunzip gzip zcat; do
47   ln -sf ../usr/bin/$$app $${IPKG_INSTROOT}/bin/$$app
48 done
49 endef
50
51 define Package/gzip/postrm
52 #!/bin/sh
53 for app in gunzip gzip zcat; do
54   ln -sf busybox $${IPKG_INSTROOT}/bin/$$app
55   $${IPKG_INSTROOT}/bin/$$app 2>&1 | grep 'applet not found' > /dev/null 2>&1 && rm $${IPKG_INSTROOT}/bin/$$app
56 done
57 exit 0
58 endef
59
60 $(eval $(call BuildPackage,gzip))
61