2 # Copyright (C) 2011 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@GNU/time
16 PKG_MD5SUM:=e38d2b8b34b1ca259cf7b053caac32b3
21 include $(INCLUDE_DIR)/package.mk
26 TITLE:=The GNU time utility
27 URL:=http://www.gnu.org/software/time/
30 define Package/time/description
31 `time' is a program that measures many of the CPU resources, such as time and
32 memory, that other programs use. The GNU version can format the output in
33 arbitrary ways by using a printf-style format string to include various
34 resource measurements. Some systems do not provide much information about
35 program resource use; `time' reports unavailable information as zero values.
38 define Package/time/preinst
40 if [ -e $${IPKG_INSTROOT}/usr/bin/time ]; then
41 rm $${IPKG_INSTROOT}/usr/bin/time;
45 define Package/time/install
46 $(INSTALL_DIR) $(1)/usr/bin
47 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/time $(1)/usr/bin/
50 define Package/time/postrm
52 ln -sf ../../bin/busybox $${IPKG_INSTROOT}/usr/bin/time
53 $${IPKG_INSTROOT}/usr/bin/time 2>&1 | grep 'applet not found' > /dev/null 2>&1 && rm $${IPKG_INSTROOT}/usr/bin/time
57 $(eval $(call BuildPackage,time))