Aports tree: Difference between revisions

From Alpine Linux
(Some notes on APKBUILD)
 
(Minor rewords and cleanups)
 
(23 intermediate revisions by 12 users not shown)
Line 1: Line 1:
= Description of APKBUILD =
The [https://git.alpinelinux.org/aports/ aports] tree is a repository which contains [[APKBUILD_Reference|APKBUILD]] files for every Alpine package. An ''[https://git.alpinelinux.org/abuild/tree/sample.APKBUILD APKBUILD]'' file contains a "recipe" instructing how a given software package should be built/compiled and packaged. These files are used when building Alpine from source.
== Introduction ==
APKBUILD is a file containing instructions on how something should be built/compiled.<BR>
These files are used when building alpine from source.<BR>
In your build environment you would have at least one APKBUILD for each package/program.


When alpine is compiled, you will no longer see (or have use of) the APKBUILD. The APKBUILD is not included in the 'iso' or 'tar.gz'.
The [[Abuild and Helpers|abuild]] script reads an APKBUILD and executes the steps needed to create a package. Once Alpine Linux is compiled, you will no longer see (or have use of) the APKBUILD. It is not included in the 'iso' or 'tar.gz'.


The ''[http://dev.alpinelinux.org/cgit/abuild/tree/abuild abuild]'' script reads the ''[http://dev.alpinelinux.org/cgit/abuild/tree/sample.APKBUILD APKBUILD]'' and executes the steps needed to create a package.
== Directories ==


== Location  ==
There are some directories placed in the [https://git.alpinelinux.org/aports/ aports] tree. Each directory represent a single package repository. As of 2024-07-07, the aports tree contains the following directories:
The [http://dev.alpinelinux.org/cgit/aports/ aports] tree is a [http://dev.alpinelinux.org/cgit/aports/tree/ directory tree] with many APKBUILDs.


If using the [[Setting_up_the_build_environment_1.9|1.9 build environment]] you should find your aports at
=== main ===
/usr/src/aports
''main'' contains the basic set of packages for Alpine Linux.


== Fetch latest APKBUILD's ==  
=== community ===
While inside your [[Setting up the build environment 1.9|build environment]] you need to install some needed packages and you need to fetch the APKBUILD's from the server.<BR>'''''Note:''' You only need to do these 2 steps once! Next time you can skip this part.''
''community'' contain additional community maintained packages. For various reasons, these are not guaranteed to be supported beyond six months.
apk add alpine-sdk
git clone git://dev.alpinelinux.org/aports /usr/src/
When the above is done you might be interested in fetching the latest updates.
cd /usr/src/
git pull


== Create a APKBUILD ==
=== testing ===
Your are encouraged to contribute with APKBUILD's the you have made.<BR>
All new packages go to ''testing'' first. Package will be moved to ''main'' or ''community'' if there is positive feedback or for other good reasons. Packages in ''testing'' are not included in stable builds, but are only built for [[Repositories#Edge|edge]].
Please look at '[[Creating_an_Alpine_package|Creating_an_Alpine_package]]' that describes how you make your own APKBUILD's.
 
== Fetch latest APKBUILD files ==  
While inside your [[Setting up the build environment 1.9|build environment]] you need to install some needed packages and you need to fetch the APKBUILD's from the server (fetch the aports tree).<BR>
'''''Note:''' You only need to do these 2 steps once! Next time you can skip this part.''
{{Cmd|apk add alpine-sdk}}
{{Cmd|cd ~}}
{{Cmd|git clone <nowiki>git://git.alpinelinux.org/aports</nowiki>}}
When the above is done, you might be interested in fetching the latest updates:
{{Cmd|cd ~/aports}}
{{Cmd|git pull}}
 
=See Also=
*[[Repositories#Edge|What is edge]]
 
[[Category:Development]]

Latest revision as of 10:10, 7 July 2024

The aports tree is a repository which contains APKBUILD files for every Alpine package. An APKBUILD file contains a "recipe" instructing how a given software package should be built/compiled and packaged. These files are used when building Alpine from source.

The abuild script reads an APKBUILD and executes the steps needed to create a package. Once Alpine Linux is compiled, you will no longer see (or have use of) the APKBUILD. It is not included in the 'iso' or 'tar.gz'.

Directories

There are some directories placed in the aports tree. Each directory represent a single package repository. As of 2024-07-07, the aports tree contains the following directories:

main

main contains the basic set of packages for Alpine Linux.

community

community contain additional community maintained packages. For various reasons, these are not guaranteed to be supported beyond six months.

testing

All new packages go to testing first. Package will be moved to main or community if there is positive feedback or for other good reasons. Packages in testing are not included in stable builds, but are only built for edge.

Fetch latest APKBUILD files

While inside your build environment you need to install some needed packages and you need to fetch the APKBUILD's from the server (fetch the aports tree).
Note: You only need to do these 2 steps once! Next time you can skip this part.

apk add alpine-sdk

cd ~

git clone git://git.alpinelinux.org/aports

When the above is done, you might be interested in fetching the latest updates:

cd ~/aports

git pull

See Also