add screen
[openwrt.git] / package / arpwatch / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=arpwatch
6 PKG_VERSION:=2.1a11
7 PKG_RELEASE:=1
8 PKG_MD5SUM:=9ecd00db892737431b0e524f3e52e19e
9
10 PKG_SOURCE_URL:= \
11 http://nbd.vd-s.ath.cx/openwrt \
12 http://nthill.free.fr/openwrt/sources/$(PKG_NAME)/
13 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
14 PKG_CAT:=zcat
15
16 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/$(PKG_NAME)-$(PKG_VERSION)
17
18 IPKG_ARPWATCH:=$(PACKAGE_DIR)/$(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
19 IDIR_ARPWATCH:=$(PKG_BUILD_DIR)/ipkg/$(PKG_NAME)
20 INFO_ARPWATCH:=$(IPKG_STATE_DIR)/info/$(PKG_NAME).list
21
22 $(DL_DIR)/$(PKG_SOURCE):
23 $(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE) $(PKG_MD5SUM) $(PKG_SOURCE_URL)
24
25 $(PKG_BUILD_DIR)/.prepared: $(DL_DIR)/$(PKG_SOURCE)
26 mkdir -p $(BUILD_DIR)/$(PKG_NAME)
27 $(PKG_CAT) $(DL_DIR)/$(PKG_SOURCE) | tar -C $(BUILD_DIR)/$(PKG_NAME) $(TAR_OPTIONS) -
28 touch $(PKG_BUILD_DIR)/.prepared
29
30 $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
31 (cd $(PKG_BUILD_DIR); rm -rf config.cache; \
32 $(TARGET_CONFIGURE_OPTS) \
33 CFLAGS="$(TARGET_CFLAGS)" \
34 CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
35 LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
36 ./configure \
37 --target=$(GNU_TARGET_NAME) \
38 --host=$(GNU_TARGET_NAME) \
39 --build=$(GNU_HOST_NAME) \
40 --program-prefix="" \
41 --program-suffix="" \
42 --prefix=/usr \
43 --exec-prefix=/usr \
44 --bindir=/usr/bin \
45 --datadir=/usr/share \
46 --includedir=/usr/include \
47 --infodir=/usr/share/info \
48 --libdir=/usr/lib \
49 --libexecdir=/usr/lib \
50 --localstatedir=/var \
51 --mandir=/usr/share/man \
52 --sbindir=/usr/sbin \
53 --sysconfdir=/etc \
54 $(DISABLE_NLS) \
55 $(DISABLE_LARGEFILE) \
56 );
57 touch $(PKG_BUILD_DIR)/.configured
58
59 $(PKG_BUILD_DIR)/$(PKG_NAME): $(PKG_BUILD_DIR)/.configured
60 $(MAKE) -C $(PKG_BUILD_DIR) \
61 ARPDIR=/etc/arpwatch \
62 CCOPT="$(TARGET_CFLAGS)" \
63 INCLS="-I. -I$(STAGING_DIR)/usr/include" \
64 LIBS="-L$(STAGING_DIR)/usr/lib -lpcap" \
65
66
67 $(IPKG_ARPWATCH): $(PKG_BUILD_DIR)/$(PKG_NAME)
68 $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_ARPWATCH) $(PKG_NAME).control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
69 cp arpwatch.conffiles $(IDIR_ARPWATCH)/CONTROL/conffiles
70 mkdir -p $(IDIR_ARPWATCH)/usr/sbin
71 cp $(PKG_BUILD_DIR)/arpwatch $(IDIR_ARPWATCH)/usr/sbin/
72 cp $(PKG_BUILD_DIR)/arpsnmp $(IDIR_ARPWATCH)/usr/sbin/
73 $(STRIP) $(IDIR_ARPWATCH)/usr/sbin/*
74 mkdir -p $(IDIR_ARPWATCH)/etc/arpwatch
75 cp $(PKG_BUILD_DIR)/arp.dat $(IDIR_ARPWATCH)/etc/arpwatch/
76 mkdir -p $(PACKAGE_DIR)
77 $(IPKG_BUILD) $(IDIR_ARPWATCH) $(PACKAGE_DIR)
78
79 $(INFO_ARPWATCH): $(IPKG_ARPWATCH)
80 $(IPKG) install $(IPKG_ARPWATCH)
81
82 source: $(DL_DIR)/$(PKG_SOURCE)
83 prepare: $(PKG_BUILD_DIR)/.prepared
84 compile: $(IPKG_ARPWATCH)
85 install: $(INFO_ARPWATCH)
86
87 clean:
88 rm -rf $(PKG_BUILD_DIR) $(IPKG_ARPWATCH)
This page took 0.045452 seconds and 5 git commands to generate.