packages/utils/psmisc/Makefile
swalker 5a13a91c4b [packages] psmisc: Revert r29738's peekfd addition (#10862)
git-svn-id: svn://svn.openwrt.org/openwrt/packages@29937 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-01-28 20:58:29 +00:00

63 lines
1.4 KiB
Makefile

#
# Copyright (C) 2006-2012 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=psmisc
PKG_VERSION:=22.14
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/psmisc
PKG_MD5SUM:=ba3f4e971895c92bba7770d81c981503
PKG_FIXUP:=libtool
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
define Package/psmisc
SECTION:=utils
CATEGORY:=Utilities
DEPENDS:=+libncurses
TITLE:=proc utilities
URL:=http://psmisc.sourceforge.net/
endef
define Package/psmisc/description
psmisc is a set of additional small useful utilities that use
the proc filesystem: fuser, killall, pstree, and prtstat
endef
MAKE_FLAGS += \
CFLAGS="$(TARGET_CFLAGS)" \
CPPFLAGS="$(TARGET_CPPFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS)" \
define Package/psmisc/preinst
#!/bin/sh
if [ -e $${IPKG_INSTROOT}/usr/bin/killall ]; then
rm $${IPKG_INSTROOT}/usr/bin/killall;
fi
endef
define Package/psmisc/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) \
$(PKG_INSTALL_DIR)/usr/bin/{fuser,killall,prtstat,pstree} \
$(1)/usr/bin/
endef
define Package/psmisc/postrm
#!/bin/sh
ln -sf ../../bin/busybox $${IPKG_INSTROOT}/usr/bin/killall
$${IPKG_INSTROOT}/usr/bin/killall 2>&1 | grep 'applet not found' > /dev/null 2>&1 && rm $${IPKG_INSTROOT}/usr/bin/killall
exit 0
endef
$(eval $(call BuildPackage,psmisc))