3 include $(TOPDIR
)/rules.mk
8 PKG_MD5SUM
:=692602827ce9d1a611630149f8e50ec8
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
) \
45 --with-libnet-includes
="$(STAGING_DIR)/usr/include" \
46 --with-libnet-libraries
="$(STAGING_DIR)/usr/lib" \
47 --with-libpcap-includes
="$(STAGING_DIR)/usr/include" \
48 --with-libpcap-libraries
="$(STAGING_DIR)/usr/lib" \
49 --with-libpcre-includes
="$(STAGING_DIR)/usr/include" \
50 --with-libpcre-libraries
="$(STAGING_DIR)/usr/lib" \
56 SNORT_BASIC_CONFIGURE_OPTS
:= \
58 --without-postgresql \
60 SNORT_MYSQL_CONFIGURE_OPTS
:= \
61 --with-mysql
=$(STAGING_DIR
)/usr \
62 --without-postgresql \
64 SNORT_PGSQL_CONFIGURE_OPTS
:= \
66 --with-postgresql
=$(STAGING_DIR
)/usr \
68 SNORT_CUSTOM_CONFIGURE_OPTS
:= \
70 ifeq ($(BR2_PACKAGE_SNORT_WITH_MYSQL
),y
)
71 SNORT_CUSTOM_CONFIGURE_OPTS
+= --with-mysql
="$(STAGING_DIR)/usr"
73 SNORT_CUSTOM_CONFIGURE_OPTS
+= --without-mysql
75 ifeq ($(BR2_PACKAGE_SNORT_WITH_PGSQL
),y
)
76 SNORT_CUSTOM_CONFIGURE_OPTS
+= --with-postgresql
="$(STAGING_DIR)/usr"
78 SNORT_CUSTOM_CONFIGURE_OPTS
+= --without-postgresql
83 ifneq ($(BR2_PACKAGE_
$(1)),)
84 BUILD_TARGETS
+= $(PKG_BUILD_DIR
)/$(2)
87 $(PKG_BUILD_DIR
)/$(2): $(PKG_BUILD_DIR
)/.prepared
88 -$(MAKE
) -C
$(PKG_BUILD_DIR
) distclean
89 (cd
$(PKG_BUILD_DIR
); rm -rf config.
{cache
,status
} ; \
90 $(TARGET_CONFIGURE_OPTS
) \
91 CFLAGS
="$(TARGET_CFLAGS)" \
92 CPPFLAGS
="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/usr/include/mysql" \
93 LDFLAGS
="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/usr/lib/mysql" \
95 $(PKG_CONFIGURE_OPTS
) \
96 $$($(1)_CONFIGURE_OPTS
) \
98 $(MAKE
) -C
$(PKG_BUILD_DIR
)
99 mv
$(PKG_BUILD_DIR
)/src
/snort
$(PKG_BUILD_DIR
)/$(2)
101 $(PKG_INSTALL_DIR
)/usr
/sbin
/$(2): $(PKG_BUILD_DIR
)/$(2)
102 install -m0755
$(PKG_BUILD_DIR
)/$(2) $(PKG_INSTALL_DIR
)/usr
/sbin
/
104 $$(IPKG_
$(1)): $(PKG_BUILD_DIR
)/.installed
$(PKG_INSTALL_DIR
)/usr
/sbin
/$(2)
106 $(SCRIPT_DIR
)/make-ipkg-dir.sh
$$(IDIR_
$(1)) .
/ipkg
/$(2).control
$(3) $(4)
107 install -m0644 .
/ipkg
/snort.conffiles
$$(IDIR_
$(1))/CONTROL
/conffiles
108 install -d
-m0755
$$(IDIR_
$(1))/etc
/default
109 install -m0644 .
/ipkg
/snort.default
$$(IDIR_
$(1))/etc
/default
/snort
110 install -d
-m0755
$$(IDIR_
$(1))/etc
/init.d
111 install -m0755 .
/ipkg
/snort.init
$$(IDIR_
$(1))/etc
/init.d
/snort
112 install -d
-m0755
$$(IDIR_
$(1))/etc
/snort
113 install -m0644
$(PKG_BUILD_DIR
)/etc
/snort.conf
$$(IDIR_
$(1))/etc
/snort
/
114 install -m0644
$(PKG_BUILD_DIR
)/etc
/classification.config
$$(IDIR_
$(1))/etc
/snort
/
115 install -m0644
$(PKG_BUILD_DIR
)/etc
/gen-msg.map
$$(IDIR_
$(1))/etc
/snort
/
116 install -m0644
$(PKG_BUILD_DIR
)/etc
/reference.config
$$(IDIR_
$(1))/etc
/snort
/
117 install -m0644
$(PKG_BUILD_DIR
)/etc
/sid-msg.map
$$(IDIR_
$(1))/etc
/snort
/
118 install -m0644
$(PKG_BUILD_DIR
)/etc
/threshold.conf
$$(IDIR_
$(1))/etc
/snort
/
119 install -m0644
$(PKG_BUILD_DIR
)/etc
/unicode.map
$$(IDIR_
$(1))/etc
/snort
/
120 install -d
-m0755
$$(IDIR_
$(1))/usr
/sbin
121 cp
-fpR
$(PKG_INSTALL_DIR
)/usr
/sbin
/$(2) $$(IDIR_
$(1))/usr
/sbin
/snort
122 $(RSTRIP
) $$(IDIR_
$(1))
123 mkdir
-p
$(PACKAGE_DIR
)
124 $(IPKG_BUILD
) $$(IDIR_
$(1)) $(PACKAGE_DIR
)
128 $(eval
$(call PKG_template
,SNORT_BASIC
,snort
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
129 $(eval
$(call PKG_template
,SNORT_MYSQL
,snort-mysql
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
130 $(eval
$(call PKG_template
,SNORT_PGSQL
,snort-pgsql
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
131 $(eval
$(call PKG_template
,SNORT_CUSTOM
,snort-custom
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
133 $(eval
$(call PKG_build
,SNORT_BASIC
,snort
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
134 $(eval
$(call PKG_build
,SNORT_MYSQL
,snort-mysql
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
135 $(eval
$(call PKG_build
,SNORT_PGSQL
,snort-pgsql
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
136 $(eval
$(call PKG_build
,SNORT_CUSTOM
,snort-custom
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
138 include $(TOPDIR
)/package
/rules.mk
140 $(PKG_BUILD_DIR
)/.built
: $(BUILD_TARGETS
)
141 touch
$(PKG_BUILD_DIR
)/.built
143 $(PKG_BUILD_DIR
)/.installed
: $(PKG_BUILD_DIR
)/.built
144 mkdir
-p
$(PKG_INSTALL_DIR
)
145 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
146 DESTDIR
="$(PKG_INSTALL_DIR)" \
148 touch
$(PKG_BUILD_DIR
)/.installed