convert fping to new packaging style
[openwrt.git] / package / fprobe / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME := fprobe
6 PKG_VERSION := 1.1
7 PKG_RELEASE := 1
8 PKG_MD5SUM := 65850d0470078269b33eee58cba77ac2
9
10 PKG_SOURCE_SITE := @SF/fprobe
11 PKG_SOURCE_FILE := $(PKG_NAME)-$(PKG_VERSION).tar.bz2
12 PKG_SOURCE_DIR := $(PKG_NAME)-$(PKG_VERSION)
13 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_SOURCE_DIR)
14 PKG_IPK := $(PACKAGE_DIR)/$(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
15 PKG_CAT := bzcat
16 PKG_IPK_DIR := $(PKG_BUILD_DIR)/ipkg
17
18 $(DL_DIR)/$(PKG_SOURCE_FILE):
19 $(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE_FILE) $(PKG_MD5SUM) $(PKG_SOURCE_SITE)
20
21 $(PKG_BUILD_DIR)/.prepared: $(DL_DIR)/$(PKG_SOURCE_FILE)
22 $(PKG_CAT) $(DL_DIR)/$(PKG_SOURCE_FILE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
23 touch $(PKG_BUILD_DIR)/.prepared
24
25 $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
26 (cd $(PKG_BUILD_DIR) ; \
27 $(TARGET_CONFIGURE_OPTS) \
28 CFLAGS="$(TARGET_CFLAGS)" \
29 ./configure \
30 --target=$(GNU_TARGET_NAME) \
31 --host=$(GNU_TARGET_NAME) \
32 --build=$(GNU_HOST_NAME) \
33 --prefix=/usr \
34 --exec-prefix=/usr \
35 --bindir=/usr/bin \
36 --sbindir=/usr/sbin \
37 --libexecdir=/usr/lib \
38 --datadir=/usr/share \
39 --infodir=/usr/share/info \
40 --mandir=/usr/share/man \
41 --localstatedir=/var \
42 --sysconfdir=/etc \
43 --with-piddir=/var \
44 --with-pcap=$(STAGING_DIR)/usr/include \
45 --with-libpcap=$(STAGING_DIR)/usr/lib \
46 --with-membulk=index8 \
47 --with-hash=xor8 \
48 $(DISABLE_NLS) \
49 )
50 touch $(PKG_BUILD_DIR)/.configured
51
52 $(PKG_BUILD_DIR)/$(PKG_NAME): $(PKG_BUILD_DIR)/.configured
53 $(MAKE) -C $(PKG_BUILD_DIR)
54
55 $(PKG_IPK): $(PKG_BUILD_DIR)/$(PKG_NAME)
56 $(SCRIPT_DIR)/make-ipkg-dir.sh $(PKG_IPK_DIR) $(PKG_NAME).control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
57 mkdir -p $(PKG_IPK_DIR)/usr/bin
58 cp $(PKG_BUILD_DIR)/src/fprobe $(PKG_IPK_DIR)/usr/bin/
59 $(STRIP) $(PKG_IPK_DIR)/usr/bin/*
60 mkdir -p $(PACKAGE_DIR)
61 $(IPKG_BUILD) $(PKG_IPK_DIR) $(PACKAGE_DIR)
62
63 $(IPKG_STATE_DIR)/info/tinc.list: $(PKG_IPK)
64 $(IPKG) install $(PKG_IPK)
65
66 source: $(DL_DIR)/$(PKG_SOURCE)
67 prepare: $(PKG_BUILD_DIR)/.prepared
68 compile: $(PKG_IPK)
69 install: $(IPKG_STATE_DIR)/info/fprobe.list
70
71 clean:
72 rm -rf $(PKG_BUILD_DIR)
73 rm -f $(PKG_IPK)
This page took 0.051697 seconds and 5 git commands to generate.