pcre: (#1979)
[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.2
13 PKG_RELEASE:=2
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=@SF/pcre
17 PKG_MD5SUM:=53305db73855f1ff155dcd2c05d448d3
18
19 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/libpcre
24 SECTION:=libs
25 CATEGORY:=Libraries
26 TITLE:=A Perl Compatible Regular Expression library
27 URL:=http://www.pcre.org/
28 endef
29
30 CONFIGURE_ARGS += \
31 --enable-shared \
32 --enable-static \
33 --enable-utf8 \
34 --disable-cpp
35
36 MAKE_FLAGS += \
37 $(TARGET_CONFIGURE_OPTS \
38 CFLAGS="$(TARGET_CFLAGS)" \
39 all
40
41 define Build/InstallDev
42 $(INSTALL_DIR) $(STAGING_DIR)/usr/bin
43 $(CP) $(PKG_BUILD_DIR)/pcre-config $(STAGING_DIR)/usr/bin/
44 $(INSTALL_DIR) $(STAGING_DIR)/usr/include
45 $(CP) $(PKG_BUILD_DIR)/pcre{,posix}.h $(STAGING_DIR)/usr/include/
46 $(INSTALL_DIR) $(STAGING_DIR)/usr/lib
47 $(CP) $(PKG_BUILD_DIR)/.libs/libpcre{,posix}.{a,so*} $(STAGING_DIR)/usr/lib/
48 endef
49
50 define Build/UninstallDev
51 rm -rf \
52 $(STAGING_DIR)/usr/bin/pcre-config \
53 $(STAGING_DIR)/usr/include/pcre{,posix}.h \
54 $(STAGING_DIR)/usr/lib/libpcre{,posix}.{a,so*}
55 endef
56
57 define Package/libpcre/install
58 $(INSTALL_DIR) $(1)/usr/lib
59 $(CP) $(PKG_BUILD_DIR)/.libs/libpcre{,posix}.so.* $(1)/usr/lib/
60 endef
61
62 $(eval $(call BuildPackage,libpcre))