[packages] normalize PKG_FIXUP - the "libtool" fixup is merely an alias for "autoreco...
[packages.git] / utils / psmisc / 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:=psmisc
11 PKG_VERSION:=22.16
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@SF/psmisc
16 PKG_MD5SUM:=d52caf26159c905574c2ce4bd792b9ee
17
18 PKG_FIXUP:=autoreconf
19 PKG_INSTALL:=1
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/psmisc
24   SECTION:=utils
25   CATEGORY:=Utilities
26   DEPENDS:=+libncurses
27   TITLE:=proc utilities
28   URL:=http://psmisc.sourceforge.net/
29 endef
30
31 define Package/psmisc/description
32  psmisc is a set of additional small useful utilities that use
33  the proc filesystem: fuser, killall, pstree, and prtstat
34 endef
35
36 CONFIGURE_ARGS += \
37         --disable-harden-flags
38
39 MAKE_FLAGS += \
40         CFLAGS="$(TARGET_CFLAGS)" \
41         CPPFLAGS="$(TARGET_CPPFLAGS)" \
42         LDFLAGS="$(TARGET_LDFLAGS)"
43
44 define Package/psmisc/preinst
45 #!/bin/sh
46 if [ -e $${IPKG_INSTROOT}/usr/bin/killall ]; then
47   rm $${IPKG_INSTROOT}/usr/bin/killall;
48 fi
49 endef
50
51 define Package/psmisc/install
52         $(INSTALL_DIR) $(1)/usr/bin
53         $(INSTALL_BIN) \
54                 $(PKG_INSTALL_DIR)/usr/bin/{fuser,killall,prtstat,pstree} \
55                 $(1)/usr/bin/
56 endef
57
58 define Package/psmisc/postrm
59 #!/bin/sh
60 ln -sf ../../bin/busybox $${IPKG_INSTROOT}/usr/bin/killall
61 $${IPKG_INSTROOT}/usr/bin/killall 2>&1 | grep 'applet not found' > /dev/null 2>&1 && rm $${IPKG_INSTROOT}/usr/bin/killall
62 exit 0
63 endef
64
65 $(eval $(call BuildPackage,psmisc))