3 include $(TOPDIR
)/rules.mk
8 PKG_MD5SUM
:=06bf140893e7cb120aaa9372d10a0100
11 http
://www.snort.org
/dl
/current
/ \
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_VERSION
)
17 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
19 include $(TOPDIR
)/package
/templates.mk
21 PKG_CONFIGURE_OPTS
:= \
22 --target
=$(GNU_TARGET_NAME
) \
23 --host
=$(GNU_TARGET_NAME
) \
24 --build
=$(GNU_HOST_NAME
) \
30 --datadir=/usr
/share \
31 --includedir=/usr
/include \
32 --infodir=/usr
/share
/info \
34 --libexecdir
=/usr
/lib
/locate \
35 --localstatedir
=/var
/lib \
36 --mandir=/usr
/share
/man \
39 $(DISABLE_LARGEFILE
) \
44 --with-libnet-includes
="$(STAGING_DIR)/usr/include" \
45 --with-libnet-libraries
="$(STAGING_DIR)/usr/lib" \
46 --with-libpcap-includes
="$(STAGING_DIR)/usr/include" \
47 --with-libpcap-libraries
="$(STAGING_DIR)/usr/lib" \
48 --with-libpcre-includes
="$(STAGING_DIR)/usr/include" \
49 --with-libpcre-libraries
="$(STAGING_DIR)/usr/lib" \
51 SNORT_BASIC_CONFIGURE_OPTS
:= \
53 --without-postgresql \
55 SNORT_MYSQL_CONFIGURE_OPTS
:= \
56 --with-mysql
=$(STAGING_DIR
)/usr \
57 --without-postgresql \
59 SNORT_PGSQL_CONFIGURE_OPTS
:= \
61 --with-postgresql
=$(STAGING_DIR
)/usr \
63 SNORT_CUSTOM_CONFIGURE_OPTS
:= \
65 ifeq ($(BR2_PACKAGE_SNORT_ENABLE_DEBUG
),y
)
66 SNORT_CUSTOM_CONFIGURE_OPTS
+= --enable-debug
68 SNORT_CUSTOM_CONFIGURE_OPTS
+= --disable-debug
71 ifeq ($(BR2_PACKAGE_SNORT_ENABLE_INLINE
),y
)
72 SNORT_CUSTOM_CONFIGURE_OPTS
+= --enable-inline
73 SNORT_CUSTOM_CONFIGURE_OPTS
+= --with-libipq-includes
="$(STAGING_DIR)/include/libipq"
74 SNORT_CUSTOM_CONFIGURE_OPTS
+= --with-libipq-libraries
="$(STAGING_DIR)/lib"
76 SNORT_CUSTOM_CONFIGURE_OPTS
+= --disable-inline
79 ifeq ($(BR2_PACKAGE_SNORT_WITH_MYSQL
),y
)
80 SNORT_CUSTOM_CONFIGURE_OPTS
+= --with-mysql
="$(STAGING_DIR)/usr"
82 SNORT_CUSTOM_CONFIGURE_OPTS
+= --without-mysql
85 ifeq ($(BR2_PACKAGE_SNORT_WITH_PGSQL
),y
)
86 SNORT_CUSTOM_CONFIGURE_OPTS
+= --with-postgresql
="$(STAGING_DIR)/usr"
88 SNORT_CUSTOM_CONFIGURE_OPTS
+= --without-postgresql
93 ifneq ($(BR2_PACKAGE_
$(1)),)
94 BUILD_TARGETS
+= $(PKG_BUILD_DIR
)/$(2)
97 $(PKG_BUILD_DIR
)/$(2): $(PKG_BUILD_DIR
)/.prepared
98 touch
-r
$(PKG_BUILD_DIR
)/Makefile.am
$(PKG_BUILD_DIR
)/configure.in
99 touch
-r
$(PKG_BUILD_DIR
)/Makefile.in
$(PKG_BUILD_DIR
)/configure
100 -$(MAKE
) -C
$(PKG_BUILD_DIR
) distclean
101 (cd
$(PKG_BUILD_DIR
); rm -rf config.
{cache
,status
} ; \
102 $(TARGET_CONFIGURE_OPTS
) \
103 CFLAGS
="$(TARGET_CFLAGS)" \
104 CPPFLAGS
="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/usr/include/mysql" \
105 LDFLAGS
="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/usr/lib/mysql" \
107 $(PKG_CONFIGURE_OPTS
) \
108 $$($(1)_CONFIGURE_OPTS
) \
110 $(MAKE
) -C
$(PKG_BUILD_DIR
)
111 mv
$(PKG_BUILD_DIR
)/src
/snort
$(PKG_BUILD_DIR
)/$(2)
113 $$(IPKG_
$(1)): $(PKG_BUILD_DIR
)/.installed
$(PKG_BUILD_DIR
)/$(2)
115 $(SCRIPT_DIR
)/make-ipkg-dir.sh
$$(IDIR_
$(1)) .
/ipkg
/$(2).control
$(3) $(4)
116 install -m0644 .
/ipkg
/snort.conffiles
$$(IDIR_
$(1))/CONTROL
/conffiles
117 install -d
-m0755
$$(IDIR_
$(1))/etc
/default
118 install -m0644 .
/ipkg
/snort.default
$$(IDIR_
$(1))/etc
/default
/snort
119 install -d
-m0755
$$(IDIR_
$(1))/etc
/init.d
120 install -m0755 .
/ipkg
/snort.init
$$(IDIR_
$(1))/etc
/init.d
/snort
121 install -d
-m0755
$$(IDIR_
$(1))/etc
/snort
122 install -m0644
$(PKG_BUILD_DIR
)/etc
/snort.conf
$$(IDIR_
$(1))/etc
/snort
/
123 install -m0644
$(PKG_BUILD_DIR
)/etc
/classification.config
$$(IDIR_
$(1))/etc
/snort
/
124 install -m0644
$(PKG_BUILD_DIR
)/etc
/gen-msg.map
$$(IDIR_
$(1))/etc
/snort
/
125 install -m0644
$(PKG_BUILD_DIR
)/etc
/reference.config
$$(IDIR_
$(1))/etc
/snort
/
126 install -m0644
$(PKG_BUILD_DIR
)/etc
/sid-msg.map
$$(IDIR_
$(1))/etc
/snort
/
127 install -m0644
$(PKG_BUILD_DIR
)/etc
/threshold.conf
$$(IDIR_
$(1))/etc
/snort
/
128 install -m0644
$(PKG_BUILD_DIR
)/etc
/unicode.map
$$(IDIR_
$(1))/etc
/snort
/
129 install -d
-m0755
$$(IDIR_
$(1))/usr
/sbin
130 install -m0755
$(PKG_BUILD_DIR
)/$(2) $$(IDIR_
$(1))/usr
/sbin
/snort
131 $(RSTRIP
) $$(IDIR_
$(1))
132 mkdir
-p
$(PACKAGE_DIR
)
133 $(IPKG_BUILD
) $$(IDIR_
$(1)) $(PACKAGE_DIR
)
137 $(eval
$(call PKG_template
,SNORT_BASIC
,snort
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
138 $(eval
$(call PKG_template
,SNORT_MYSQL
,snort-mysql
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
139 $(eval
$(call PKG_template
,SNORT_PGSQL
,snort-pgsql
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
140 $(eval
$(call PKG_template
,SNORT_CUSTOM
,snort-custom
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
142 $(eval
$(call PKG_build
,SNORT_BASIC
,snort
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
143 $(eval
$(call PKG_build
,SNORT_MYSQL
,snort-mysql
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
144 $(eval
$(call PKG_build
,SNORT_PGSQL
,snort-pgsql
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
145 $(eval
$(call PKG_build
,SNORT_CUSTOM
,snort-custom
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
147 include $(TOPDIR
)/package
/rules.mk
149 $(PKG_BUILD_DIR
)/.built
: $(BUILD_TARGETS
)
150 touch
$(PKG_BUILD_DIR
)/.built
152 $(PKG_BUILD_DIR
)/.installed
: $(PKG_BUILD_DIR
)/.built
153 mkdir
-p
$(PKG_INSTALL_DIR
)
154 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
155 DESTDIR
="$(PKG_INSTALL_DIR)" \
157 touch
$(PKG_BUILD_DIR
)/.installed