lede-packages-rs

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

Makefile (2142B)


      1 #
      2 # Copyright (C) 2008-2015 OpenWrt.org
      3 # Copyright (C) 2016 Luiz Angelo Daros de Luca
      4 #
      5 # This is free software, licensed under the GNU General Public License v2.
      6 # See /LICENSE for more information.
      7 #
      8 
      9 include $(TOPDIR)/rules.mk
     10 
     11 PKG_NAME:=libvpx
     12 PKG_VERSION:=1.6.1
     13 PKG_RELEASE:=1
     14 
     15 PKG_REV:=v$(PKG_VERSION)
     16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REV).tar.gz
     17 PKG_SOURCE_URL:=https://chromium.googlesource.com/webm/libvpx
     18 PKG_SOURCE_PROTO:=git
     19 PKG_SOURCE_VERSION:=$(PKG_REV)
     20 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
     21 
     22 PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
     23 
     24 PKG_LICENSE:=BSD-3-Clause
     25 PKG_LICENSE_FILES:=LICENSE
     26 
     27 PKG_ABI_VERSION:=$(subst $(space),.,$(wordlist 1, 2, $(subst .,$(space),$(PKG_VERSION))))
     28 
     29 PKG_INSTALL:=1
     30 
     31 include $(INCLUDE_DIR)/package.mk
     32 
     33 define Package/libvpx
     34   SECTION:=libs
     35   CATEGORY:=Libraries
     36   TITLE:=libvpx
     37   URL:=http://www.webmproject.org/
     38   DEPENDS:=+libpthread
     39   ABI_VERSION:=$(PKG_ABI_VERSION)
     40 endef
     41 
     42 define Package/libvpx/description
     43    libvpx is a VP8/VP9 Codec SDK.
     44 endef
     45 
     46 CONFIGURE_ARGS = \
     47 		--target=generic-gnu \
     48 		--prefix=$(CONFIGURE_PREFIX) \
     49 		--libdir=/usr/lib \
     50 		--enable-static \
     51 		--enable-shared \
     52         --disable-examples \
     53         --disable-docs \
     54         --disable-unit-tests \
     55 
     56 # Add --enable-small as openwrt gcc flags are overwritten
     57 ifneq ($(findstring -Os,$(TARGET_CFLAGS)),)
     58 CONFIGURE_ARGS += --enable-small
     59 endif
     60 
     61 # libvpx expects gcc as linker but uses $LD if provided
     62 # However, OpenWRT defines LD as *-uclibc-ld and not *-gcc
     63 CONFIGURE_VARS += \
     64     CROSS=$(GNU_TARGET_NAME) \
     65 	LD="$(TARGET_CC)" \
     66 
     67 MAKE_FLAGS += \
     68 	LD="$(TARGET_CC)" \
     69 
     70 define Build/InstallDev
     71 	$(INSTALL_DIR) $(1)/usr/include/vpx/
     72 	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/vpx/* $(1)/usr/include/vpx/
     73 	$(INSTALL_DIR) $(1)/usr/lib/
     74 	$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a} $(1)/usr/lib/
     75 	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
     76 	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
     77 endef
     78 
     79 define Package/libvpx/install
     80 	$(INSTALL_DIR) $(1)/usr/lib/
     81 	$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so.* $(1)/usr/lib/
     82 endef
     83 
     84 $(eval $(call BuildPackage,libvpx))