Standardize package Config.in, change prompt to package name + short description
[openwrt.git] / openwrt / package / ulogd / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=ulogd
6 PKG_VERSION:=1.23
7 PKG_RELEASE:=1
8 PKG_MD5SUM:=fa3dfcaacf31855626d5b731b04a077f
9
10 PKG_SOURCE_URL:=ftp://ftp.netfilter.org/pub/ulogd/
11 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
12 PKG_CAT:=bzcat
13
14 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
15 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
16
17 ifneq ($(BR2_PACKAGE_ULOGD_MOD_MYSQL),)
18 ULOGD_MYSQL_OPTION:=--with-mysql=$(STAGING_DIR)/usr
19 endif
20
21 ifneq ($(BR2_PACKAGE_ULOGD_MOD_PGSQL),)
22 ULOGD_PGSQL_OPTION:=--with-pgsql=$(STAGING_DIR)/usr
23 endif
24
25 define IPKG_plugin_template
26
27 $$(IPKG_$(1)):
28 install -m0755 -d $$(IDIR_$(1))/usr/lib/ulogd
29 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/ulogd/ulogd_$(2).so $$(IDIR_$(1))/usr/lib/ulogd/
30 $(RSTRIP) $$(IDIR_$(1))
31 $(IPKG_BUILD) $$(IDIR_$(1)) $(PACKAGE_DIR)
32
33 endef
34
35 include $(TOPDIR)/package/rules.mk
36
37 $(eval $(call PKG_template,ULOGD,ulogd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
38 $(eval $(call PKG_template,ULOGD_MOD_MYSQL,ulogd-mod-mysql,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
39 $(eval $(call PKG_template,ULOGD_MOD_PGSQL,ulogd-mod-pgsql,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
40
41 $(eval $(call IPKG_plugin_template,ULOGD_MOD_MYSQL,MYSQL))
42 $(eval $(call IPKG_plugin_template,ULOGD_MOD_PGSQL,PGSQL))
43
44 $(PKG_BUILD_DIR)/.configured:
45 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
46 $(TARGET_CONFIGURE_OPTS) \
47 CFLAGS="$(TARGET_CFLAGS)" \
48 CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
49 LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
50 ac_cv_header_pcap_h=no \
51 ./configure \
52 --target=$(GNU_TARGET_NAME) \
53 --host=$(GNU_TARGET_NAME) \
54 --build=$(GNU_HOST_NAME) \
55 --program-prefix="" \
56 --program-suffix="" \
57 --prefix=/usr \
58 --exec-prefix=/usr \
59 --bindir=/usr/bin \
60 --datadir=/usr/share \
61 --includedir=/usr/include \
62 --infodir=/usr/share/info \
63 --libdir=/usr/lib \
64 --libexecdir=/usr/lib \
65 --localstatedir=/var \
66 --mandir=/usr/share/man \
67 --sbindir=/usr/sbin \
68 --sysconfdir=/etc \
69 $(DISABLE_LARGEFILE) \
70 $(DISABLE_NLS) \
71 --enable-shared \
72 --disable-static \
73 $(ULOGD_MYSQL_OPTION) \
74 $(ULOGD_PGSQL_OPTION) \
75 );
76 touch $@
77
78 $(PKG_BUILD_DIR)/.built:
79 rm -rf $(PKG_INSTALL_DIR)
80 mkdir -p $(PKG_INSTALL_DIR)
81 $(MAKE) -C $(PKG_BUILD_DIR) \
82 DESTDIR="$(PKG_INSTALL_DIR)" \
83 all install
84 touch $@
85
86 $(IPKG_ULOGD):
87 install -d -m0755 $(IDIR_ULOGD)/etc
88 cp -fpR $(PKG_INSTALL_DIR)/etc/ulogd.conf $(IDIR_ULOGD)/etc/
89 install -d -m0755 $(IDIR_ULOGD)/etc/default
90 install -m0644 ./files/ulogd.default $(IDIR_ULOGD)/etc/default/ulogd
91 install -d -m0755 $(IDIR_ULOGD)/etc/init.d
92 install -m0755 ./files/ulogd.init $(IDIR_ULOGD)/etc/init.d/ulogd
93 install -d -m0755 $(IDIR_ULOGD)/usr/sbin
94 cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/ulogd $(IDIR_ULOGD)/usr/sbin/
95 $(RSTRIP) $(IDIR_ULOGD)
96 $(IPKG_BUILD) $(IDIR_ULOGD) $(PACKAGE_DIR)
This page took 0.047442 seconds and 5 git commands to generate.