update busybox to v1.1.3, remove passwd_salt patch (fixed upstream).
[openwrt.git] / openwrt / package / ulogd / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=ulogd
6 PKG_VERSION:=1.24
7 PKG_RELEASE:=1
8 PKG_MD5SUM:=05b4ed2926b9a22aaeaf642917bbf8ff
9
10 PKG_SOURCE_URL:=ftp://ftp.netfilter.org/pub/ulogd/ \
11 ftp://ftp.be.netfilter.org/pub/netfilter/ulogd/ \
12 ftp://ftp.de.netfilter.org/pub/netfilter/ulogd/ \
13 ftp://ftp.no.netfilter.org/pub/netfilter/ulogd/
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_CAT:=bzcat
16
17 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
18 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
19
20 ifneq ($(BR2_PACKAGE_ULOGD_MOD_MYSQL),)
21 ULOGD_MYSQL_OPTION:=--with-mysql=$(STAGING_DIR)/usr
22 endif
23
24 ifneq ($(BR2_PACKAGE_ULOGD_MOD_PCAP),)
25 ULOGD_PCAP_HEADER:=yes
26 else
27 ULOGD_PCAP_HEADER:=no
28 endif
29
30 ifneq ($(BR2_PACKAGE_ULOGD_MOD_PGSQL),)
31 ULOGD_PGSQL_OPTION:=--with-pgsql=$(STAGING_DIR)/usr
32 endif
33
34 ifneq ($(BR2_PACKAGE_ULOGD_MOD_SQLITE),)
35 ULOGD_SQLITE_OPTION:=--with-sqlite3=$(STAGING_DIR)/usr
36 endif
37
38 define IPKG_plugin_template
39
40 $$(IPKG_$(1)):
41 install -m0755 -d $$(IDIR_$(1))/usr/lib/ulogd
42 for m in $(2); do \
43 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ulogd/ulogd_$$$${m}.so $$(IDIR_$(1))/usr/lib/ulogd/ ; \
44 done
45 $(RSTRIP) $$(IDIR_$(1))
46 $(IPKG_BUILD) $$(IDIR_$(1)) $(PACKAGE_DIR)
47
48 endef
49
50 include $(TOPDIR)/package/rules.mk
51
52 $(eval $(call PKG_template,ULOGD,ulogd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
53 $(eval $(call PKG_template,ULOGD_MOD_MYSQL,ulogd-mod-mysql,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
54 $(eval $(call PKG_template,ULOGD_MOD_PCAP,ulogd-mod-pcap,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
55 $(eval $(call PKG_template,ULOGD_MOD_PGSQL,ulogd-mod-pgsql,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
56 $(eval $(call PKG_template,ULOGD_MOD_SQLITE,ulogd-mod-sqlite,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
57 $(eval $(call PKG_template,ULOGD_MOD_EXTRA,ulogd-mod-extra,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
58
59 $(eval $(call IPKG_plugin_template,ULOGD_MOD_MYSQL,MYSQL))
60 $(eval $(call IPKG_plugin_template,ULOGD_MOD_PCAP,PCAP))
61 $(eval $(call IPKG_plugin_template,ULOGD_MOD_PGSQL,PGSQL))
62 $(eval $(call IPKG_plugin_template,ULOGD_MOD_SQLITE,SQLITE3))
63 $(eval $(call IPKG_plugin_template,ULOGD_MOD_EXTRA,LOCAL LOGEMU OPRINT PWSNIFF SYSLOG))
64
65 $(PKG_BUILD_DIR)/.configured:
66 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status}; \
67 $(TARGET_CONFIGURE_OPTS) \
68 CFLAGS="$(TARGET_CFLAGS)" \
69 CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
70 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
71 ac_cv_header_pcap_h=$(ULOGD_PCAP_HEADER) \
72 ./configure \
73 --target=$(GNU_TARGET_NAME) \
74 --host=$(GNU_TARGET_NAME) \
75 --build=$(GNU_HOST_NAME) \
76 --program-prefix="" \
77 --program-suffix="" \
78 --prefix=/usr \
79 --exec-prefix=/usr \
80 --bindir=/usr/bin \
81 --datadir=/usr/share \
82 --includedir=/usr/include \
83 --infodir=/usr/share/info \
84 --libdir=/usr/lib \
85 --libexecdir=/usr/lib \
86 --localstatedir=/var \
87 --mandir=/usr/share/man \
88 --sbindir=/usr/sbin \
89 --sysconfdir=/etc \
90 $(DISABLE_LARGEFILE) \
91 $(DISABLE_NLS) \
92 --enable-shared \
93 --disable-static \
94 $(ULOGD_MYSQL_OPTION) \
95 $(ULOGD_PGSQL_OPTION) \
96 $(ULOGD_SQLITE_OPTION) \
97 );
98 touch $@
99
100 $(PKG_BUILD_DIR)/.built:
101 rm -rf $(PKG_INSTALL_DIR)
102 mkdir -p $(PKG_INSTALL_DIR)
103 $(MAKE) -C $(PKG_BUILD_DIR) \
104 DESTDIR="$(PKG_INSTALL_DIR)" \
105 STAGING_DIR=$(STAGING_DIR) \
106 all install
107 touch $@
108
109 $(IPKG_ULOGD):
110 install -d -m0755 $(IDIR_ULOGD)/etc
111 $(CP) $(PKG_INSTALL_DIR)/etc/ulogd.conf $(IDIR_ULOGD)/etc/
112 install -d -m0755 $(IDIR_ULOGD)/etc/default
113 install -m0644 ./files/ulogd.default $(IDIR_ULOGD)/etc/default/ulogd
114 install -d -m0755 $(IDIR_ULOGD)/etc/init.d
115 install -m0755 ./files/ulogd.init $(IDIR_ULOGD)/etc/init.d/ulogd
116 ln -sf ulogd $(IDIR_ULOGD)/etc/init.d/S49ulogd
117 install -d -m0755 $(IDIR_ULOGD)/usr/lib/ulogd
118 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ulogd/ulogd_BASE.so $(IDIR_ULOGD)/usr/lib/ulogd/
119 install -d -m0755 $(IDIR_ULOGD)/usr/sbin
120 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/ulogd $(IDIR_ULOGD)/usr/sbin/
121 $(RSTRIP) $(IDIR_ULOGD)
122 $(IPKG_BUILD) $(IDIR_ULOGD) $(PACKAGE_DIR)
123
This page took 0.052374 seconds and 5 git commands to generate.