Add BR2_EXTERNAL skeleton
This commit is contained in:
10
package/my-common-tool/Config.in
Normal file
10
package/my-common-tool/Config.in
Normal file
@@ -0,0 +1,10 @@
|
||||
config BR2_PACKAGE_MY_COMMON_TOOL
|
||||
bool "my-common-tool"
|
||||
select BR2_PACKAGE_MY_SHARED_LIB
|
||||
help
|
||||
A command-line utility shared across multiple Raspberry Pi
|
||||
projects. Depends on my-shared-lib.
|
||||
|
||||
Installs the 'my-common-tool' binary into /usr/bin on the target.
|
||||
|
||||
https://github.com/your-org/my-common-tool
|
||||
22
package/my-common-tool/my-common-tool.mk
Normal file
22
package/my-common-tool/my-common-tool.mk
Normal file
@@ -0,0 +1,22 @@
|
||||
################################################################################
|
||||
#
|
||||
# my-common-tool
|
||||
#
|
||||
################################################################################
|
||||
|
||||
MY_COMMON_TOOL_VERSION = 1.0.0
|
||||
MY_COMMON_TOOL_SITE = https://github.com/your-org/my-common-tool.git
|
||||
MY_COMMON_TOOL_SITE_METHOD = git
|
||||
MY_COMMON_TOOL_LICENSE = MIT
|
||||
MY_COMMON_TOOL_LICENSE_FILES = LICENSE
|
||||
MY_COMMON_TOOL_DEPENDENCIES = my-shared-lib
|
||||
|
||||
define MY_COMMON_TOOL_BUILD_CMDS
|
||||
$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)
|
||||
endef
|
||||
|
||||
define MY_COMMON_TOOL_INSTALL_TARGET_CMDS
|
||||
$(INSTALL) -D -m 0755 $(@D)/my-common-tool $(TARGET_DIR)/usr/bin/my-common-tool
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
9
package/my-shared-lib/Config.in
Normal file
9
package/my-shared-lib/Config.in
Normal file
@@ -0,0 +1,9 @@
|
||||
config BR2_PACKAGE_MY_SHARED_LIB
|
||||
bool "my-shared-lib"
|
||||
help
|
||||
A shared library providing common functionality used across
|
||||
multiple Raspberry Pi projects.
|
||||
|
||||
Installs libmyshared.so into /usr/lib on the target.
|
||||
|
||||
https://github.com/your-org/my-shared-lib
|
||||
22
package/my-shared-lib/my-shared-lib.mk
Normal file
22
package/my-shared-lib/my-shared-lib.mk
Normal file
@@ -0,0 +1,22 @@
|
||||
################################################################################
|
||||
#
|
||||
# my-shared-lib
|
||||
#
|
||||
################################################################################
|
||||
|
||||
# IMPORTANT: Update this version and hash when upgrading the package.
|
||||
# The hash file (my-shared-lib.hash) should also be updated accordingly.
|
||||
MY_SHARED_LIB_VERSION = 1.0.0
|
||||
MY_SHARED_LIB_SITE = https://github.com/your-org/my-shared-lib.git
|
||||
MY_SHARED_LIB_SITE_METHOD = git
|
||||
MY_SHARED_LIB_LICENSE = MIT
|
||||
MY_SHARED_LIB_LICENSE_FILES = LICENSE
|
||||
MY_SHARED_LIB_INSTALL_STAGING = YES
|
||||
|
||||
# CMake options passed to the package's build.
|
||||
# Add any project-specific CMake definitions here.
|
||||
MY_SHARED_LIB_CONF_OPTS = \
|
||||
-DBUILD_TESTS=OFF \
|
||||
-DBUILD_EXAMPLES=OFF
|
||||
|
||||
$(eval $(cmake-package))
|
||||
Reference in New Issue
Block a user