source: freewrt/package/ulogd/Makefile@ ca629a6

freewrt_1_0 freewrt_2_0
Last change on this file since ca629a6 was 2b62bdd, checked in by Waldemar Brodkorb <wbx@…>, 19 years ago

fix more typos from last bulk commit

git-svn-id: svn://www.freewrt.org/branches/freewrt_1_0@1005 afb5a338-a214-0410-bd46-81f09a774fd1

  • Property mode set to 100644
File size: 3.8 KB
Line 
1# $FreeWRT$
2#-
3# This file is part of the FreeWRT project. FreeWRT is copyrighted
4# material, please see the LICENCE file in the top-level directory
5# or at http://www.freewrt.org/licence for details.
6
7include $(TOPDIR)/rules.mk
8
9PKG_NAME:= ulogd
10PKG_VERSION:= 1.24
11PKG_RELEASE:= 2
12PKG_MD5SUM:= 05b4ed2926b9a22aaeaf642917bbf8ff
13PKG_INIT:= 49
14
15PKG_SOURCE_URL:= ftp://ftp.netfilter.org/pub/ulogd/ \
16 ftp://ftp.be.netfilter.org/pub/netfilter/ulogd/ \
17 ftp://ftp.de.netfilter.org/pub/netfilter/ulogd/ \
18 ftp://ftp.no.netfilter.org/pub/netfilter/ulogd/
19PKG_SOURCE:= $(PKG_NAME)-$(PKG_VERSION).tar.bz2
20
21ifneq ($(FWRT_PACKAGE_ULOGD_MOD_MYSQL),)
22ULOGD_MYSQL_OPTION:=--with-mysql=$(STAGING_DIR)/usr
23endif
24
25ifneq ($(FWRT_PACKAGE_ULOGD_MOD_PCAP),)
26ULOGD_PCAP_HEADER:=yes
27else
28ULOGD_PCAP_HEADER:=no
29endif
30
31ifneq ($(FWRT_PACKAGE_ULOGD_MOD_PGSQL),)
32ULOGD_PGSQL_OPTION:=--with-pgsql=$(STAGING_DIR)/usr
33endif
34
35ifneq ($(FWRT_PACKAGE_ULOGD_MOD_SQLITE),)
36ULOGD_SQLITE_OPTION:=--with-sqlite3=$(STAGING_DIR)/usr
37endif
38
39define IPKG_plugin_template
40
41$$(IPKG_$(1)):
42 install -m0755 -d $$(IDIR_$(1))/usr/lib/ulogd
43 for m in $(2); do \
44 $(CP) $(WRKINST)/usr/lib/ulogd/ulogd_$$$${m}.so $$(IDIR_$(1))/usr/lib/ulogd/ ; \
45 done
46 $(RSTRIP) $$(IDIR_$(1))
47 $(IPKG_BUILD) $$(IDIR_$(1)) $(PACKAGE_DIR)
48
49endef
50
51include $(TOPDIR)/mk/package.mk
52
53$(eval $(call PKG_template,ULOGD,ulogd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
54$(eval $(call PKG_template,ULOGD_MOD_MYSQL,ulogd-mod-mysql,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
55$(eval $(call PKG_template,ULOGD_MOD_PCAP,ulogd-mod-pcap,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
56$(eval $(call PKG_template,ULOGD_MOD_PGSQL,ulogd-mod-pgsql,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
57$(eval $(call PKG_template,ULOGD_MOD_SQLITE,ulogd-mod-sqlite,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
58$(eval $(call PKG_template,ULOGD_MOD_EXTRA,ulogd-mod-extra,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
59
60$(eval $(call IPKG_plugin_template,ULOGD_MOD_MYSQL,MYSQL))
61$(eval $(call IPKG_plugin_template,ULOGD_MOD_PCAP,PCAP))
62$(eval $(call IPKG_plugin_template,ULOGD_MOD_PGSQL,PGSQL))
63$(eval $(call IPKG_plugin_template,ULOGD_MOD_SQLITE,SQLITE3))
64$(eval $(call IPKG_plugin_template,ULOGD_MOD_EXTRA,LOCAL LOGEMU OPRINT PWSNIFF SYSLOG))
65
66$(WRKBUILD)/.configured:
67 (cd $(WRKBUILD); rm -rf config.{cache,status}; \
68 $(TARGET_CONFIGURE_OPTS) \
69 CFLAGS="$(TARGET_CFLAGS)" \
70 CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
71 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
72 ac_cv_header_pcap_h=$(ULOGD_PCAP_HEADER) \
73 ./configure \
74 --target=$(GNU_TARGET_NAME) \
75 --host=$(GNU_TARGET_NAME) \
76 --build=$(GNU_HOST_NAME) \
77 --program-prefix="" \
78 --program-suffix="" \
79 --prefix=/usr \
80 --exec-prefix=/usr \
81 --bindir=/usr/bin \
82 --datadir=/usr/share \
83 --includedir=/usr/include \
84 --infodir=/usr/share/info \
85 --libdir=/usr/lib \
86 --libexecdir=/usr/lib \
87 --localstatedir=/var \
88 --mandir=/usr/share/man \
89 --sbindir=/usr/sbin \
90 --sysconfdir=/etc \
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$(WRKBUILD)/.built:
101 rm -rf $(WRKINST)
102 mkdir -p $(WRKINST)
103 $(MAKE) -C $(WRKBUILD) \
104 DESTDIR="$(WRKINST)" \
105 STAGING_DIR=$(STAGING_DIR) \
106 all install
107 touch $@
108
109$(IPKG_ULOGD):
110 install -d -m0755 $(IDIR_ULOGD)/etc
111 $(CP) $(WRKINST)/etc/ulogd.conf $(IDIR_ULOGD)/etc/
112 install -d -m0755 $(IDIR_ULOGD)/etc/init.d
113 install -m0755 ./files/ulogd.init \
114 $(IDIR_ULOGD)/etc/init.d/S$(PKG_INIT)ulogd
115 install -d -m0755 $(IDIR_ULOGD)/usr/lib/ulogd
116 $(CP) $(WRKINST)/usr/lib/ulogd/ulogd_BASE.so $(IDIR_ULOGD)/usr/lib/ulogd/
117 install -d -m0755 $(IDIR_ULOGD)/usr/sbin
118 $(CP) $(WRKINST)/usr/sbin/ulogd $(IDIR_ULOGD)/usr/sbin/
119 $(RSTRIP) $(IDIR_ULOGD)
120 $(IPKG_BUILD) $(IDIR_ULOGD) $(PACKAGE_DIR)
Note: See TracBrowser for help on using the repository browser.