SkillAgentSearch skills...

Pacur

Automated deb, rpm and pkgbuild build system

Install / Use

/learn @pacur/Pacur
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

pacur

pacur: simple packaging

Arch Linux

AlmaLinux 8 AlmaLinux 9 AlmaLinux 10

Amazon Linux 2 Amazon Linux 2023

Debian Bullseye Debian Bookworm Debian Trixie

Oracle Linux 7 Oracle Linux 8 Oracle Linux 9 Oracle Linux 10

Fedora 41 Fedora 42 Fedora 43

Ubuntu Bionic Ubuntu Focal Ubuntu Jammy Ubuntu Noble Ubuntu Plucky Ubuntu Questing

Pacur allows building packages for multiple linux distributions with a consistent package spec format. Currently deb, rpm and pacman packages are available for several linux distributions. Builds are done on podman containers without needing to setup any virtual machines or install any software other than podman. All packages are built using a simple format that is similar to PKGBUILD from ArchLinux. Each distribution is different and will still require different build instructions, but a consistent build process and format can be used for all builds. podman only supports 64-bit containers, pacur can't be used to build 32-bit packages. Pacur will also create a deb, rpm and pacman signed repository that can be used on ArchLinux, CentOS, Fedora, Debian and Ubuntu to distribute the packages. A tutorial on creating a project is available on medium.

initialize

It is recommended to build the podman images locally instead of pulling each image from the podman Hub. Currently the podman Hub images are not maintained. A script is located in the podman directory to assist with this. Always run the clean.sh script to clear any existing pacur images. Building the images can take several hours.

go install github.com/pacur/pacur@latest
cd "$(ls -d ~/go/pkg/mod/github.com/pacur/pacur@*/podman/ | sort -V | tail -n 1)"
# delete any distro directories if not needed
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

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

spec

| key | type | value | |--------------| ---- | ----- | | targets | list | List of build targets only used for projects. Prefix a ! to ignore target. | | pkgname | string | Package name | | pkgver | string | Package version | | pkgrel | string | Package release number | | pkgdesc | string | Short package description | | pkgdesclong | list | List of lines for package description | | maintainer | string | Package maintainer | | arch | string | Package architecture, can be all or amd64 or arm64 | | license | list | List of licenses for packaged software | | section | string | Section for package. Built in sections available:<br> admin<br> localization<br> mail<br> comm<br> math<br> database<br> misc<br> debug<br> net<br> news<br> devel<br> doc<br> editors<br> electronics<br> embedded<br> fonts<br> games<br> science<br> shells<br> sound<br> graphics<br> text<br> httpd<br> vcs<br> interpreters<br> video<br> web<br> kernel<br> x11<br> libdevel<br> libs | | priority | string | Package priority, only used for debian packages | | url | string | Package url | | rpmopts | list | List of lines to add to RPM spec | | depends | list | List of package dependencies | | optdepends | list | List of package optional dependencies | | makedepends | list | List of package build dependencies | | provides | list | List of packages provided | | conflicts | list | List of packages conflicts | | sources | list | List of packages sources. Sources can be url or paths that are relative to the PKGBUILD | | hashsums | list | List of md5/sha1/sha256/sha512 hex hashes for sources, hash type is determined by the length of the hash. Use skip to ignore hash check | | backup | list | List of config files that shouldn't be overwritten on upgrades | | build | func | Function to build the source, starts in srcdir | | package | func | Function to package the source into the pkgdir, starts in srcdir | | preinst | func | Function to run before installing | | postinst | func | Function to run after installing | | prerm | func | Function to run before removing | | postrm | func | Function to run after removing |

build targets

| target | value | |--------------------|--------------------------| | archlinux | All archlinux releases | | almalinux | All almalinux releases | | amazonlinux | All amazonlinux releases | | debian | All debian releases | | fedora | All fedora releases | | oraclelinux | All oraclelinux releases | | ubuntu | All ubuntu releases | | almalinux-8 | AlmaLinux 8 | | almalinux-9 | AlmaLinux 9 | | almalinux-10 | AlmaLinux 10 | | amazonlinux-2 | Amazonlinux 2 | | amazonlinux-2023 | Amazonlinux 2023 | | debian-bullseye | Debian bullseye | | debian-bookworm | Debian bookworm | | debian-trixie | Debian trixie | | fedora-41 | Fedora 41 | | fedora-42 | Fedora 42 | | fedora-43 | Fedora 43 | | oraclelinux-7 | Oraclelinux 7 | | oraclelinux-8 | Oraclelinux 8 | | oraclelinux-9 | Oraclelinux 9 | | oraclelinux-10 | Oraclelinux 10 | | ubuntu-bionic | Ubuntu bionic | | ubuntu-focal | Ubuntu focal | | ubuntu-jammy | Ubuntu jammy | | ubuntu-noble | Ubuntu noble | | ubuntu-plucky | Ubuntu plucky | | ubuntu-questing | Ubuntu questing |

directives

| directive | value | |--------------------|--------------------------| | apt | All deb packages | | pacman | All pkg packages | | yum | All rpm packages | | archlinux | All archlinux releases | | almalinux | All almalinux releases | | amazonlinux | All amazonlinux releases | | debian | All debian releases | | fedora | All fedora releases | | oraclelinux | All oraclelinux releases | | ubuntu | All ubuntu releases | | almalinux-8 | AlmaLinux 8 | | almalinux-9 | AlmaLinux 9 | | almalinux-10 | AlmaLinux 10 | | amazonlinux-2 | Amazonlinux 2 | | amazonlinux-2023 | Amazonlinux 2023 | | debian-bullseye | Debian bullseye | | debian-bookworm | Debian bookworm | | debian-trixie | Debian trixie | | fedora-41 | Fedora 41 | | fedora-42 | Fedora 42 | | fedora-43 | Fedora 43 | | oraclelinux-7 | Oraclelinux 7 | | oraclelinux-8 | Oraclelinux 8 | | oraclelinux-9 | Oraclelinux 9 | | oraclelinux-10 | Oraclelinux 10 | | ubuntu-bionic | Ubuntu bionic | | ubuntu-focal | Ubuntu focal | | ubuntu-jammy | Ubuntu jammy | | ubuntu-noble | Ubuntu noble | | ubuntu-plucky | Ubuntu plucky | | `ubuntu-questin

Related Skills

View on GitHub
GitHub Stars243
CategoryDevelopment
Updated16d ago
Forks21

Languages

Go

Security Score

85/100

Audited on Mar 12, 2026

No findings