mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-28 01:11:52 +02:00
Convert nmap to new packaging style
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@905 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
52ca90aff1
commit
0502afe5e1
@ -12,21 +12,14 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
|||||||
PKG_CAT:=bzcat
|
PKG_CAT:=bzcat
|
||||||
|
|
||||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||||
|
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
|
||||||
|
|
||||||
IPKG_NMAP:=$(PACKAGE_DIR)/$(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
|
include $(TOPDIR)/package/rules.mk
|
||||||
IDIR_NMAP:=$(PKG_BUILD_DIR)/ipkg/$(PKG_NAME)
|
|
||||||
INFO_NMAP:=$(IPKG_STATE_DIR)/info/$(PKG_NAME).list
|
|
||||||
|
|
||||||
$(DL_DIR)/$(PKG_SOURCE):
|
$(eval $(call PKG_template,NMAP,nmap,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
||||||
$(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE) $(PKG_MD5SUM) $(PKG_SOURCE_URL)
|
|
||||||
|
|
||||||
$(PKG_BUILD_DIR)/.prepared: $(DL_DIR)/$(PKG_SOURCE)
|
$(PKG_BUILD_DIR)/.configured:
|
||||||
$(PKG_CAT) $(DL_DIR)/$(PKG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
(cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
|
||||||
$(PATCH) $(PKG_BUILD_DIR) ./patches
|
|
||||||
touch $(PKG_BUILD_DIR)/.prepared
|
|
||||||
|
|
||||||
$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
|
|
||||||
(cd $(PKG_BUILD_DIR); rm -rf config.cache; \
|
|
||||||
$(TARGET_CONFIGURE_OPTS) \
|
$(TARGET_CONFIGURE_OPTS) \
|
||||||
libpcapdir="$(STAGING_DIR)/usr/lib" \
|
libpcapdir="$(STAGING_DIR)/usr/lib" \
|
||||||
CFLAGS="$(TARGET_CFLAGS)" \
|
CFLAGS="$(TARGET_CFLAGS)" \
|
||||||
@ -52,38 +45,30 @@ $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
|
|||||||
--mandir=/usr/share/man \
|
--mandir=/usr/share/man \
|
||||||
--sbindir=/usr/sbin \
|
--sbindir=/usr/sbin \
|
||||||
--sysconfdir=/etc \
|
--sysconfdir=/etc \
|
||||||
|
$(DISABLE_LARGEFILE) \
|
||||||
|
$(DISABLE_NLS) \
|
||||||
--without-openssl \
|
--without-openssl \
|
||||||
--with-libpcap="$(STAGING_DIR)/usr" \
|
--with-libpcap="$(STAGING_DIR)/usr" \
|
||||||
--with-libpcre="$(STAGING_DIR)/usr" \
|
--with-libpcre="$(STAGING_DIR)/usr" \
|
||||||
$(DISABLE_NLS) \
|
|
||||||
$(DISABLE_LARGEFILE) \
|
|
||||||
);
|
);
|
||||||
touch $(PKG_BUILD_DIR)/.configured
|
touch $(PKG_BUILD_DIR)/.configured
|
||||||
|
|
||||||
$(PKG_BUILD_DIR)/$(PKG_NAME): $(PKG_BUILD_DIR)/.configured
|
$(PKG_BUILD_DIR)/.built:
|
||||||
$(MAKE) -C $(PKG_BUILD_DIR) \
|
$(MAKE) -C $(PKG_BUILD_DIR) \
|
||||||
$(TARGET_CONFIGURE_OPTS) \
|
$(TARGET_CONFIGURE_OPTS) \
|
||||||
CCOPT="-fno-builtin -nostdinc++ -nodefaultlibs $(TARGET_CFLAGS)"
|
CCOPT="-fno-builtin -nostdinc++ -nodefaultlibs $(TARGET_CFLAGS)"
|
||||||
|
mkdir -p $(PKG_INSTALL_DIR)
|
||||||
|
$(MAKE) -C $(PKG_BUILD_DIR) \
|
||||||
|
DESTDIR="$(PKG_INSTALL_DIR)" \
|
||||||
|
install
|
||||||
|
touch $(PKG_BUILD_DIR)/.built
|
||||||
|
|
||||||
$(IPKG_NMAP): $(PKG_BUILD_DIR)/$(PKG_NAME)
|
$(IPKG_NMAP):
|
||||||
$(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_NMAP) $(PKG_NAME).control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
|
install -d -m0755 $(IDIR_NMAP)/usr/share/nmap
|
||||||
mkdir -p $(IDIR_NMAP)/usr/share/nmap
|
|
||||||
for file in mac-prefixes os-fingerprints protocols rpc service-probes services; do \
|
for file in mac-prefixes os-fingerprints protocols rpc service-probes services; do \
|
||||||
cp $(PKG_BUILD_DIR)/nmap-$$file $(IDIR_NMAP)/usr/share/nmap; \
|
cp -fpR $(PKG_INSTALL_DIR)/usr/share/nmap/nmap-$$file $(IDIR_NMAP)/usr/share/nmap; \
|
||||||
done
|
done
|
||||||
mkdir -p $(IDIR_NMAP)/usr/sbin
|
install -d -m0755 $(IDIR_NMAP)/usr/bin
|
||||||
cp $(PKG_BUILD_DIR)/$(PKG_NAME) $(IDIR_NMAP)/usr/sbin/
|
cp -fpR $(PKG_INSTALL_DIR)/usr/bin/nmap $(IDIR_NMAP)/usr/bin/
|
||||||
$(STRIP) $(IDIR_NMAP)/usr/sbin/*
|
$(RSTRIP) $(IDIR_NMAP)
|
||||||
mkdir -p $(PACKAGE_DIR)
|
|
||||||
$(IPKG_BUILD) $(IDIR_NMAP) $(PACKAGE_DIR)
|
$(IPKG_BUILD) $(IDIR_NMAP) $(PACKAGE_DIR)
|
||||||
|
|
||||||
$(INFO_NMAP): $(IPKG_NMAP)
|
|
||||||
$(IPKG) install $(IPKG_NMAP)
|
|
||||||
|
|
||||||
source: $(DL_DIR)/$(PKG_SOURCE)
|
|
||||||
prepare: $(PKG_BUILD_DIR)/.prepared
|
|
||||||
compile: $(IPKG_NMAP)
|
|
||||||
install: $(INFO_NMAP)
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -rf $(PKG_BUILD_DIR) $(IPKG_NMAP)
|
|
||||||
|
Loading…
Reference in New Issue
Block a user