ce1adb0a99046885c4388f13e4c7dc5ca0f94843
[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.10
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=@SF/pcre
16 PKG_MD5SUM:=780867a700e9d4e4b9cb47aa5453e4b2
17
18 PKG_FIXUP:=libtool
19 PKG_REMOVE_FILES:=aclocal.m4 ltmain.sh
20
21 PKG_INSTALL:=1
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/libpcre
26 SECTION:=libs
27 CATEGORY:=Libraries
28 TITLE:=A Perl Compatible Regular Expression library
29 URL:=http://www.pcre.org/
30 endef
31
32 TARGET_CFLAGS += $(FPIC)
33
34 CONFIGURE_ARGS += \
35 --enable-utf8 \
36 --disable-cpp
37
38 MAKE_FLAGS += \
39 CFLAGS="$(TARGET_CFLAGS)"
40
41 define Build/InstallDev
42 $(INSTALL_DIR) $(1)/usr/bin
43 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pcre-config $(1)/usr/bin/
44
45 $(INSTALL_DIR) $(2)/bin
46 $(LN) $(STAGING_DIR)/usr/bin/pcre-config $(2)/bin
47
48 $(INSTALL_DIR) $(1)/usr/include
49 $(CP) $(PKG_INSTALL_DIR)/usr/include/pcre{,posix}.h $(1)/usr/include/
50
51 $(INSTALL_DIR) $(1)/usr/lib
52 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre{,posix}.{a,so*} $(1)/usr/lib/
53
54 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
55 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libpcre.pc $(1)/usr/lib/pkgconfig/
56
57 endef
58
59 define Package/libpcre/install
60 $(INSTALL_DIR) $(1)/usr/lib
61 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre{,posix}.so.* $(1)/usr/lib/
62 endef
63
64 $(eval $(call BuildPackage,libpcre))