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
  • scdoc(1) to generate manual pages (enabled by default via the manpages option)
  • 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

Link Mode

The build system supports controlling how external dependencies are linked.

  • default_library controls whether libpkgcore itself is built as a static library, shared library, or both.
  • link_mode controls whether dependencies are linked dynamically or statically.

link_mode=static requires default_library=static.

Shared library builds cannot reliably link against non-PIC static dependencies.

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

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors