Makefile (1727B)
1 # 2 # Copyright (C) 2007-2015 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 include $(INCLUDE_DIR)/kernel.mk 10 11 PKG_NAME:=lsof 12 PKG_VERSION:=4.89 13 PKG_RELEASE:=1 14 15 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.bz2 16 PKG_SOURCE_URL:=https://www.mirrorservice.org/sites/lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://sunsite.ualberta.ca/pub/Mirror/lsof/ ftp://ftp.fu-berlin.de/pub/unix/tools/lsof 17 PKG_MD5SUM:=1b9cd34f3fb86856a125abbf2be3a386 18 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)_$(PKG_VERSION) 19 PKG_MAINTAINER:=Maxim Storchak <m.storchak@gmail.com> 20 PKG_LICENSE:=Unique 21 PKG_LICENSE_FILES:=00README 22 23 include $(INCLUDE_DIR)/package.mk 24 25 TARGET_LDFLAGS += $(LIBRPC) 26 27 define Package/lsof 28 SECTION:=utils 29 CATEGORY:=Utilities 30 DEPENDS:=$(LIBRPC_DEPENDS) 31 TITLE:=LiSt Open Files - a diagnostic tool 32 URL:=http://people.freebsd.org/~abe/ 33 endef 34 35 ifneq ($(CONFIG_IPV6),n) 36 LINUX_CLIB_IPV6=-DHASIPv6 37 else 38 LINUX_CLIB_IPV6= 39 endif 40 41 define Build/Prepare 42 $(PKG_UNPACK) 43 (cd $(PKG_BUILD_DIR) && tar -xf $(PKG_NAME)_$(PKG_VERSION)_src.tar && mv $(PKG_NAME)_$(PKG_VERSION)_src/* .) 44 $(Build/Patch) 45 endef 46 47 define Build/Configure 48 cd $(PKG_BUILD_DIR); \ 49 LINUX_CLIB="-DGLIBCV=2 $(LINUX_CLIB_IPV6)" \ 50 LSOF_CC="$(TARGET_CC)" \ 51 LSOF_VSTR="$(LINUX_VERSION)" \ 52 LSOF_CFGF="$(TARGET_CFLAGS)" \ 53 LSOF_CFGL="$(TARGET_LDFLAGS)" \ 54 LSOF_AR="$(TARGET_CROSS)ar cr" \ 55 LSOF_RANLIB="$(TARGET_CROSS)ranlib" \ 56 ./Configure -n linux 57 endef 58 59 define Build/Compile 60 $(MAKE) -C $(PKG_BUILD_DIR) 61 endef 62 63 define Package/lsof/install 64 $(INSTALL_DIR) $(1)/usr/bin 65 $(INSTALL_BIN) $(PKG_BUILD_DIR)/lsof $(1)/usr/bin 66 endef 67 68 $(eval $(call BuildPackage,lsof))