added apache and python
[librewrt/.git] / packages / 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_INSTALL:=1
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 TARGET_CFLAGS += $(FPIC)
31
32 CONFIGURE_ARGS += \
33         --enable-utf8 \
34         --disable-cpp
35
36 MAKE_FLAGS += \
37         CFLAGS="$(TARGET_CFLAGS)"
38
39 define Build/InstallDev
40         $(INSTALL_DIR) $(1)/usr/bin
41         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pcre-config $(1)/usr/bin/
42
43         $(INSTALL_DIR) $(2)/bin
44         $(LN) $(STAGING_DIR)/usr/bin/pcre-config $(2)/bin
45
46         $(INSTALL_DIR) $(1)/usr/include
47         $(CP) $(PKG_INSTALL_DIR)/usr/include/pcre{,posix}.h $(1)/usr/include/
48
49         $(INSTALL_DIR) $(1)/usr/lib
50         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre{,posix}.{a,so*} $(1)/usr/lib/
51
52         $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
53         $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libpcre.pc $(1)/usr/lib/pkgconfig/
54
55 endef
56
57 define Package/libpcre/install
58         $(INSTALL_DIR) $(1)/usr/lib
59         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre{,posix}.so.* $(1)/usr/lib/
60 endef
61
62 $(eval $(call BuildPackage,libpcre))