From 73561d3f8d447d5fa979cfa470c3fc1a34dc5a2a Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Thu, 6 Sep 2018 14:13:07 -0500 Subject: Developer's Handbook: Add some abuild stuff I wrote --- src/devel/1_preparing.xml | 52 +++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 46 insertions(+), 6 deletions(-) (limited to 'src/devel/1_preparing.xml') diff --git a/src/devel/1_preparing.xml b/src/devel/1_preparing.xml index 0966a44..4584caa 100644 --- a/src/devel/1_preparing.xml +++ b/src/devel/1_preparing.xml @@ -158,22 +158,62 @@ Packages and Repositories The abuild command enables you to build a package file for later installation on to one or more computers running the Adélie Linux dsitribution. A package file is a kind of archive file that contains two key parts: package metadata, and package content files. Package metadata is a collection of information used by a package manager, such as apk, to determine information about the package and the package file, including its name, version, maintainer contact information, installed size on disk, and more. The package content files are a collection of one or more files that comprise the package itself, including executables, default configuration, data files, and any other files needed for the package to work properly. In some cases it may also include templates, examples, or documentation. - All packages belong to a package repository or repo. A repository is a collection of related packages. The Adélie Linux distribution has three main repositories: the system repository, used for system software and important libraries; the user repository, used for the majority of packages that users may be interested in; and the nonfree repository, containing packages that do not have a free or libre license. - While you are developing on your own computer, you may have as many, or as few, repositories as you like. It can use any name except the above three. You may use a name such as mypackages, or just your username. The repository is a directory on your computer's hard disk. You may create it anywhere, but it is highly recommended that you store your repository in your home directory (/home/yourname). + All packages belong to a package repository or repo. A repository is a collection of related packages. The Adélie Linux distribution has two main repositories: the system repository, used for system software and important libraries; and the user repository, used for the majority of packages that users may be interested in. + While you are developing on your own computer, you may have as many, or as few, repositories as you like. It can use any name except the above two ('system' and 'user'). You may use a name such as mypackages, or just your username. The repository is a directory on your computer's hard disk. You may create it anywhere, but it is highly recommended that you store your repository as a subdirectory of your home directory (/home/yourname/yourrepository). Each package you create will have its own directory inside your repository. If you use the newapkbuild command (discussed later), this will be created for you automatically. Inside this directory will be at least an APKBUILD file, which tells abuild the commands to run to build the package. It may also contain patches or other files necessary for building the package, if necessary. Typically, the abuild command is executed inside the package's directory (for example, /home/yourname/packages/pkgname). However, by setting the APKBUILD environment variable to the absolute path on disk to an APKBUILD file, you may run abuild from any directory.
Using the <command>abuild</command> Command - Running the abuild command with no arguments in a directory containing an APKBUILD file will cause it to install the dependencies of the package as listed in the APKBUILD, and then build the package. Afterwards, the dependencies of the package that were not already installed on your computer are removed. + Running the abuild command with no arguments in a directory containing an APKBUILD file will cause it to fetch the package's sources (if necessary), build the package, and create the package file. Passing the -r argument to abuild will cause it to install the dependencies of the package as listed in the APKBUILD, and then build the package. Afterwards, the dependencies of the package that were not already installed on your computer are removed. If the build concluded successfully, the directory tree created for the source code and build system are removed by default. You may configure what abuild removes when a package concludes building. If the build fails to conclude successfully, no directories are removed by default. You may configure what abuild removes when a package fails to build. - abuild has many commands that you may use, for finer-grained control over the build process. You may use the abuild deps command to only install the dependencies of the package, and use the abuild unpack command to unpack the source archive into the directory tree where it can later be built. These and many other commands are described in more detail in the following section. + abuild has many subcommands that you may use, for finer-grained control over the build process. You may use the abuild deps subcommand to only install the dependencies of the package, and use the abuild unpack subcommand to unpack the source archive into the directory tree where it can later be built. These and many other subcommands are described in more detail in the following section. There are additionally a number of options that you may pass to abuild, which are also described in more detail in the next section.
- <command>abuild</command> Commands - + <command>abuild</command> Subcommands + The abuild command provides many subcommands that you may use while packaging software. + + + checksum + This subcommand instructs abuild to recreate the checksum lines at the end of the APKBUILD. This is typically used when "bumping" or upgrading the software package (which causes it to have new source code). It is also used when creating, modifying, or removing patches from the package. + + + fetch + This subcommand instructs abuild to fetch external source(s) specified in source to the SRCDEST specified in your abuild.conf, and ensure they match the checksum(s) specified in the APKBUILD. The default SRCDEST is /var/cache/distfiles. + + + unpack + This subcommand instructs abuild to unpack the archive files specified in source to the source directory. For instance, if source contained "https://my-package.org/foobar-1.2.zip", the contents of "foobar-1.2.zip" would be extracted to the source directory + + + prepare + This subcommand instructs abuild to run the prepare() function from the APKBUILD. If no prepare() is provided in the APKBUILD, abuild will run a default prepare() which will apply all patches specified in source to the source tree. + + + build + This subcommand instructs abuild to run the build() function from the APKBUILD. + + + package + This subcommand instructs abuild to run the package() function from the APKBUILD. + + + rootpkg + This subcommand + + + + + + + + + + + +
-- cgit v1.2.3-70-g09d2