3 include $(TOPDIR
)/rules.mk
8 PKG_MD5SUM
:=06bf140893e7cb120aaa9372d10a0100
10 PKG_SOURCE_URL
:=http
://www.snort.org
/dl
/current
/
11 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
14 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
15 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
17 include $(TOPDIR
)/package
/rules.mk
19 PKG_CONFIGURE_OPTS
:= \
20 --target
=$(GNU_TARGET_NAME
) \
21 --host
=$(GNU_TARGET_NAME
) \
22 --build
=$(GNU_HOST_NAME
) \
28 --datadir=/usr
/share \
29 --includedir=/usr
/include \
30 --infodir=/usr
/share
/info \
32 --libexecdir
=/usr
/lib
/locate \
33 --localstatedir
=/var
/lib \
34 --mandir=/usr
/share
/man \
37 $(DISABLE_LARGEFILE
) \
42 --with-libnet-includes
="$(STAGING_DIR)/usr/include" \
43 --with-libnet-libraries
="$(STAGING_DIR)/usr/lib" \
44 --with-libpcap-includes
="$(STAGING_DIR)/usr/include" \
45 --with-libpcap-libraries
="$(STAGING_DIR)/usr/lib" \
46 --with-libpcre-includes
="$(STAGING_DIR)/usr/include" \
47 --with-libpcre-libraries
="$(STAGING_DIR)/usr/lib" \
49 SNORT_BASIC_CONFIGURE_OPTS
:= \
51 --without-postgresql \
53 SNORT_MYSQL_CONFIGURE_OPTS
:= \
54 --with-mysql
=$(STAGING_DIR
)/usr \
55 --without-postgresql \
57 SNORT_PGSQL_CONFIGURE_OPTS
:= \
59 --with-postgresql
=$(STAGING_DIR
)/usr \
61 SNORT_CUSTOM_CONFIGURE_OPTS
:= \
63 ifeq ($(BR2_PACKAGE_SNORT_ENABLE_DEBUG
),y
)
64 SNORT_CUSTOM_CONFIGURE_OPTS
+= --enable-debug
66 SNORT_CUSTOM_CONFIGURE_OPTS
+= --disable-debug
69 ifeq ($(BR2_PACKAGE_SNORT_ENABLE_INLINE
),y
)
70 SNORT_CUSTOM_CONFIGURE_OPTS
+= --enable-inline
71 SNORT_CUSTOM_CONFIGURE_OPTS
+= --with-libipq-includes
="$(STAGING_DIR)/include/libipq"
72 SNORT_CUSTOM_CONFIGURE_OPTS
+= --with-libipq-libraries
="$(STAGING_DIR)/lib"
74 SNORT_CUSTOM_CONFIGURE_OPTS
+= --disable-inline
77 ifeq ($(BR2_PACKAGE_SNORT_WITH_MYSQL
),y
)
78 SNORT_CUSTOM_CONFIGURE_OPTS
+= --with-mysql
="$(STAGING_DIR)/usr"
80 SNORT_CUSTOM_CONFIGURE_OPTS
+= --without-mysql
83 ifeq ($(BR2_PACKAGE_SNORT_WITH_PGSQL
),y
)
84 SNORT_CUSTOM_CONFIGURE_OPTS
+= --with-postgresql
="$(STAGING_DIR)/usr"
86 SNORT_CUSTOM_CONFIGURE_OPTS
+= --without-postgresql
91 ifneq ($(BR2_PACKAGE_
$(1)),)
92 BUILD_TARGETS
+= $(PKG_BUILD_DIR
)/$(2)
95 $(PKG_BUILD_DIR
)/$(2): $(PKG_BUILD_DIR
)/.prepared
96 touch
-r
$(PKG_BUILD_DIR
)/Makefile.am
$(PKG_BUILD_DIR
)/configure.in
97 touch
-r
$(PKG_BUILD_DIR
)/Makefile.in
$(PKG_BUILD_DIR
)/configure
98 -$(MAKE
) -C
$(PKG_BUILD_DIR
) distclean
99 (cd
$(PKG_BUILD_DIR
); rm -rf config.
{cache
,status
} ; \
100 $(TARGET_CONFIGURE_OPTS
) \
101 CFLAGS
="$(TARGET_CFLAGS)" \
102 CPPFLAGS
="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/usr/include/mysql" \
103 LDFLAGS
="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/usr/lib/mysql" \
105 $(PKG_CONFIGURE_OPTS
) \
106 $$($(1)_CONFIGURE_OPTS
) \
108 $(MAKE
) -C
$(PKG_BUILD_DIR
)
109 mv
$(PKG_BUILD_DIR
)/src
/snort
$(PKG_BUILD_DIR
)/$(2)
111 $$(IPKG_
$(1)): $(PKG_BUILD_DIR
)/.installed
$(PKG_BUILD_DIR
)/$(2)
112 install -m0644 .
/ipkg
/snort.conffiles
$$(IDIR_
$(1))/CONTROL
/conffiles
113 install -d
-m0755
$$(IDIR_
$(1))/etc
/default
114 install -m0644 .
/files
/snort.default
$$(IDIR_
$(1))/etc
/default
/snort
115 install -d
-m0755
$$(IDIR_
$(1))/etc
/init.d
116 install -m0755 .
/files
/snort.init
$$(IDIR_
$(1))/etc
/init.d
/snort
117 install -d
-m0755
$$(IDIR_
$(1))/etc
/snort
118 install -m0644
$(PKG_BUILD_DIR
)/etc
/snort.conf
$$(IDIR_
$(1))/etc
/snort
/
119 install -m0644
$(PKG_BUILD_DIR
)/etc
/classification.config
$$(IDIR_
$(1))/etc
/snort
/
120 install -m0644
$(PKG_BUILD_DIR
)/etc
/gen-msg.map
$$(IDIR_
$(1))/etc
/snort
/
121 install -m0644
$(PKG_BUILD_DIR
)/etc
/reference.config
$$(IDIR_
$(1))/etc
/snort
/
122 install -m0644
$(PKG_BUILD_DIR
)/etc
/sid-msg.map
$$(IDIR_
$(1))/etc
/snort
/
123 install -m0644
$(PKG_BUILD_DIR
)/etc
/threshold.conf
$$(IDIR_
$(1))/etc
/snort
/
124 install -m0644
$(PKG_BUILD_DIR
)/etc
/unicode.map
$$(IDIR_
$(1))/etc
/snort
/
125 install -d
-m0755
$$(IDIR_
$(1))/usr
/sbin
126 install -m0755
$(PKG_BUILD_DIR
)/$(2) $$(IDIR_
$(1))/usr
/sbin
/snort
127 $(RSTRIP
) $$(IDIR_
$(1))
128 mkdir
-p
$(PACKAGE_DIR
)
129 $(IPKG_BUILD
) $$(IDIR_
$(1)) $(PACKAGE_DIR
)
133 $(eval
$(call PKG_template
,SNORT_BASIC
,snort
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
134 $(eval
$(call PKG_template
,SNORT_MYSQL
,snort-mysql
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
135 $(eval
$(call PKG_template
,SNORT_PGSQL
,snort-pgsql
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
136 $(eval
$(call PKG_template
,SNORT_CUSTOM
,snort-custom
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
138 $(eval
$(call PKG_build
,SNORT_BASIC
,snort
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
139 $(eval
$(call PKG_build
,SNORT_MYSQL
,snort-mysql
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
140 $(eval
$(call PKG_build
,SNORT_PGSQL
,snort-pgsql
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
141 $(eval
$(call PKG_build
,SNORT_CUSTOM
,snort-custom
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
143 $(PKG_BUILD_DIR
)/.configured
:
146 $(PKG_BUILD_DIR
)/.built
: $(BUILD_TARGETS
)
149 $(PKG_BUILD_DIR
)/.installed
: $(PKG_BUILD_DIR
)/.built
150 mkdir
-p
$(PKG_INSTALL_DIR
)
151 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
152 DESTDIR
="$(PKG_INSTALL_DIR)" \
154 touch
$(PKG_BUILD_DIR
)/.installed