71f411c67f771e9c9d435668e203e925a4927d32
[openwrt/svn-archive/archive.git] / libs / libol / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=libol
12 PKG_VERSION:=0.3.17
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://www.balabit.com/downloads/libol/0.3
17 PKG_MD5SUM:=28cc52e84bdb472b7830f9ad120a62a7
18 PKG_CAT:=zcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/libol
26 SECTION:=libs
27 CATEGORY:=Libraries
28 TITLE:=Support library for syslog-ng
29 URL:=http://www.balabit.com/products/syslog_ng/
30 endef
31
32 define Build/Configure
33 $(call Build/Configure/Default, \
34 --enable-shared \
35 --enable-static \
36 )
37 endef
38
39 define Build/Compile
40 # pass CFLAGS again to override -O2 set by configure
41 $(MAKE) -C $(PKG_BUILD_DIR) \
42 CFLAGS="$(TARGET_CFLAGS)" \
43 DESTDIR="$(PKG_INSTALL_DIR)" \
44 all install
45 endef
46
47 define Build/InstallDev
48 mkdir -p $(STAGING_DIR)/usr/bin
49 $(CP) $(PKG_INSTALL_DIR)/usr/bin/libol-config $(STAGING_DIR)/usr/bin/
50 mkdir -p $(STAGING_DIR)/usr/include
51 $(CP) $(PKG_INSTALL_DIR)/usr/include/libol $(STAGING_DIR)/usr/include/
52 mkdir -p $(STAGING_DIR)/usr/lib
53 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libol.{*a,so*} $(STAGING_DIR)/usr/lib/
54 endef
55
56 define Build/UninstallDev
57 rm -rf \
58 $(STAGING_DIR)/usr/bin/libol-config \
59 $(STAGING_DIR)/usr/include/libol \
60 $(STAGING_DIR)/usr/lib/libol.{*a,so*}
61 endef
62
63 define Package/libol/install
64 install -d -m0755 $(1)/usr/lib
65 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libol.so.* $(1)/usr/lib/
66 endef
67
68 $(eval $(call BuildPackage,libol))