Documentation ¶
Index ¶
Constants ¶
View Source
const ( EnvArchive = "archive" EnvBash = "bash" EnvShell = "shell" EnvPwsh = "pwsh" EnvPython = "python" EnvPerl = "perl" )
View Source
const ( DEB = "deb" RPM = "rpm" APK = "apk" )
View Source
const ( Root = "root" Shebang = "#!" Bash = "/bin/bash" Shell = "/bin/sh" Powershell = "/usr/bin/pwsh" Python = "/usr/bin/env python3" Perl = "/usr/bin/perl" )
View Source
const ( Changelog = "CHANGELOG" License = "LICENSE" Readme = "README" )
View Source
const ( Arch64 = 64 Arch32 = 32 )
View Source
const ( DefaultVersion = "0.1.0" DefaultLicense = "mit" DefaultSection = "contrib" DefaultPriority = "extra" DefaultOS = "linux" DefaultShebang = "#!/bin/sh" )
View Source
const ( EnvMaintainerName = "PACKIT_MAINTAINER_NAME" EnvMaintainerMail = "PACKIT_MAINTAINER_MAIL" )
Variables ¶
View Source
var ErrPackage = errors.New("unsupported package type")
Functions ¶
Types ¶
type Dependency ¶
func ParseDependency ¶
func ParseDependency(str string) (Dependency, error)
func (*Dependency) Set ¶
func (d *Dependency) Set(str string) error
func (Dependency) String ¶
func (d Dependency) String() string
type Maintainer ¶
func (Maintainer) IsZero ¶
func (m Maintainer) IsZero() bool
func (Maintainer) String ¶
func (m Maintainer) String() string
type Metadata ¶
type Metadata struct { Package string Version string Release string Summary string Desc string `fig:"description"` License string Section string Priority string OS string Arch int Vendor string Home string `fig:"homepage"` Compiler string Maintainer Maintainer Resources []Resource `fig:"resource"` Changes []Change `fig:"change"` Essential bool Depends []Dependency `fig:"depend"` Suggests []Dependency `fig:"suggest"` Provides []Dependency `fig:"provide"` Breaks []Dependency `fig:"break"` Conflicts []Dependency `fig:"conflict"` Replaces []Dependency `fig:"replace"` Requires []Dependency `fig:"require"` Recommands []Dependency `fig:"recommand"` Obsoletes []Dependency `fig:"obsolet"` PreInst Script `fig:"pre-install"` PostInst Script `fig:"post-install"` PreRem Script `fig:"pre-remove"` PostRem Script `fig:"post-remove"` Date time.Time `fig:"-"` Size int64 `fig:"-"` DataHash string `fig:"-"` }
func (*Metadata) HasChangelog ¶
func (*Metadata) HasLicense ¶
func (Metadata) PackageName ¶
Click to show internal directories.
Click to hide internal directories.