Package.mk

Introduction

The package.mk file defines variables and functions to build a package. This page describes variables and functions to which it refers.

Template

PKG_NAME="" PKG_VERSION="" #PKG_ARCH="any" PKG_LICENSE="" PKG_SITE="" PKG_URL="" #PKG_SOURCE_DIR="" #PKG_SOURCE_NAME="" PKG_DEPENDS_TARGET="toolchain" #PKG_SECTION="virtual" #PKG_AUTORECONF="yes" #PKG_IS_ADDON="yes" #PKG_ADDON_PROJECTS="" #PKG_ADDON_NAME="" #PKG_ADDON_TYPE="" #PKG_ADDON_PROVIDES="" #PKG_ADDON_REPOVERSION="" #PKG_ADDON_REQUIRES="" #PKG_MAINTAINER="" #PKG_REV="" #PKG_SHORTDESC="" #PKG_LONGDESC="" #PKG_CONFIGURE_OPTS_TARGET="" #PKG_MAKE_OPTS_TARGET="" #PKG_MAKEINSTALL_OPTS_TARGET="" #pre_unpack() { - : #} #unpack() { - : #} #post_unpack() { - : #} #pre_patch() { - : #} #post_patch() { - : #} #pre_build_target() { - : #} #pre_configure_target() { - strip_gold - strip_lto #} #configure_target() { - : #} #post_configure_target() { - : #} #pre_make_target() { - : #} #make_target() { - : #} #post_make_target() { - : #} #pre_makeinstall_target() { - : #} #makeinstall_target() { - : #} #post_makeinstall_target() { - : #} #addon() { - : #}

Variables

PKG_NAME

;Decscription :Name of the packaged software application :Should be lowercase ;Required :Yes ;Used by scripts :build clean create_addon get skip_unpack unpack

PKG_VERSION

;Description :Version of the packaged software application ;Required :Yes ;Used by scripts :unpack

PKG_ARCH

;Description :Architectures for which the package builds :any or a space separated list of aarch64, arm or x86_64 ;Required :No ;Examples :any :arm x86_64 ;Reference :https://github.com/LibreELEC/LibreELEC.tv/tree/master/config ;Used by scripts :build create_addon install uninstall

PKG_LICENSE

;Description :License of the software application ;Required :Yes ;Example :GPLv3 ;Reference :https://github.com/LibreELEC/LibreELEC.tv/tree/master/licenses ;Used by scripts :-

PKG_SITE

;Description :Site of the software application ;Required :Yes ;Example :http://savannah.gnu.org/projects/tar/ ;Used by scripts :-

PKG_URL

;Description :Address at which the source of the software application can be retrieved ;Required :No ;Example :http://ftp.gnu.org/gnu/tar/$PKG_NAME-$PKG_VERSION.tar.gz ;Used by scripts :build extract get uninstall unpack

PKG_SOURCE_DIR

;Description :Name of the folder to which the source of the software application unpacks :Should only be specified if the source of the software application unpacks to a folder whose name does not start with $PKG_NAME ;Required :No ;Used by scripts :unpack

PKG_SOURCE_NAME

;Description :Name of the file of the source of the software application :Should only be specified if the source of the software application is not the basename of PKG_URL ;Required :No ;Used by scripts :extract get

PKG_DEPENDS_TARGET

;Description :A space separated list of name of packages required to build the software application ;Required :Yes ;Examples :toolchain :toolchain mono:host libgdiplus sqlite mono_sqlite zlib ;Used by scripts :build install

PKG_SECTION

;Description :virtual if the package only defines dependencies ;Required :No ;Used by scripts :build uninstall

PKG_AUTORECONF

;Description :yes if building the software package requires autoreconf to build ;Required :No ;Used by scripts :build

PKG_IS_ADDON

;Description :yes if the package is an addon ;Required :No ;Used by scripts :create_addon

PKG_ADDON_PROJECTS

;Description :Architectures for which the package builds :A space separated list of Generic, Odroid_C2, RPi, RPi2, Virtual, WeTek_Core, WeTek_Hub, WeTek_Play, imx6 :Should only be specified if the software application does not build for all projects ;Required :No ;Example :RPi2 WeTek_Core WeTek_Play ;Reference :https://github.com/LibreELEC/LibreELEC.tv/tree/master/projects ;Used by scripts :create_addon

PKG_ADDON_NAME

;Description :Name of the addon used in various parts of Kodi ;Required :Yes ;Example :Spotify Connect Web ;Used by scripts :create_addon

PKG_ADDON_TYPE

;Description :Type of the addon ;Scope :Addon ;Required :Yes ;Reference :https://github.com/LibreELEC/LibreELEC.tv/tree/master/config/addon ;Used by scripts :create_addon

PKG_ADDON_PROVIDES

PKG_ADDON_REPOVERSION

;Description :Must match ADDON_VERSION in config/version ;Required :Yes ;Used by scripts :create_addon

PKG_ADDON_REQUIRES

PKG_MAINTAINER

PKG_CONFIGURE_OPTS_TARGET

PKG_MAKE_OPTS_TARGET

PKG_MAKEINSTALL_OPTS_TARGET

PKG_REV

;Description :Revision of the addon ;Required :Yes ;Used by scripts :create_addon

PKG_SHORTDESC

;Description :Short description of the application software used in various parts of Kodi ;Required :Yes ;Example :Mono: a cross platform, open source .NET framework ;Used by scripts :create_addon

PKG_LONGDESC

;Description :Long description of the application software used in various parts of Kodi ;Required :Yes ;Example :Mono ($PKG_VERSION) is a software platform designed to allow developers to easily create cross platform applications part of the .NET Foundation ;Used by scripts :create_addon

Functions

post_unpack

post_patch

strip_gold

strip_lto

post_configure_target

post_make_target

post_makeinstall_target

Build Time Variables