2 # Copyright (C) 2006-2009 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=@SF/pcre
16 PKG_MD5SUM:=caf564aa69d68e965e9bf0ff2a094c65
18 include $(INCLUDE_DIR)/package.mk
20 define Package/libpcre
23 TITLE:=A Perl Compatible Regular Expression library
24 URL:=http://www.pcre.org/
27 TARGET_CFLAGS += $(FPIC)
36 $(TARGET_CONFIGURE_OPTS) \
37 CFLAGS="$(TARGET_CFLAGS)" \
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/
48 define Package/libpcre/install
49 $(INSTALL_DIR) $(1)/usr/lib
50 $(CP) $(PKG_BUILD_DIR)/.libs/libpcre{,posix}.so.* $(1)/usr/lib/
53 $(eval $(call BuildPackage,libpcre))