treewide: replace AUTORELEASE with real PKG_RELEASE
[openwrt/staging/stintel.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:=c4fd1b8986c6d6d4ae5cd51e65a8bbeb495dfa4e
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:=ab8a5b27c34cf1b97de87b895448a6355229f73b679866b47c51a723273cc8ae
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 DEFAULT:=y if TARGET_bcm27xx
45 endef
46
47 define Package/bcm27xx-userland/description
48 BCM27xx userland tools including vcgencmd and tvservice.
49 endef
50
51 define Package/bcm27xx-userland-dev
52 SECTION:=devel
53 CATEGORY:=Development
54 SUBMENU:=Libraries
55 DEPENDS:=@TARGET_bcm27xx +bcm27xx-userland
56 TITLE:=Development files of BCM27xx userland tools
57 endef
58
59 define Package/bcm27xx-userland-dev/description
60 This package contains the header and static libraries of
61 the BCM27xx userland tools.
62 endef
63
64 define Package/bcm27xx-userland/install
65 $(INSTALL_DIR) $(1)/usr/bin
66 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dtmerge $(1)/usr/bin
67 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dtparam $(1)/usr/bin
68 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dtoverlay $(1)/usr/bin
69 ifneq ($(ARCH),aarch64)
70 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/raspistill $(1)/usr/bin
71 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/raspivid $(1)/usr/bin
72 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/raspividyuv $(1)/usr/bin
73 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/raspiyuv $(1)/usr/bin
74 endif
75 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/tvservice $(1)/usr/bin
76 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vcgencmd $(1)/usr/bin
77 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vcmailbox $(1)/usr/bin
78
79 $(INSTALL_DIR) $(1)/usr/lib/
80 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so $(1)/usr/lib/
81 ifneq ($(ARCH),aarch64)
82 $(INSTALL_DIR) $(1)/usr/lib/plugins
83 $(CP) $(PKG_INSTALL_DIR)/usr/lib/plugins/ $(1)/usr/lib/
84 endif
85 endef
86
87 define Package/bcm27xx-userland-dev/install
88 $(INSTALL_DIR) $(1)/usr/include
89 $(CP) $(PKG_INSTALL_DIR)/usr/include/ $(1)/usr/
90
91 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
92 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig $(1)/usr/lib/
93 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.a $(1)/usr/lib/
94 endef
95
96 $(eval $(call BuildPackage,bcm27xx-userland))
97 $(eval $(call BuildPackage,bcm27xx-userland-dev))