Differences

This shows you the differences between two versions of the page.

Link to this comparison view

adding_a_package [2017/03/12 19:24]
0.0.0.0 created
adding_a_package [2017/03/16 13:08] (current)
cvh
Line 1: Line 1:
-====== ​Adding_a_Package ​======+====== ​Adding a Package ​====== 
 + 
  
-======Introduction====== +===== Introduction ===== 
-This page describes how to create and build a LibreELEC package and assumes that [[https://​wiki.libreelec.tv/​index.php?​title=Preparing_a_Build_Environment|a build environment has been prepared]].+ 
 +This page describes how to create and build a LibreELEC package and assumes that [[compile|a build environment has been prepared]]. 
 + 
 +===== Select a Software Application to Package =====
  
-======Select a Software Application to Package====== 
 [[http://​savannah.gnu.org/​projects/​tar|tar]] has been selected to illustrate the process. [[http://​savannah.gnu.org/​projects/​tar|tar]] has been selected to illustrate the process.
  
-======Select a LibreELEC Project====== +===== Select a LibreELEC Project ===== 
-To illustrate the process, the package is built for the RPi2 LibreELEC project. Build commands are therefore ​preprended ​with: + 
- <​nowiki>​ +To illustrate the process, the package is built for the RPi2 LibreELEC project. Build commands are therefore ​prepended ​with: 
-PROJECT=RPi2 ARCH=arm</​nowiki>​+ 
 +  PROJECT=RPi2 ARCH=arm 
 + 
 +===== Copy the Template =====
  
-======Copy the Template====== 
 The template below is a good starting point. The template below is a good starting point.
-Copy it to "LibreELEC.tv/​packages/​ELECtronLibre/​tar/​package.mk"+Copy it to ''​LibreELEC.tv/​packages/​ELECtronLibre/​tar/​package.mk''​. 
- <nowiki> + 
-PKG_NAME=""​+<code>​PKG_NAME=""​
 PKG_VERSION=""​ PKG_VERSION=""​
 #​PKG_ARCH="​any"​ #​PKG_ARCH="​any"​
Line 26: Line 31:
 #​PKG_AUTORECONF="​yes"​ #​PKG_AUTORECONF="​yes"​
  
-PKG_CONFIGURE_OPTS_TARGET="​--help"</​nowiki>+PKG_CONFIGURE_OPTS_TARGET="​--help"</​code> 
 + 
 +===== Fill-in the Template =====
  
-======Fill-in the Template====== 
 Use information from the tar site to fill-in the template. Use information from the tar site to fill-in the template.
 Refer to [[https://​wiki.libreelec.tv/​index.php?​title=Package.mk#​Variables|package.mk]] for a detailed description of the variables. Refer to [[https://​wiki.libreelec.tv/​index.php?​title=Package.mk#​Variables|package.mk]] for a detailed description of the variables.
- <nowiki> + 
-PKG_NAME="​tar"​+<code>​PKG_NAME="​tar"​
 PKG_VERSION="​1.29"​ PKG_VERSION="​1.29"​
 #​PKG_ARCH="​any"​ #​PKG_ARCH="​any"​
Line 42: Line 48:
 #​PKG_AUTORECONF="​yes"​ #​PKG_AUTORECONF="​yes"​
  
-PKG_CONFIGURE_OPTS_TARGET="​--help"</​nowiki>+PKG_CONFIGURE_OPTS_TARGET="​--help"</​code> 
 + 
 +===== Determine Configuration Parameters =====
  
-======Determine Configuration Parameters====== 
 Build the package to determine configuration parameters: Build the package to determine configuration parameters:
- <​nowiki>​ + 
-PROJECT=RPi2 ARCH=ARM scripts/​build tar</​nowiki>​+  ​PROJECT=RPi2 ARCH=ARM scripts/​build tar
 This first builds the toolchain, which takes quite a long time, and then yields: This first builds the toolchain, which takes quite a long time, and then yields:
- <nowiki> + 
-...+<code>...
 `configure'​ configures GNU tar 1.29 to adapt to many kinds of systems. `configure'​ configures GNU tar 1.29 to adapt to many kinds of systems.
  
Line 197: Line 204:
 Report bugs to <​bug-tar@gnu.org>​. Report bugs to <​bug-tar@gnu.org>​.
 GNU tar home page: <​http://​www.gnu.org/​software/​tar/>​. GNU tar home page: <​http://​www.gnu.org/​software/​tar/>​.
-General help using GNU software: <​http://​www.gnu.org/​gethelp/>​.</​nowiki>+General help using GNU software: <​http://​www.gnu.org/​gethelp/>​.</​code> 
 + 
 +===== Update package.mk =====
  
-======Update package.mk====== 
 Update the PKG_CONFIGURE_OPTS_TARGET variable for corresponding effect, for example: Update the PKG_CONFIGURE_OPTS_TARGET variable for corresponding effect, for example:
-*tar should not interfere with tar shipped with LibreELEC (--program-prefix='​gnu-'​) +  ​* tar should not interfere with tar shipped with LibreELEC (--program-prefix='​gnu-'​) 
-*tar should be self-contained (--enable-static --disable-shared,​ not documented in the previous section) +  * tar should be self-contained (--enable-static --disable-shared,​ not documented in the previous section) 
- <nowiki> + 
-PKG_NAME="​tar"​+<code>​PKG_NAME="​tar"​
 PKG_VERSION="​1.29"​ PKG_VERSION="​1.29"​
 #​PKG_ARCH="​any"​ #​PKG_ARCH="​any"​
Line 215: Line 223:
  
 PKG_CONFIGURE_OPTS_TARGET="​--program-prefix='​gnu-'​ \ PKG_CONFIGURE_OPTS_TARGET="​--program-prefix='​gnu-'​ \
-                           ​--enable-static --disable-shared"</​nowiki>+                           ​--enable-static --disable-shared"</​code> 
 + 
 +===== Build the package =====
  
-======Build the package====== 
 Build the package: Build the package:
- <​nowiki>​ +  ​PROJECT=RPi2 ARCH=ARM scripts/​build tar 
-PROJECT=RPi2 ARCH=ARM scripts/​build tar</​nowiki>​+ 
 +===== Next Steps ===== 
 + 
 +==== Include the Package in a Custom Build ==== 
 + 
 +==== Wrap the Package in an Addon ====
  
-======Next Steps====== 
-=====Include the Package in a Custom Build===== 
-=====Wrap the Package in an Addon===== 
 Work in progress Work in progress
  
-=====Submit the Package to LibreELEC===== +==== Submit the Package to LibreELEC ==== 
-======References======+ 
 +===== References ===== 
   - [[https://​wiki.libreelec.tv/​index.php?​title=Preparing_a_Build_Environment|Preparing a Build Environment]]   - [[https://​wiki.libreelec.tv/​index.php?​title=Preparing_a_Build_Environment|Preparing a Build Environment]]
   - [[https://​wiki.libreelec.tv/​index.php?​title=Package.mk|package.mk]]   - [[https://​wiki.libreelec.tv/​index.php?​title=Package.mk|package.mk]]
   - [[https://​wiki.libreelec.tv/​index.php?​title=Package_File_System_Hierarchy|Package File System Hierarchy]]   - [[https://​wiki.libreelec.tv/​index.php?​title=Package_File_System_Hierarchy|Package File System Hierarchy]]