touch $@
APPS:=
+DEPEND:=
ifneq ($(BR2_PACKAGE_PROCPS_PS),)
APPS += /bin/ps
endif
ifneq ($(BR2_PACKAGE_PROCPS_TOP),)
APPS += /usr/bin/top
+DEPEND:=libncurses
endif
ifneq ($(BR2_PACKAGE_PROCPS_SLABTOP),)
APPS += /usr/bin/slabtop
+DEPEND:=libncurses
endif
ifneq ($(BR2_PACKAGE_PROCPS_PMAP),)
APPS += /usr/bin/pmap
$(TARGET_CONFIGURE_OPTS) \
prefix="$(PKG_INSTALL_DIR)/" \
ps/ps $(notdir $(APPS))
-
- if [ -n "$(BR2_PACKAGE_PROCPS_PS)" ];then $(CP) $(PKG_BUILD_DIR)/ps/ps $(PKG_INSTALL_DIR)/bin/; fi
- if [ -n "$(BR2_PACKAGE_PROCPS_VMSTAT)" ];then $(CP) $(PKG_BUILD_DIR)/vmstat $(PKG_INSTALL_DIR)/usr/bin; fi
- if [ -n "$(BR2_PACKAGE_PROCPS_TOP)" ];then $(CP) $(PKG_BUILD_DIR)/top $(PKG_INSTALL_DIR)/usr/bin;fi
- if [ -n "$(BR2_PACKAGE_PROCPS_SLABTOP)" ];then $(CP) $(PKG_BUILD_DIR)/slabtop $(PKG_INSTALL_DIR)/usr/bin;fi
- if [ -n "$(BR2_PACKAGE_PROCPS_PMAP)" ];then $(CP) $(PKG_BUILD_DIR)/pmap $(PKG_INSTALL_DIR)/usr/bin;fi
- if [ -n "$(BR2_PACKAGE_PROCPS_PWDX)" ];then $(CP) $(PKG_BUILD_DIR)/pwdx $(PKG_INSTALL_DIR)/usr/bin;fi
- if [ -n "$(BR2_PACKAGE_PROCPS_W)" ];then $(CP) $(PKG_BUILD_DIR)/w $(PKG_INSTALL_DIR)/usr/bin;fi
- if [ -n "$(BR2_PACKAGE_PROCPS_KILL)" ];then $(CP) $(PKG_BUILD_DIR)/kill $(PKG_INSTALL_DIR)/bin;fi
- if [ -n "$(BR2_PACKAGE_PROCPS_SKILL)" ];then $(CP) $(PKG_BUILD_DIR)/skill $(PKG_INSTALL_DIR)/usr/bin;fi
- if [ -n "$(BR2_PACKAGE_PROCPS_FREE)" ];then $(CP) $(PKG_BUILD_DIR)/free $(PKG_INSTALL_DIR)/usr/bin;fi
- if [ -n "$(BR2_PACKAGE_PROCPS_SYSCTL)" ];then $(CP) $(PKG_BUILD_DIR)/sysctl $(PKG_INSTALL_DIR)/sbin;fi
- if [ -n "$(BR2_PACKAGE_PROCPS_TLOAD)" ];then $(CP) $(PKG_BUILD_DIR)/tload $(PKG_INSTALL_DIR)/usr/bin;fi
- if [ -n "$(BR2_PACKAGE_PROCPS_WATCH)" ];then $(CP) $(PKG_BUILD_DIR)/watch $(PKG_INSTALL_DIR)/usr/bin;fi
- if [ -n "$(BR2_PACKAGE_PROCPS_PGREP)" ];then $(CP) $(PKG_BUILD_DIR)/pgrep $(PKG_INSTALL_DIR)/usr/bin;fi
-
- $(CP) $(PKG_BUILD_DIR)/proc/libproc-$(PKG_VERSION).so $(PKG_INSTALL_DIR)/lib
-
+ if [ -n "$(BR2_PACKAGE_PROCPS_PS)" ]; then cp -fpR $(PKG_BUILD_DIR)/ps/ps $(PKG_INSTALL_DIR)/bin/; fi
+ if [ -n "$(BR2_PACKAGE_PROCPS_VMSTAT)" ]; then cp -fpR $(PKG_BUILD_DIR)/vmstat $(PKG_INSTALL_DIR)/usr/bin; fi
+ if [ -n "$(BR2_PACKAGE_PROCPS_TOP)" ]; then cp -fpR $(PKG_BUILD_DIR)/top $(PKG_INSTALL_DIR)/usr/bin/; fi
+ if [ -n "$(BR2_PACKAGE_PROCPS_SLABTOP)" ]; then cp -fpR $(PKG_BUILD_DIR)/slabtop $(PKG_INSTALL_DIR)/usr/bin/; fi
+ if [ -n "$(BR2_PACKAGE_PROCPS_PMAP)" ]; then cp -fpR $(PKG_BUILD_DIR)/pmap $(PKG_INSTALL_DIR)/usr/bin/; fi
+ if [ -n "$(BR2_PACKAGE_PROCPS_PWDX)" ]; then cp -fpR $(PKG_BUILD_DIR)/pwdx $(PKG_INSTALL_DIR)/usr/bin/; fi
+ if [ -n "$(BR2_PACKAGE_PROCPS_W)" ]; then cp -fpR $(PKG_BUILD_DIR)/w $(PKG_INSTALL_DIR)/usr/bin/; fi
+ if [ -n "$(BR2_PACKAGE_PROCPS_KILL)" ]; then cp -fpR $(PKG_BUILD_DIR)/kill $(PKG_INSTALL_DIR)/bin/; fi
+ if [ -n "$(BR2_PACKAGE_PROCPS_SKILL)" ]; then cp -fpR $(PKG_BUILD_DIR)/skill $(PKG_INSTALL_DIR)/usr/bin/; fi
+ if [ -n "$(BR2_PACKAGE_PROCPS_FREE)" ]; then cp -fpR $(PKG_BUILD_DIR)/free $(PKG_INSTALL_DIR)/usr/bin/; fi
+ if [ -n "$(BR2_PACKAGE_PROCPS_SYSCTL)" ]; then cp -fpR $(PKG_BUILD_DIR)/sysctl $(PKG_INSTALL_DIR)/sbin/; fi
+ if [ -n "$(BR2_PACKAGE_PROCPS_TLOAD)" ]; then cp -fpR $(PKG_BUILD_DIR)/tload $(PKG_INSTALL_DIR)/usr/bin/; fi
+ if [ -n "$(BR2_PACKAGE_PROCPS_WATCH)" ]; then cp -fpR $(PKG_BUILD_DIR)/watch $(PKG_INSTALL_DIR)/usr/bin/; fi
+ if [ -n "$(BR2_PACKAGE_PROCPS_PGREP)" ]; then cp -fpR $(PKG_BUILD_DIR)/pgrep $(PKG_INSTALL_DIR)/usr/bin/; fi
+ cp -fpR $(PKG_BUILD_DIR)/proc/libproc-$(PKG_VERSION).so $(PKG_INSTALL_DIR)/lib/
touch $@
$(IPKG_PROCPS):
install -d -m0755 $(IDIR_PROCPS)/bin
install -d -m0755 $(IDIR_PROCPS)/sbin
install -d -m0755 $(IDIR_PROCPS)/lib
-
- if [ -n "$(BR2_PACKAGE_PROCPS_PS)" ];then $(CP) $(PKG_INSTALL_DIR)/bin/ps $(IDIR_PROCPS)/bin/;fi
- if [ -n "$(BR2_PACKAGE_PROCPS_VMSTAT)" ];then $(CP) $(PKG_INSTALL_DIR)/usr/bin/vmstat $(IDIR_PROCPS)/usr/bin;fi
- if [ -n "$(BR2_PACKAGE_PROCPS_TOP)" ];then $(CP) $(PKG_INSTALL_DIR)/usr/bin/top $(IDIR_PROCPS)/usr/bin;fi
- if [ -n "$(BR2_PACKAGE_PROCPS_SLABTOP)" ];then $(CP) $(PKG_INSTALL_DIR)/usr/bin/slabtop $(IDIR_PROCPS)/usr/bin;fi
- if [ -n "$(BR2_PACKAGE_PROCPS_PMAP)" ];then $(CP) $(PKG_INSTALL_DIR)/usr/bin/pmap $(IDIR_PROCPS)/usr/bin;fi
- if [ -n "$(BR2_PACKAGE_PROCPS_PWDX)" ];then $(CP) $(PKG_INSTALL_DIR)/usr/bin/pwdx $(IDIR_PROCPS)/usr/bin;fi
- if [ -n "$(BR2_PACKAGE_PROCPS_W)" ];then $(CP) $(PKG_INSTALL_DIR)/usr/bin/w $(IDIR_PROCPS)/usr/bin;fi
- if [ -n "$(BR2_PACKAGE_PROCPS_KILL)" ];then $(CP) $(PKG_INSTALL_DIR)/bin/kill $(IDIR_PROCPS)/bin;fi
- if [ -n "$(BR2_PACKAGE_PROCPS_SKILL)" ];then $(CP) $(PKG_INSTALL_DIR)/usr/bin/skill $(IDIR_PROCPS)/usr/bin;fi
- if [ -n "$(BR2_PACKAGE_PROCPS_FREE)" ];then $(CP) $(PKG_INSTALL_DIR)/usr/bin/free $(IDIR_PROCPS)/usr/bin;fi
- if [ -n "$(BR2_PACKAGE_PROCPS_SYSCTL)" ];then $(CP) $(PKG_INSTALL_DIR)/sbin/sysctl $(IDIR_PROCPS)/sbin;fi
- if [ -n "$(BR2_PACKAGE_PROCPS_TLOAD)" ];then $(CP) $(PKG_INSTALL_DIR)/usr/bin/tload $(IDIR_PROCPS)/usr/bin;fi
- if [ -n "$(BR2_PACKAGE_PROCPS_WATCH)" ];then $(CP) $(PKG_INSTALL_DIR)/usr/bin/watch $(IDIR_PROCPS)/usr/bin;fi
- if [ -n "$(BR2_PACKAGE_PROCPS_PGREP)" ];then $(CP) $(PKG_INSTALL_DIR)/usr/bin/pgrep $(IDIR_PROCPS)/usr/bin;fi
-
- $(CP) $(PKG_INSTALL_DIR)/lib/libproc-$(PKG_VERSION).so $(IDIR_PROCPS)/lib
+ cp -fpR $(PKG_INSTALL_DIR)/* $(IDIR_PROCPS)/
+ grep -v -e ^BUILT -e /bin/sh $(IDIR_PROCPS)/CONTROL/preinst > $(IDIR_PROCPS)/CONTROL/preinst.tmp
+ rm $(IDIR_PROCPS)/CONTROL/preinst
+ echo -e "#!/bin/sh\nBUILT='$(APPS)'\n" > $(IDIR_PROCPS)/CONTROL/preinst
+ cat $(IDIR_PROCPS)/CONTROL/preinst.tmp >> $(IDIR_PROCPS)/CONTROL/preinst
+ rm $(IDIR_PROCPS)/CONTROL/preinst.tmp
+ echo "Depends: $(DEPEND)" >> $(IDIR_PROCPS)/CONTROL/control
+ echo "Description: /proc utilities: $(notdir $(APPS))" >> $(IDIR_PROCPS)/CONTROL/control
$(RSTRIP) $(IDIR_PROCPS)
-
- # Insert BUILT variable into preinst script
- grep -v -e ^BUILT -e /bin/sh $(PKG_INSTALL_DIR)/../ipkg/$(PKG_NAME)/CONTROL/preinst > $(PKG_INSTALL_DIR)/../ipkg/$(PKG_NAME)/CONTROL/preinst.tmp
- rm $(PKG_INSTALL_DIR)/../ipkg/$(PKG_NAME)/CONTROL/preinst
- echo -e "#!/bin/sh\nBUILT='$(APPS)'\n" > $(PKG_INSTALL_DIR)/../ipkg/$(PKG_NAME)/CONTROL/preinst
- cat $(PKG_INSTALL_DIR)/../ipkg/$(PKG_NAME)/CONTROL/preinst.tmp >> $(PKG_INSTALL_DIR)/../ipkg/$(PKG_NAME)/CONTROL/preinst
- rm $(PKG_INSTALL_DIR)/../ipkg/$(PKG_NAME)/CONTROL/preinst.tmp
-
- # Insert ncurses dependancy if top or slabtop was selected
- if [ -n "$(BR2_PACKAGE_PROCPS_TOP)" ] || \
- [ -n "$(BR2_PACKAGE_PROCPS_SLABTOP)" ]; then\
- echo "Depends: libncurses" >> $(PKG_INSTALL_DIR)/../ipkg/$(PKG_NAME)/CONTROL/control; fi
-
- # Insert built apps to ipkg description
- echo "Description: /proc utilities: $(notdir $(APPS))" >> $(PKG_INSTALL_DIR)/../ipkg/$(PKG_NAME)/CONTROL/control
-
$(IPKG_BUILD) $(IDIR_PROCPS) $(PACKAGE_DIR)
mostlyclean: