b0a2b30851c32e9c6cc0dc5aa159280001bc0657
[openwrt/svn-archive/archive.git] / libs / libol / Makefile
1 #
2 # Copyright (C) 2006-2008 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.18
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:=cbadf4b7ea276dfa85acc38a1cc5ff17
18 PKG_FIXUP:=libtool
19
20 include $(INCLUDE_DIR)/package.mk
21
22 define Package/libol
23 SECTION:=libs
24 CATEGORY:=Libraries
25 TITLE:=Support library for syslog-ng
26 URL:=http://www.balabit.com/products/syslog_ng/
27 endef
28
29 define Build/Configure
30 $(call Build/Configure/Default, \
31 --enable-shared \
32 --enable-static \
33 )
34 endef
35
36 TARGET_CFLAGS += $(FPIC)
37
38 define Build/Compile
39 # pass CFLAGS again to override -O2 set by configure
40 $(MAKE) -C $(PKG_BUILD_DIR) \
41 CFLAGS="$(TARGET_CFLAGS)" \
42 DESTDIR="$(PKG_INSTALL_DIR)" \
43 all install
44 endef
45
46 define Build/InstallDev
47 $(INSTALL_DIR) $(2)/bin
48 $(INSTALL_BIN) \
49 $(PKG_INSTALL_DIR)/usr/bin/libol-config \
50 $(2)/bin/
51 $(SED) \
52 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
53 $(2)/bin/libol-config
54
55 $(INSTALL_DIR) $(1)/usr/include/libol
56 $(INSTALL_DATA) \
57 $(PKG_INSTALL_DIR)/usr/include/libol/*.h \
58 $(1)/usr/include/libol/
59
60 $(INSTALL_DIR) $(1)/usr/lib
61 $(INSTALL_DATA) \
62 $(PKG_INSTALL_DIR)/usr/lib/libol.{la,so*} \
63 $(1)/usr/lib/
64 endef
65
66 define Package/libol/install
67 $(INSTALL_DIR) $(1)/usr/lib
68 $(INSTALL_DATA) \
69 $(PKG_INSTALL_DIR)/usr/lib/libol.{a,so*} \
70 $(1)/usr/lib/
71 endef
72
73 $(eval $(call BuildPackage,libol))