lede-packages-rs

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

Makefile (1794B)


      1 #
      2 # Copyright (C) 2007-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:=protobuf
     11 PKG_VERSION:=3.1.0
     12 PKG_RELEASE:=1
     13 
     14 PKG_SOURCE:=$(PKG_NAME)-cpp-$(PKG_VERSION).tar.gz
     15 PKG_SOURCE_URL:=https://github.com/google/protobuf/releases/download/v$(PKG_VERSION)
     16 PKG_MD5SUM:=bd5e3eed635a8d32e2b99658633815ef
     17 
     18 PKG_LICENSE:=BSD-3-Clause
     19 PKG_LICENSE_FILES:=LICENSE
     20 
     21 PKG_BUILD_DEPENDS:=protobuf/host
     22 PKG_USE_MIPS16:=0# MIPS16 prevents protobuf's usage of the 'sync' asm-opcode
     23 
     24 PKG_INSTALL:=1
     25 
     26 include $(INCLUDE_DIR)/package.mk
     27 include $(INCLUDE_DIR)/host-build.mk
     28 
     29 define Package/protobuf
     30   SECTION:=libs
     31   CATEGORY:=Libraries
     32   TITLE:=A structured data encoding library
     33   URL:=https://github.com/google/protobuf
     34   DEPENDS:=+zlib +libpthread +libstdcpp
     35   MAINTAINER:=Per Sandström <per.j.sandstrom@gmail.com>
     36 endef
     37 
     38 define Package/protobuf/description
     39  Protocol Buffers are a way of encoding structured data in an efficient
     40  yet extensible format. Google uses Protocol Buffers for almost all
     41  of its internal RPC protocols and file formats.
     42 endef
     43 
     44 CONFIGURE_ARGS += --with-protoc=$(STAGING_DIR_HOSTPKG)/bin/protoc
     45 
     46 define Build/InstallDev
     47 	$(INSTALL_DIR) \
     48 		$(1)/usr/lib \
     49 		$(1)/usr/include
     50 
     51 	$(CP) \
     52 		$(PKG_INSTALL_DIR)/usr/include/* \
     53 		$(1)/usr/include/
     54 
     55 	$(CP) \
     56 		$(PKG_INSTALL_DIR)/usr/lib/* \
     57 		$(1)/usr/lib/
     58 endef
     59 
     60 define Package/protobuf/install
     61 	$(INSTALL_DIR) \
     62 		$(1)/usr/lib
     63 
     64 	$(CP) \
     65 		$(PKG_INSTALL_DIR)/usr/lib/libprotoc.so*  \
     66 		$(1)/usr/lib/
     67 
     68 	$(CP) \
     69 		$(PKG_INSTALL_DIR)/usr/lib/libprotobuf-lite.so* \
     70 		$(1)/usr/lib/
     71 
     72 	$(CP) \
     73 		$(PKG_INSTALL_DIR)/usr/lib/libprotobuf.so* \
     74 		$(1)/usr/lib/
     75 endef
     76 
     77 $(eval $(call BuildPackage,protobuf))
     78 $(eval $(call HostBuild))