source: packages/utils/gzip/Makefile @ 32533

Last change on this file since 32533 was 32533, checked in by nbd, 4 years ago

gzip: avoid using clock_gettime. it is unnecessary and pulls in librt when using eglibc

File size: 1.4 KB
Line 
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
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=gzip
11PKG_VERSION:=1.4
12PKG_RELEASE:=2
13
14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15PKG_SOURCE_URL:=@GNU/gzip
16PKG_MD5SUM:=e381b8506210c794278f5527cba0e765
17
18PKG_INSTALL:=1
19
20include $(INCLUDE_DIR)/package.mk
21
22define Package/gzip
23  SECTION:=utils
24  CATEGORY:=Utilities
25  TITLE:=gzip (GNU zip) is a compression utility.
26  URL:=http://www.gzip.org/
27endef
28
29define Package/gzip/description
30        gzip (GNU zip) is a compression utility designed to be a \
31        replacement for compress.
32endef
33
34CONFIGURE_VARS += \
35        gl_cv_func_getopt_gnu=yes \
36        ac_cv_search_clock_gettime=no
37
38define 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/
42endef
43
44define Package/gzip/postinst
45#!/bin/sh
46for app in gunzip gzip zcat; do
47  ln -sf $${IPKG_INSTROOT}/usr/bin/$$app $${IPKG_INSTROOT}/bin/$$app
48done
49endef
50
51define Package/gzip/postrm
52#!/bin/sh
53for 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
56done
57exit 0
58endef
59
60$(eval $(call BuildPackage,gzip))
61
Note: See TracBrowser for help on using the repository browser.