1 include $(TOPDIR
)/rules.mk
3 PKG_NAME
:=snort-wireless
4 PKG_VERSION
:=2.4.3-alpha04
6 PKG_MD5SUM
:=1aa699ae279bf7a1140cf6cca02f9999
8 PKG_SOURCE_URL
:=http
://www.snort-wireless.org
/files
/
9 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
12 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
13 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
15 include $(TOPDIR
)/package
/rules.mk
17 PKG_CONFIGURE_OPTS
:= \
18 --target
=$(GNU_TARGET_NAME
) \
19 --host
=$(GNU_TARGET_NAME
) \
20 --build
=$(GNU_HOST_NAME
) \
26 --datadir=/usr
/share \
27 --includedir=/usr
/include \
28 --infodir=/usr
/share
/info \
30 --libexecdir
=/usr
/lib
/locate \
31 --localstatedir
=/var
/lib \
32 --mandir=/usr
/share
/man \
35 $(DISABLE_LARGEFILE
) \
40 --with-libnet-includes
="$(STAGING_DIR)/usr/include" \
41 --with-libnet-libraries
="$(STAGING_DIR)/usr/lib" \
42 --with-libpcap-includes
="$(STAGING_DIR)/usr/include" \
43 --with-libpcap-libraries
="$(STAGING_DIR)/usr/lib" \
44 --with-libpcre-includes
="$(STAGING_DIR)/usr/include" \
45 --with-libpcre-libraries
="$(STAGING_DIR)/usr/lib" \
47 SNORT_WIRELESS_BASIC_CONFIGURE_OPTS
:= \
49 --without-postgresql \
51 SNORT_WIRELESS_MYSQL_CONFIGURE_OPTS
:= \
52 --with-mysql
=$(STAGING_DIR
)/usr \
53 --without-postgresql \
55 SNORT_WIRELESS_PGSQL_CONFIGURE_OPTS
:= \
57 --with-postgresql
=$(STAGING_DIR
)/usr \
59 SNORT_WIRELESS_CUSTOM_CONFIGURE_OPTS
:= \
61 ifeq ($(BR2_PACKAGE_SNORT_WIRELESS_ENABLE_DEBUG
),y
)
62 SNORT_WIRELESS_CUSTOM_CONFIGURE_OPTS
+= --enable-debug
64 SNORT_WIRELESS_CUSTOM_CONFIGURE_OPTS
+= --disable-debug
67 ifeq ($(BR2_PACKAGE_SNORT_WIRELESS_ENABLE_INLINE
),y
)
68 SNORT_WIRELESS_CUSTOM_CONFIGURE_OPTS
+= --enable-inline
69 SNORT_WIRELESS_CUSTOM_CONFIGURE_OPTS
+= --with-libipq-includes
="$(STAGING_DIR)/include/libipq"
70 SNORT_WIRELESS_CUSTOM_CONFIGURE_OPTS
+= --with-libipq-libraries
="$(STAGING_DIR)/lib"
72 SNORT_WIRELESS_CUSTOM_CONFIGURE_OPTS
+= --disable-inline
75 ifeq ($(BR2_PACKAGE_SNORT_WIRELESS_WITH_MYSQL
),y
)
76 SNORT_WIRELESS_CUSTOM_CONFIGURE_OPTS
+= --with-mysql
="$(STAGING_DIR)/usr"
78 SNORT_WIRELESS_CUSTOM_CONFIGURE_OPTS
+= --without-mysql
81 ifeq ($(BR2_PACKAGE_SNORT_WIRELESS_WITH_PGSQL
),y
)
82 SNORT_WIRELESS_CUSTOM_CONFIGURE_OPTS
+= --with-postgresql
="$(STAGING_DIR)/usr"
84 SNORT_WIRELESS_CUSTOM_CONFIGURE_OPTS
+= --without-postgresql
89 ifneq ($(BR2_PACKAGE_
$(1)),)
90 BUILD_TARGETS
+= $(PKG_BUILD_DIR
)/$(2)
93 $(PKG_BUILD_DIR
)/$(2): $(PKG_BUILD_DIR
)/.prepared
94 touch
-r
$(PKG_BUILD_DIR
)/Makefile.am
$(PKG_BUILD_DIR
)/configure.in
95 touch
-r
$(PKG_BUILD_DIR
)/Makefile.in
$(PKG_BUILD_DIR
)/configure
96 -$(MAKE
) -C
$(PKG_BUILD_DIR
) distclean
97 (cd
$(PKG_BUILD_DIR
); rm -rf config.
{cache
,status
} ; \
98 $(TARGET_CONFIGURE_OPTS
) \
99 CFLAGS
="$(TARGET_CFLAGS)" \
100 CPPFLAGS
="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/usr/include/mysql" \
101 LDFLAGS
="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/usr/lib/mysql" \
103 $(PKG_CONFIGURE_OPTS
) \
104 $$($(1)_CONFIGURE_OPTS
) \
106 $(MAKE
) -C
$(PKG_BUILD_DIR
)
107 mv
$(PKG_BUILD_DIR
)/src
/snort
$(PKG_BUILD_DIR
)/$(2)
109 $$(IPKG_
$(1)): $(PKG_BUILD_DIR
)/.installed
$(PKG_BUILD_DIR
)/$(2)
110 install -m0644 .
/ipkg
/snort-wireless.conffiles
$$(IDIR_
$(1))/CONTROL
/conffiles
111 install -d
-m0755
$$(IDIR_
$(1))/etc
/default
112 install -m0644 .
/files
/snort-wireless.default
$$(IDIR_
$(1))/etc
/default
/snort
113 install -d
-m0755
$$(IDIR_
$(1))/etc
/init.d
114 install -m0755 .
/files
/snort-wireless.init
$$(IDIR_
$(1))/etc
/init.d
/snort
115 install -d
-m0755
$$(IDIR_
$(1))/etc
/snort
116 install -m0644
$(PKG_BUILD_DIR
)/etc
/snort.conf
$$(IDIR_
$(1))/etc
/snort
/
117 install -m0644
$(PKG_BUILD_DIR
)/etc
/classification.config
$$(IDIR_
$(1))/etc
/snort
/
118 install -m0644
$(PKG_BUILD_DIR
)/etc
/gen-msg.map
$$(IDIR_
$(1))/etc
/snort
/
119 install -m0644
$(PKG_BUILD_DIR
)/etc
/reference.config
$$(IDIR_
$(1))/etc
/snort
/
120 install -m0644
$(PKG_BUILD_DIR
)/etc
/sid-msg.map
$$(IDIR_
$(1))/etc
/snort
/
121 install -m0644
$(PKG_BUILD_DIR
)/etc
/threshold.conf
$$(IDIR_
$(1))/etc
/snort
/
122 install -m0644
$(PKG_BUILD_DIR
)/etc
/unicode.map
$$(IDIR_
$(1))/etc
/snort
/
123 install -d
-m0755
$$(IDIR_
$(1))/usr
/sbin
124 install -m0755
$(PKG_BUILD_DIR
)/$(2) $$(IDIR_
$(1))/usr
/sbin
/snort
125 $(RSTRIP
) $$(IDIR_
$(1))
126 mkdir
-p
$(PACKAGE_DIR
)
127 $(IPKG_BUILD
) $$(IDIR_
$(1)) $(PACKAGE_DIR
)
131 $(eval
$(call PKG_template
,SNORT_WIRELESS_BASIC
,snort-wireless
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
132 $(eval
$(call PKG_template
,SNORT_WIRELESS_MYSQL
,snort-wireless-mysql
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
133 $(eval
$(call PKG_template
,SNORT_WIRELESS_PGSQL
,snort-wireless-pgsql
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
134 $(eval
$(call PKG_template
,SNORT_WIRELESS_CUSTOM
,snort-wireless-custom
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
136 $(eval
$(call PKG_build
,SNORT_WIRELESS_BASIC
,snort-wireless
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
137 $(eval
$(call PKG_build
,SNORT_WIRELESS_MYSQL
,snort-wireless-mysql
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
138 $(eval
$(call PKG_build
,SNORT_WIRELESS_PGSQL
,snort-wireless-pgsql
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
139 $(eval
$(call PKG_build
,SNORT_WIRELESS_CUSTOM
,snort-wireless-custom
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
141 $(PKG_BUILD_DIR
)/.configured
:
144 $(PKG_BUILD_DIR
)/.built
: $(BUILD_TARGETS
)
147 $(PKG_BUILD_DIR
)/.installed
: $(PKG_BUILD_DIR
)/.built
148 mkdir
-p
$(PKG_INSTALL_DIR
)
149 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
150 DESTDIR
="$(PKG_INSTALL_DIR)" \
152 touch
$(PKG_BUILD_DIR
)/.installed