bcm27xx-userland: update to latest version
[oweals/openwrt.git] / package / utils / bcm27xx-userland / Makefile
1 #
2 # Copyright (C) 2019-2020 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:=bcm27xx-userland
11 PKG_VERSION:=f4bccc38f9d0a740aeb7818d33ca1fd551e325de
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=https://codeload.github.com/raspberrypi/userland/tar.gz/$(PKG_VERSION)?
16 PKG_HASH:=3a4ea8788809bf889da9fe61759e4f8daafab3444264c011db9c6b25237fd044
17
18 PKG_FLAGS:=nonshared
19
20 PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
21
22 CMAKE_INSTALL:=1
23 CMAKE_OPTIONS+=-DVMCS_INSTALL_PREFIX=/usr
24
25 ifeq ($(ARCH),aarch64)
26   CMAKE_OPTIONS+=-DARM64=ON
27 else
28   CMAKE_OPTIONS+=-DARM64=OFF
29 endif
30
31 include $(INCLUDE_DIR)/package.mk
32 include $(INCLUDE_DIR)/cmake.mk
33
34 TAR_OPTIONS:=--strip-components 1 $(TAR_OPTIONS)
35 TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
36
37 define Package/bcm27xx-userland
38   SECTION:=utils
39   CATEGORY:=Utilities
40   DEPENDS:=@TARGET_bcm27xx
41   TITLE:=BCM27xx userland tools
42   DEFAULT:=y if TARGET_bcm27xx
43 endef
44
45 define Package/bcm27xx-userland/description
46   BCM27xx userland tools including vcgencmd and tvservice.
47 endef
48
49 define Package/bcm27xx-userland/install
50         $(INSTALL_DIR) $(1)/usr/bin
51         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dtmerge $(1)/usr/bin
52         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dtparam $(1)/usr/bin
53         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dtoverlay $(1)/usr/bin
54 ifneq ($(ARCH),aarch64)
55         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/raspistill $(1)/usr/bin
56         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/raspivid $(1)/usr/bin
57         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/raspividyuv $(1)/usr/bin
58         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/raspiyuv $(1)/usr/bin
59 endif
60         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/tvservice $(1)/usr/bin
61         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vcgencmd $(1)/usr/bin
62         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vcmailbox $(1)/usr/bin
63
64         $(INSTALL_DIR) $(1)/usr/include
65         $(CP) $(PKG_INSTALL_DIR)/usr/include/ $(1)/usr/
66
67         $(INSTALL_DIR) $(1)/usr/lib
68         $(CP) $(PKG_INSTALL_DIR)/usr/lib/ $(1)/usr/
69 endef
70
71 $(eval $(call BuildPackage,bcm27xx-userland))