Skip to content

zeppe-lin/libpkgcore

Repository files navigation

OVERVIEW

libpkgcore is the core package management library extracted from CRUX pkgutils. It provides foundational classes and functions for package utilities such as pkgadd(8), pkgrm(8), and pkginfo(1) - handling package installation, removal, and information queries.

This distribution is a fork of CRUX pkgutils at commit 9ca0da6 (Sat Nov 17 2018) with the following differences:

  • Code organized into a standalone library (libpkgcore) and utilities (pkgutils)
  • Support for zstd archive formats
  • Optional support for preserving ACLs and xattrs

See the git log for full history.

Original sources:


REQUIREMENTS

Build-time

  • C++11 compiler (GCC 4.8.1+, Clang 3.3+)
  • Meson
  • Ninja
  • pkg-config(1)
  • libarchive(3) headers and library

INSTALLATION

General

# Configure
meson setup build

# Compile
meson compile -C build

# Install
meson install -C build

Options

Enable ACL support:

meson setup build -Dextract_acl=true

Enable xattr support:

meson setup build -Dextract_xattr=true

Enable both:

meson setup build -Dextract_acl=true -Dextract_xattr=true

Library type

Shared:

meson setup build -Ddefault_library=shared

Static:

meson setup build -Ddefault_library=static

Both:

meson setup build -Ddefault_library=both

For generic static-library packaging, disabling LTO is recommended:

meson setup build -Ddefault_library=static -Db_lto=false

Build type

Debug:

meson setup build -Dbuildtype=debug

Release:

meson setup build -Dbuildtype=release -Db_ndebug=if-release

pkg-config

Compiler flags:

pkg-config --cflags libpkgcore

Link flags:

pkg-config --libs libpkgcore

Static link flags:

pkg-config --static --libs libpkgcore

Layout

  • include/ - public headers
  • src/ - library sources
  • internal/ - internal headers

DOCUMENTATION

Library API is documented in header files under include/libpkgcore.


LICENSE

libpkgcore is licensed under the GNU General Public License v2 or later.

See COPYING for license terms and COPYRIGHT for notices.

About

Core package management library

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors