| Both sides previous revision Previous revision Next revision | Previous revision |
| docs:guide-developer:packages [2023/12/11 21:24] – [BuildPackage variables] Add some notes about PKG_RELEASE efahlgren | docs:guide-developer:packages [2024/05/22 20:59] (current) – fix make target for package bam |
|---|
| * ''PKG_HASH'' - A checksum to validate the download. It can be either a MD5 or SHA256 checksum, but SHA256 should be used, see [[commit>?p=openwrt/openwrt.git;a=blob;f=scripts/download.pl;h=676c6e9e6b10b6a44ed2bbc03a7ba3c983aaf639;hb=HEAD#l66|scripts/download.pl]] | * ''PKG_HASH'' - A checksum to validate the download. It can be either a MD5 or SHA256 checksum, but SHA256 should be used, see [[commit>?p=openwrt/openwrt.git;a=blob;f=scripts/download.pl;h=676c6e9e6b10b6a44ed2bbc03a7ba3c983aaf639;hb=HEAD#l66|scripts/download.pl]] |
| * ''PKG_CAT'' - How to decompress the sources (zcat, bzcat, unzip) | * ''PKG_CAT'' - How to decompress the sources (zcat, bzcat, unzip) |
| | * ''PKG_URL''. - Upstream project homepage |
| * ''PKG_BUILD_DEPENDS'' - Packages that need to be built before this package. Use this option if you need to make sure that your package has access to includes and/or libraries of another package at build time. Specify the directory name (i.e. openssl) rather than the binary package name (i.e. libopenssl). This build variable only establishes the build time dependency. Use ''DEPENDS'' to establish the runtime dependencies. This variable uses the same syntax as ''DEPENDS'' below. | * ''PKG_BUILD_DEPENDS'' - Packages that need to be built before this package. Use this option if you need to make sure that your package has access to includes and/or libraries of another package at build time. Specify the directory name (i.e. openssl) rather than the binary package name (i.e. libopenssl). This build variable only establishes the build time dependency. Use ''DEPENDS'' to establish the runtime dependencies. This variable uses the same syntax as ''DEPENDS'' below. |
| * ''PKG_CONFIG_DEPENDS'' - specifies which config options influence the build configuration and should trigger a rerun of Build/Configure on change | * ''PKG_CONFIG_DEPENDS'' - specifies which config options influence the build configuration and should trigger a rerun of Build/Configure on change |
| * ''PKG_INSTALL_DIR'' - Where "make install" copies the compiled files | * ''PKG_INSTALL_DIR'' - Where "make install" copies the compiled files |
| * ''PKG_FIXUP'' - See below | * ''PKG_FIXUP'' - See below |
| | * ''PKG_CVE_IGNORE'' - Variable for defining CVEs that don't apply to this version of the package due to features not enabled, or affecting other platforms (e.g. Windows issues or features that are not used and so not relevant) |
| | * ''PKG_CVE_FIXED'' - Variable for defining CVEs that are patches in the current version, but aren't properly marked as fixed at cve.org in the current version |
| |
| Optional support for fetching sources from a VCS (git, bzr, svn, etc), see [[#use_source_repository|Use source repository]] below for more information: | Optional support for fetching sources from a VCS (git, bzr, svn, etc), see [[#use_source_repository|Use source repository]] below for more information: |
| </code> | </code> |
| |
| Besides the source repository ''PKG_SOURCE_URL'', you also need to specify which exact version you are building using ''PKG_SOURCE_VERSION'' (e.g. a commit hash for git, or a revision number for svn) | Besides the source repository ''PKG_SOURCE_URL'', you also need to specify which exact version you are building using ''PKG_SOURCE_VERSION'' e.g. a commit hash for git, or a revision number for svn. The ''PKG_SOURCE_VERSION'' can be a git tag and specified like ''PKG_SOURCE_VERSION:=v$(PKG_VERSION)''. |
| |
| Buildroot will first clone the source repository, and then generate a tarball from the source repository, with a name like ''dl/odhcpd-2017-08-16-94e65ee0.tar.xz''. | Buildroot will first clone the source repository, and then generate a tarball from the source repository, with a name like ''dl/odhcpd-2017-08-16-94e65ee0.tar.xz''. |
| :!: The tarballs generated from svn checkouts are not reproducible, so you should avoid defining ''PKG_MIRROR_HASH'' when building from svn! | :!: The tarballs generated from svn checkouts are not reproducible, so you should avoid defining ''PKG_MIRROR_HASH'' when building from svn! |
| |
| To generate ''PKG_MIRROR_HASH'' automatically, use the following (replace ''package/network/services/odhcpd'' by your package): | To generate ''PKG_MIRROR_HASH'' automatically, use the following (replace ''package/odhcpd'' by your package): |
| |
| <code> | <code> |
| # First add "PKG_MIRROR_HASH:=skip" to the package Makefile and/or "HASH:=skip", if required. | # First add "PKG_MIRROR_HASH:=skip" to the package Makefile and/or "HASH:=skip", if required. |
| make package/network/services/odhcpd/download V=s | make package/odhcpd/download V=s |
| make package/network/services/odhcpd/check FIXUP=1 V=s | make package/odhcpd/check FIXUP=1 V=s |
| </code> | </code> |
| |