rpm

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: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Communications = "Applications/Communications"
	Engineering    = "Applications/Engineering"
	Internet       = "Applications/Internet"
	Multimedia     = "Applications/Multimedia"
	Tools          = "Development/Tools"
)

Variables

View Source
var (
	RPMArchs = map[string]string{
		"x86_64":  "x86_64",
		"i686":    "i686",
		"aarch64": "aarch64",
		"armv7h":  "armv7h",
		"armv6h":  "armv6h",
		"arm":     "arm",
		"any":     "noarch",
	}

	RPMGroups = map[string]string{
		"admin":        "Applications/System",
		"any":          "noarch",
		"comm":         Communications,
		"database":     "Applications/Databases",
		"debug":        "Development/Debuggers",
		"devel":        Tools,
		"doc":          "Documentation",
		"editors":      "Applications/Editors",
		"electronics":  Engineering,
		"embedded":     Engineering,
		"fonts":        "Interface/Desktops",
		"games":        "Amusements/Games",
		"graphics":     Multimedia,
		"httpd":        Internet,
		"interpreters": Tools,
		"kernel":       "System Environment/Kernel",
		"libdevel":     "Development/Libraries",
		"libs":         "System Environment/Libraries",
		"localization": "Development/Languages",
		"mail":         Communications,
		"math":         "Applications/Productivity",
		"misc":         "Applications/System",
		"net":          Internet,
		"news":         "Applications/Publishing",
		"science":      Engineering,
		"shells":       "System Environment/Shells",
		"sound":        Multimedia,
		"text":         "Applications/Text",
		"vcs":          Tools,
		"video":        Multimedia,
		"web":          Internet,
		"x11":          "User Interface/X",
	}

	RPMDistros = map[string]string{
		"amazon": ".amzn",
		"fedora": ".fc",
		"rocky":  ".el",
	}
)

Functions

This section is empty.

Types

type RPM

type RPM struct {
	PKGBUILD *pkgbuild.PKGBUILD
	RPMDir   string
	// contains filtered or unexported fields
}

RPM represents a RPM package.

It contains the directory path of the package and the PKGBUILD struct, which contains the metadata and build instructions for the package.

func (*RPM) Build

func (r *RPM) Build(artifactsPath string) error

Build builds the RPM package.

It takes the artifactsPath as a parameter and returns an error.

func (*RPM) Install

func (r *RPM) Install(artifactsPath string) error

Install installs the RPM package to the specified artifacts path.

It takes the following parameter: - artifactsPath: The path to the directory where the artifacts are stored.

It returns an error if there was an issue during the installation process.

func (*RPM) Prepare

func (r *RPM) Prepare(makeDepends []string) error

Prepare prepares the RPM instance by installing the required dependencies.

makeDepends is a slice of strings representing the dependencies to be installed. It returns an error if there is any issue during the installation process.

func (*RPM) PrepareEnvironment

func (r *RPM) PrepareEnvironment(golang bool) error

PrepareEnvironment prepares the environment for the RPM struct.

It takes a boolean parameter `golang` which indicates whether or not to set up the Go environment. It returns an error if there was an issue with the environment preparation.

func (*RPM) Update

func (r *RPM) Update() error

Update updates the RPM object.

It takes no parameters. It returns an error.

Jump to

Keyboard shortcuts

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