[packages] pcre: update to 8.01
[openwrt/svn-archive/archive.git] / libs / pcre / Makefile
1 #
2 # Copyright (C) 2006-2010 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=pcre
11 PKG_VERSION:=8.01
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=@SF/pcre
16 PKG_MD5SUM:=413be1c23dabe91f637fb3770f640006
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/libpcre
21 SECTION:=libs
22 CATEGORY:=Libraries
23 TITLE:=A Perl Compatible Regular Expression library
24 URL:=http://www.pcre.org/
25 endef
26
27 TARGET_CFLAGS += $(FPIC)
28
29 CONFIGURE_ARGS += \
30 --enable-shared \
31 --enable-static \
32 --enable-utf8 \
33 --disable-cpp \
34
35 MAKE_FLAGS += \
36 $(TARGET_CONFIGURE_OPTS) \
37 CFLAGS="$(TARGET_CFLAGS)" \
38 all \
39
40 define Build/InstallDev
41 $(INSTALL_DIR) $(1)/usr/bin $(2)/bin $(1)/usr/include $(1)/usr/lib
42 $(CP) $(PKG_BUILD_DIR)/pcre-config $(1)/usr/bin/
43 ln -sf $(STAGING_DIR)/usr/bin/pcre-config $(2)/bin
44 $(CP) $(PKG_BUILD_DIR)/pcre{,posix}.h $(1)/usr/include/
45 $(CP) $(PKG_BUILD_DIR)/.libs/libpcre{,posix}.{a,so*} $(1)/usr/lib/
46 endef
47
48 define Package/libpcre/install
49 $(INSTALL_DIR) $(1)/usr/lib
50 $(CP) $(PKG_BUILD_DIR)/.libs/libpcre{,posix}.so.* $(1)/usr/lib/
51 endef
52
53 $(eval $(call BuildPackage,libpcre))