bcm27xx: switch to bcm27xx-utils
[openwrt/staging/dangole.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:=96a7334ae9d5fc9db7ac92e59852377df63f1848
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:=557ee8390de5db1ed90386c1ba0221e7f6f9dd87e858a00a34be3b1f9ede193f
17
18 PKG_FLAGS:=nonshared
19
20 PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
21 PKG_LICENSE:=BSD-3-Clause
22 PKG_LICENSE_FILES:=LICENCE
23
24 CMAKE_INSTALL:=1
25 CMAKE_OPTIONS+=-DVMCS_INSTALL_PREFIX=/usr
26
27 ifeq ($(ARCH),aarch64)
28 CMAKE_OPTIONS+=-DARM64=ON
29 else
30 CMAKE_OPTIONS+=-DARM64=OFF
31 endif
32
33 include $(INCLUDE_DIR)/package.mk
34 include $(INCLUDE_DIR)/cmake.mk
35
36 TAR_OPTIONS:=--strip-components 1 $(TAR_OPTIONS)
37 TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
38
39 define Package/bcm27xx-userland
40 SECTION:=utils
41 CATEGORY:=Utilities
42 DEPENDS:=@TARGET_bcm27xx
43 TITLE:=BCM27xx userland tools
44 endef
45
46 define Package/bcm27xx-userland/description
47 BCM27xx userland tools including vcgencmd and tvservice.
48 endef
49
50 define Package/bcm27xx-userland-dev
51 SECTION:=devel
52 CATEGORY:=Development
53 SUBMENU:=Libraries
54 DEPENDS:=@TARGET_bcm27xx +bcm27xx-userland
55 TITLE:=Development files of BCM27xx userland tools
56 endef
57
58 define Package/bcm27xx-userland-dev/description
59 This package contains the header and static libraries of
60 the BCM27xx userland tools.
61 endef
62
63 define Package/bcm27xx-userland/install
64 $(INSTALL_DIR) $(1)/usr/bin
65 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dtmerge $(1)/usr/bin
66 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dtparam $(1)/usr/bin
67 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dtoverlay $(1)/usr/bin
68 ifneq ($(ARCH),aarch64)
69 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/raspistill $(1)/usr/bin
70 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/raspivid $(1)/usr/bin
71 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/raspividyuv $(1)/usr/bin
72 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/raspiyuv $(1)/usr/bin
73 endif
74 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/tvservice $(1)/usr/bin
75 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vcgencmd $(1)/usr/bin
76 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vcmailbox $(1)/usr/bin
77
78 $(INSTALL_DIR) $(1)/usr/lib/
79 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so $(1)/usr/lib/
80 ifneq ($(ARCH),aarch64)
81 $(INSTALL_DIR) $(1)/usr/lib/plugins
82 $(CP) $(PKG_INSTALL_DIR)/usr/lib/plugins/ $(1)/usr/lib/
83 endif
84 endef
85
86 define Package/bcm27xx-userland-dev/install
87 $(INSTALL_DIR) $(1)/usr/include
88 $(CP) $(PKG_INSTALL_DIR)/usr/include/ $(1)/usr/
89
90 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
91 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig $(1)/usr/lib/
92 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.a $(1)/usr/lib/
93 endef
94
95 $(eval $(call BuildPackage,bcm27xx-userland))
96 $(eval $(call BuildPackage,bcm27xx-userland-dev))