noddos: Noddos v0.5.0 with mDNS / DNS-SD support
[feed/packages.git] / utils / gzip / Makefile
1 #
2 # Copyright (C) 2006-2016 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.7
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@GNU/gzip
16 PKG_MD5SUM:=c4abae2ddd5c6f39c6f8169693cc7ac0
17 PKG_LICENSE:=GPL-3.0+
18
19 PKG_INSTALL:=1
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/gzip
24 SECTION:=utils
25 CATEGORY:=Utilities
26 SUBMENU:=Compression
27 TITLE:=gzip (GNU zip) is a compression utility.
28 URL:=https://www.gnu.org/software/gzip/
29 MAINTAINER:=Christian Beier <dontmind@freeshell.org>
30 endef
31
32 define Package/gzip/description
33 gzip (GNU zip) is a compression utility designed to be a \
34 replacement for compress.
35 endef
36
37 CONFIGURE_VARS += \
38 gl_cv_func_getopt_gnu=yes \
39 ac_cv_search_clock_gettime=no
40
41 define Package/gzip/install
42 $(SED) 's,/bin/bash,/bin/sh,g' $(PKG_INSTALL_DIR)/usr/bin/{gunzip,zcat}
43 $(INSTALL_DIR) $(1)/usr/bin
44 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{gunzip,gzip,zcat} $(1)/usr/bin/
45 endef
46
47 define Package/gzip/postinst
48 #!/bin/sh
49 for app in gunzip gzip zcat; do
50 ln -sf ../usr/bin/$$app $${IPKG_INSTROOT}/bin/$$app
51 done
52 endef
53
54 define Package/gzip/postrm
55 #!/bin/sh
56 for app in gunzip gzip zcat; do
57 ln -sf busybox $${IPKG_INSTROOT}/bin/$$app
58 $${IPKG_INSTROOT}/bin/$$app 2>&1 | grep 'applet not found' > /dev/null 2>&1 && rm $${IPKG_INSTROOT}/bin/$$app
59 done
60 exit 0
61 endef
62
63 $(eval $(call BuildPackage,gzip))
64