pkgbuild

package
v0.0.0-...-efab2a5 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Verbose bool

Verbose is a flag to enable verbose output.

Functions

This section is empty.

Types

type PKGBUILD

type PKGBUILD struct {
	Arch           []string
	Backup         []string
	Build          string
	Conflicts      []string
	Copyright      []string
	DebConfig      string
	DebTemplate    string
	Depends        []string
	Distro         string
	Epoch          string
	Files          []string
	FullDistroName string
	HashSums       []string
	Home           string
	Install        string
	InstalledSize  int64
	License        []string
	Maintainer     string
	MakeDepends    []string
	OptDepends     []string
	Options        []string
	Package        string
	PackageDir     string
	PkgDesc        string
	PkgDest        string
	PkgName        string
	PkgRel         string
	PkgVer         string
	PostInst       string
	PostRm         string
	PreInst        string
	PreRelease     string
	PreRm          string
	Prepare        string
	Priority       string
	Provides       []string
	Codename       string
	StartDir       string
	Section        string
	SourceDir      string
	SourceURI      []string
	URL            string
	// contains filtered or unexported fields
}

PKGBUILD defines all the fields accepted by the yap specfile (variables, arrays, functions). It adds some exotics fields to manage debconfig templating and other rpm/deb descriptors.

func (*PKGBUILD) AddItem

func (pkgBuild *PKGBUILD) AddItem(key string, data any) error

AddItem adds an item to the PKGBUILD.

It takes a key string and data of any type as parameters. It returns an error.

func (*PKGBUILD) CreateSpec

func (pkgBuild *PKGBUILD) CreateSpec(filePath, script string) error

CreateSpec reads the filepath where the specfile will be written and the content of the specfile. Specfile generation is done using go templates for every different distro family. It returns any error if encountered.

func (*PKGBUILD) GetDepends

func (pkgBuild *PKGBUILD) GetDepends(packageManager string, args, makeDepends []string) error

GetDepends reads the package manager name, its arguments and all the dependencies required to build the package. It returns any error if encountered.

func (*PKGBUILD) GetUpdates

func (pkgBuild *PKGBUILD) GetUpdates(packageManager string, args ...string) error

GetUpdates reads the package manager name and its arguments to perform a sync with remotes and consequently retrieve updates. It returns any error if encountered.

func (*PKGBUILD) Init

func (pkgBuild *PKGBUILD) Init()

Init initializes the PKGBUILD struct.

It sets up the priorities map and assigns the full distribution name based on the Distro and Codename fields.

func (*PKGBUILD) Validate

func (pkgBuild *PKGBUILD) Validate()

Validate checks that mandatory items are correctly provided by the PKGBUILD file.

Jump to

Keyboard shortcuts

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