lede-packages-rs

git clone git://archive.git.mtrnord.blog/MTRNord/lede-packages-rs.git
Log | Files | Refs | README | LICENSE

Makefile (2476B)


      1 #
      2 # Copyright (C) 2006-2015 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.40
     12 PKG_RELEASE:=2
     13 
     14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
     15 PKG_SOURCE_URL:=ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/
     16 PKG_MD5SUM:=41a842bf7dcecd6634219336e2167d1d
     17 PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
     18 
     19 PKG_LICENSE:=BSD-3-Clause
     20 PKG_LICENSE_FILES:=LICENCE
     21 
     22 PKG_FIXUP:=autoreconf
     23 
     24 PKG_INSTALL:=1
     25 
     26 include $(INCLUDE_DIR)/package.mk
     27 
     28 define Package/libpcre/default
     29   SECTION:=libs
     30   CATEGORY:=Libraries
     31   URL:=http://www.pcre.org/
     32 endef
     33 
     34 define Package/libpcre
     35   $(call Package/libpcre/default)
     36   TITLE:=A Perl Compatible Regular Expression library
     37 endef
     38 
     39 define Package/libpcre16
     40   $(call Package/libpcre/default)
     41   TITLE:=A Perl Compatible Regular Expression library (16bit support)
     42 endef
     43 
     44 define Package/libpcrecpp
     45   $(call Package/libpcre/default)
     46   TITLE:=C++ wrapper for Perl Compatible Regular Expression library
     47   DEPENDS:=+libpcre +libstdcpp
     48 endef
     49 
     50 TARGET_CFLAGS += $(FPIC)
     51 
     52 CONFIGURE_ARGS += \
     53 	--enable-utf8 \
     54 	--enable-unicode-properties \
     55 	--enable-pcre16 \
     56 
     57 ifneq ($(CONFIG_PACKAGE_libpcrecpp),)
     58   CONFIGURE_ARGS+= --enable-cpp
     59 else
     60   CONFIGURE_ARGS+= --disable-cpp
     61 endif
     62 
     63 MAKE_FLAGS += \
     64 	CFLAGS="$(TARGET_CFLAGS)"
     65 
     66 define Build/InstallDev
     67 	$(INSTALL_DIR) $(1)/usr/bin
     68 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pcre-config $(1)/usr/bin/
     69 
     70 	$(INSTALL_DIR) $(2)/bin
     71 	$(LN) $(STAGING_DIR)/usr/bin/pcre-config $(2)/bin
     72 
     73 	$(INSTALL_DIR) $(1)/usr/include
     74 	$(CP) $(PKG_INSTALL_DIR)/usr/include/pcre*.h $(1)/usr/include/
     75 
     76 	$(INSTALL_DIR) $(1)/usr/lib
     77 	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre*.{a,so*} $(1)/usr/lib/
     78 
     79 	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
     80 	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libpcre*.pc $(1)/usr/lib/pkgconfig/
     81 endef
     82 
     83 define Package/libpcre/install
     84 	$(INSTALL_DIR) $(1)/usr/lib
     85 	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre{,posix}.so.* $(1)/usr/lib/
     86 	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre.so $(1)/usr/lib/
     87 endef
     88 
     89 define Package/libpcre16/install
     90 	$(INSTALL_DIR) $(1)/usr/lib
     91 	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre16.so* $(1)/usr/lib/
     92 endef
     93 
     94 define Package/libpcrecpp/install
     95 	$(INSTALL_DIR) $(1)/usr/lib
     96 	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcrecpp.so.* $(1)/usr/lib/
     97 endef
     98 
     99 $(eval $(call BuildPackage,libpcre))
    100 $(eval $(call BuildPackage,libpcre16))
    101 $(eval $(call BuildPackage,libpcrecpp))