Upgrade pcre to 7.0 (#1119)
[openwrt/svn-archive/archive.git] / libs / pcre / 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:=pcre
12 PKG_VERSION:=7.0
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=@SF/pcre
17 PKG_MD5SUM:=b97e3bb84bd665e0fbb7a90344d65a43
18 PKG_CAT:=bzcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/libpcre
25 SECTION:=libs
26 CATEGORY:=Libraries
27 TITLE:=A Perl Compatible Regular Expression library
28 URL:=http://www.pcre.org/
29 endef
30
31 define Build/Configure
32 $(call Build/Configure/Default, \
33 --enable-shared \
34 --enable-static \
35 --enable-utf8 \
36 )
37 endef
38
39 define Build/Compile
40 $(MAKE) -C "$(PKG_BUILD_DIR)" \
41 CC_FOR_BUILD="$(HOSTCC)" \
42 LINK_FOR_BUILD="$(HOSTCC)" \
43 CFLAGS_FOR_BUILD="" \
44 dftables
45 $(MAKE) -C "$(PKG_BUILD_DIR)" \
46 $(TARGET_CONFIGURE_OPTS) \
47 CFLAGS="$(TARGET_CFLAGS)" \
48 all
49 endef
50
51 define Build/InstallDev
52 mkdir -p $(STAGING_DIR)/usr/bin
53 $(CP) $(PKG_BUILD_DIR)/pcre-config $(STAGING_DIR)/usr/bin/
54 mkdir -p $(STAGING_DIR)/usr/include
55 $(CP) $(PKG_BUILD_DIR)/pcre{,posix}.h $(STAGING_DIR)/usr/include/
56 mkdir -p $(STAGING_DIR)/usr/lib
57 $(CP) $(PKG_BUILD_DIR)/.libs/libpcre{,posix}.{a,so*} $(STAGING_DIR)/usr/lib/
58 endef
59
60 define Build/UninstallDev
61 rm -rf \
62 $(STAGING_DIR)/usr/bin/pcre-config \
63 $(STAGING_DIR)/usr/include/pcre{,posix}.h \
64 $(STAGING_DIR)/usr/lib/libpcre{,posix}.{a,so*}
65 endef
66
67 define Package/libpcre/install
68 $(INSTALL_DIR) $(1)/usr/lib
69 $(CP) $(PKG_BUILD_DIR)/.libs/libpcre{,posix}.so.* $(1)/usr/lib/
70 endef
71
72 $(eval $(call BuildPackage,libpcre))