3 include $(TOPDIR
)/rules.mk
8 PKG_MD5SUM
:=9ecd00db892737431b0e524f3e52e19e
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
16 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)/$(PKG_NAME
)-$(PKG_VERSION
)
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
22 $(DL_DIR
)/$(PKG_SOURCE
):
23 $(SCRIPT_DIR
)/download.pl
$(DL_DIR
) $(PKG_SOURCE
) $(PKG_MD5SUM
) $(PKG_SOURCE_URL
)
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
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" \
37 --target
=$(GNU_TARGET_NAME
) \
38 --host
=$(GNU_TARGET_NAME
) \
39 --build
=$(GNU_HOST_NAME
) \
45 --datadir=/usr
/share \
46 --includedir=/usr
/include \
47 --infodir=/usr
/share
/info \
49 --libexecdir
=/usr
/lib \
50 --localstatedir
=/var \
51 --mandir=/usr
/share
/man \
55 $(DISABLE_LARGEFILE
) \
57 touch
$(PKG_BUILD_DIR
)/.configured
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" \
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
)
79 $(INFO_ARPWATCH
): $(IPKG_ARPWATCH
)
80 $(IPKG
) install $(IPKG_ARPWATCH
)
82 source
: $(DL_DIR
)/$(PKG_SOURCE
)
83 prepare
: $(PKG_BUILD_DIR
)/.prepared
84 compile
: $(IPKG_ARPWATCH
)
85 install: $(INFO_ARPWATCH
)
88 rm -rf
$(PKG_BUILD_DIR
) $(IPKG_ARPWATCH
)