Add some mirrors
[openwrt.git] / package / libnids / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=libnids
6 PKG_VERSION:=1.18
7 PKG_RELEASE:=0
8 PKG_MD5SUM:=9ee6dcdfac97bae6fe611aa27d2594a5
9
10 PKG_SOURCE_URL:=http://www.packetfactory.net/projects/libnids/dist/
11 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
12 PKG_CAT:=zcat
13
14 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
15 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
16
17 include $(TOPDIR)/package/rules.mk
18
19 $(eval $(call PKG_template,LIBNIDS,libnids,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
20
21 $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
22 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
23 $(TARGET_CONFIGURE_OPTS) \
24 CFLAGS="$(TARGET_CFLAGS)" \
25 CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
26 LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
27 ./configure \
28 --target=$(GNU_TARGET_NAME) \
29 --host=$(GNU_TARGET_NAME) \
30 --build=$(GNU_HOST_NAME) \
31 --program-prefix="" \
32 --program-suffix="" \
33 --prefix=/usr \
34 --exec-prefix=/usr \
35 --bindir=/usr/bin \
36 --datadir=/usr/share \
37 --includedir=/usr/include \
38 --infodir=/usr/share/info \
39 --libdir=/usr/lib \
40 --libexecdir=/usr/lib \
41 --localstatedir=/var \
42 --mandir=/usr/share/man \
43 --sbindir=/usr/sbin \
44 --sysconfdir=/etc \
45 $(DISABLE_NLS) \
46 $(DISABLE_LARGEFILE) \
47 --enable-shared \
48 --enable-static \
49 --with-libnet="$(STAGING_DIR)/usr" \
50 --with-libpcap="$(STAGING_DIR)/usr" \
51 );
52 touch $@
53
54 $(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured
55 rm -rf $(PKG_INSTALL_DIR)
56 mkdir -p $(PKG_INSTALL_DIR)
57 $(MAKE) -C $(PKG_BUILD_DIR) \
58 $(TARGET_CONFIGURE_OPTS) \
59 install_prefix="$(PKG_INSTALL_DIR)" \
60 all install
61 touch $@
62
63 $(IPKG_LIBNIDS): $(STAGING_DIR)/usr/lib/libnids.so
64 install -m0755 -d $(IDIR_LIBNIDS)/usr/lib
65 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libnids.so.* $(IDIR_LIBNIDS)/usr/lib/
66 $(RSTRIP) $(IDIR_LIBNIDS)
67 $(IPKG_BUILD) $(IDIR_LIBNIDS) $(PACKAGE_DIR)
68
69 $(STAGING_DIR)/usr/lib/libnids.so: $(PKG_BUILD_DIR)/.built
70 mkdir -p $(STAGING_DIR)/usr/include
71 cp -fpR $(PKG_INSTALL_DIR)/usr/include/nids.h $(STAGING_DIR)/usr/include/
72 mkdir -p $(STAGING_DIR)/usr/lib
73 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libnids.{a,so*} $(STAGING_DIR)/usr/lib/
74 touch $(STAGING_DIR)/usr/lib/libnids.so
75
76 install-dev: $(STAGING_DIR)/usr/lib/libnids.so
77
78 uninstall-dev:
79 rm -rf $(STAGING_DIR)/usr/include/nids.h
80 rm -rf $(STAGING_DIR)/usr/lib/libnids.{a,so*}
81
82 compile: install-dev
83 clean: uninstall-dev
This page took 0.052542 seconds and 5 git commands to generate.