Categorygithub.com/packagefoundation/yap
modulepackage
0.0.0-20240110113116-7b2c5c549f7d
Repository: https://github.com/packagefoundation/yap.git
Documentation: pkg.go.dev

# README

Yap

yap-logo

report card View examples

Yap allows building packages for multiple GNU/Linux distributions with a consistent package spec format.

Builds are done on Docker containers without needing to setup any virtual machines or install any software other than Docker.

All packages are built using a simple format that is similar to PKGBUILD from Arch Linux.

Each distribution is different and will still require different build instructions, but a consistent build process and format can be used for all builds.

Docker only supports 64-bit containers, Yap can't be used to build packages 32-bit packages.

Initialize

It is recommended to build the OCI images locally instead of pulling each image from the Docker Hub. A script is located in the docker directory to assist with this. Always run the clean.sh script to clear any existing yap images. Building the images can take several hours.

cd ~/go/src/github.com/packagefoundation/yap/docker
sh clean.sh
sh build.sh

Format

key="example string"
key=`example "quoted" string`
key=("list with one element")
key=(
    "list with"
    "multiple elements"
)
key="example ${variable} string"
key__ubuntu="this will apply only to Ubuntu  builds"

Builtin Variables

keyvalue
${srcdir}Source directory where all sources are downloaded and extracted
${pkgdir}Package directory for the root of the package

Spec file - the PKGBUILD

keytypevalue
pkgnamestringPackage name
pkgverstringPackage version
pkgrelstringPackage release number
pkgdescstringShort package description
maintainerstringPackage maintainer
archlistPackage architecture, can be all or amd64
licenselistList of licenses for packaged software
sectionstringSection for package. Built in sections available: admin localization mail comm math database misc debug net news devel doc editors electronics embedded fonts games science shells sound graphics text httpd vcs interpreters video web kernel x11 libdevel libs
prioritystringPackage priority, only used for Debian packages
urlstringPackage url
dependslistList of package dependencies
optdependslistList of package optional dependencies
makedependslistList of package build dependencies
provideslistList of packages provided
conflictslistList of packages conflicts
sourceslistList of packages sources. Sources can be url or paths that are relative to the PKGBUILD
debconf_configstringFile used as debconf config, only used for Debian packages
debconf_templatestringFile used as debconf template, only used for Debian packages
hashsumslistList of sha256/sha512 hex hashes for sources, hash type is determined by the length of the hash. Use SKIP to ignore hash check
backuplistList of config files that shouldn't be overwritten on upgrades
buildfuncFunction to build the source, starts in srcdir
packagefuncFunction to package the source into the pkgdir, starts in srcdir
preinstfuncFunction to run before installing
postinstfuncFunction to run after installing
prermfuncFunction to run before removing
postrmfuncFunction to run after removing

Build targets

targetvalue
alpineall Alpine Linux releases
archall Arch Linux releases
astraall Astra Linux releases
amazonall Amazon Linux releases
centosall CentOS releases
debianall Debian releases
fedoraall Fedora releases
oracleall Oracle Linux releases
ubuntuall Ubuntu releases
amazon-1Amazon Linux 1
amazon-2Amazon Linux 2
debian-jessieDebian Jessie
debian-stretchDebian Stretch
debian-busterDebian Buster
fedora-35Fedora 35
oracle-8Oracle Linux 8
rocky-8Rocky Linux 8
ubuntu-bionicUbuntu Bionic
ubuntu-focalUbuntu Focal

Directives

Directives are used to specify variables that only apply to a limited set of build targets.

All variables can use directives including user defined variables.

To use directives include the directive after a variable separated by a colon such as pkgdesc__ubuntu="This description will only apply to Ubuntu packages".

The directives above are sorted from lowest to the highest priority.

directivevalue
apkall apk packages
aptall deb packages
pacmanall pkg packages
yumall yum rpm packages
alpineall Alpine Linux packages
archall Arch Linux releases
amazonall Amazon Linux releases
centosall CentOS releases
debianall Debian releases
fedoraall Fedora releases
oracleall Oracle Linux releases
ubuntuall Ubuntu releases
amazon-1Amazon Linux 1
amazon-2Amazon Linux 2
debian-jessieDebian Jessie
debian-stretchDebian Stretch
debian-busterDebian Buster
fedora-35Fedora 35
oracle-8Oracle Linux 8
rocky-8Rocky Linux 8
ubuntu-bionicUbuntu Bionic
ubuntu-focalUbuntu Focal

Examples

Please have a look under the examples folder.

You'll find:

License

See LICENSE file for details.

Credits

Zachary Huff, for his work on Pacur, on which Yap is based on.

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author