brcm2708: rename target to bcm27xx
[openwrt/staging/jow.git] / package / utils / bcm27xx-userland / Makefile
1 #
2 # Copyright (C) 2019 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:=42ec119e03eb8dffc7c83e2ac0e665e333abbef6
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:=cb0f1d653fdb9975783f30359277d9de2868607381e081796eac68745e3e8324
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/dtparam $(1)/usr/bin
52 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dtoverlay $(1)/usr/bin
53 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/tvservice $(1)/usr/bin
54 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vcgencmd $(1)/usr/bin
55 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vcmailbox $(1)/usr/bin
56
57 $(INSTALL_DIR) $(1)/usr/include
58 $(CP) $(PKG_INSTALL_DIR)/usr/include/ $(1)/usr/
59
60 $(INSTALL_DIR) $(1)/usr/lib
61 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ $(1)/usr/
62 endef
63
64 $(eval $(call BuildPackage,bcm27xx-userland))