options

package
v2.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 24, 2026 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Overview

Package options provides build and packaging option utilities, including binary stripping functionality.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Apply

func Apply(packageDir string, o Options) error

Apply runs all enabled/disabled option handlers against packageDir in the correct order (strip first, then cleanup passes).

func Purge

func Purge(packageDir string) error

Purge removes files matching PURGE_TARGETS from the package directory, mirroring makepkg's purge option.

func RemoveDocs

func RemoveDocs(packageDir string) error

RemoveDocs removes documentation directories from the package directory, mirroring makepkg's !docs option.

func RemoveEmptyDirs

func RemoveEmptyDirs(packageDir string) error

RemoveEmptyDirs removes empty directories from the package directory, mirroring makepkg's !emptydirs option. It walks bottom-up so that newly emptied parent dirs are also removed.

func RemoveLibtool

func RemoveLibtool(packageDir string) error

RemoveLibtool removes libtool .la files from the package directory, mirroring makepkg's !libtool option.

func RemoveStatic

func RemoveStatic(packageDir string) error

RemoveStatic removes static library .a files from the package directory, mirroring makepkg's !static option.

func SetDebugDir

func SetDebugDir(dir string)

SetDebugDir sets the output directory for debug symbols. This function is safe to call concurrently from multiple goroutines.

func Strip

func Strip(packageDir string) error

Strip walks through the directory to process each file.

func ZipMan

func ZipMan(packageDir string) error

ZipMan compresses man and info pages with gzip, mirroring makepkg's zipman option.

Types

type Options

type Options struct {
	DebugEnabled     bool
	DocsEnabled      bool
	EmptyDirsEnabled bool
	LibtoolEnabled   bool
	PurgeEnabled     bool
	StaticEnabled    bool
	StripEnabled     bool
	ZipManEnabled    bool
}

Options holds the resolved flags from a PKGBUILD options array.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL