Skip to content
Snippets Groups Projects
APKBUILD 1.7 KiB
Newer Older
# Maintainer: Celeste <cielesti@protonmail.com>
maintainer="Celeste <cielesti@protonmail.com>"
alice's avatar
alice committed
pkgname=apt
pkgver=2.9.27
Celeste's avatar
Celeste committed
pkgrel=0
alice's avatar
alice committed
pkgdesc="APT package management tool"
url="https://salsa.debian.org/apt-team/apt"
arch="all"
license="GPL-2.0-or-later"
depends="
	debian-archive-keyring
	dpkg
	"
alice's avatar
alice committed
makedepends="
	bzip2-dev
	db-dev
	cmake
	dpkg-dev
	eudev-dev
	gettext-dev
	lz4-dev
	openssl-dev
alice's avatar
alice committed
	samurai
	triehash
	xxhash-dev
	xz-dev
	zlib-dev
	zstd-dev
	"
checkdepends="gtest-dev"
install="$pkgname.pre-install"
pkgusers="_apt"
pkggroups="_apt"
alice's avatar
alice committed
subpackages="
	$pkgname-dev
	$pkgname-libs
	$pkgname-lang
	$pkgname-bash-completion
alice's avatar
alice committed
	"
Celeste's avatar
Celeste committed
source="https://salsa.debian.org/apt-team/apt/-/archive/$pkgver/apt-$pkgver.tar.bz2
	fix-basename.patch
	"
alice's avatar
alice committed
options="!check" # todo

build() {
	cmake -B build -G Ninja -Wno-dev \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DCMAKE_INSTALL_LIBEXECDIR=lib \
		-DCURRENT_VENDOR=debian \
alice's avatar
alice committed
		-DUSE_NLS=ON \
		-DUSE_SYSTEM_APTPKG=OFF \
		-DWITH_DOC=OFF \
alice's avatar
alice committed
		-DWITH_TESTS="$(want_check && echo ON || echo OFF)"
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

dev() {
	default_dev

	mv -v "$subpkgdir"/usr/bin/apt-config "$pkgdir"/usr/bin/
	rmdir -v "$subpkgdir"/usr/bin
}

alice's avatar
alice committed
package() {
	DESTDIR="$pkgdir" cmake --install build
alice's avatar
alice committed

	cd "$pkgdir"
	chown -Rc _apt:_apt \
		etc/apt \
		var/cache/apt \
		var/lib/apt \
		var/log/apt
alice's avatar
alice committed
}

sha512sums="
22bee4057ae7cccb3461babb0c3f9bb931291bed10949b479260f84ff393d5d48d09c310b906cc70594405827dfd0ad994136021392c5162cdc71749b5e53868  apt-2.9.27.tar.bz2
Celeste's avatar
Celeste committed
27d7e1516915bbae025c4c943c7427421662e7c3bee8f1821565ac3cd823e8a823c4ac99efb9cc9a27e338c73b49e2628f0a88c5c2c1d2e935b1c89b9209d18c  fix-basename.patch
alice's avatar
alice committed
"