debmaker

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2025 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddContentFiles

func AddContentFiles(arw *ar.Writer, debSpec *DebSpec, tmpDir string, verbose bool) error

func AddControlFiles

func AddControlFiles(arw *ar.Writer, debSpec *DebSpec, tmpDir string, verbose bool) error

func NewDirCache

func NewDirCache() *dirCache

func NewDirFileInfo

func NewDirFileInfo(name string) *dirFileInfo

Types

type DebControl

type DebControl struct {
	PkgName    string            `cfg-attr:"pkg-name"`
	Maintainer string            `cfg-attr:"maintainer"`
	Desc       string            `cfg-attr:"description"`
	Attrs      map[string]string `cfg-attr:"other-attrs"`

	Arch    string
	Version string
}

DebControl specifies the attributes of a deb control file.

type DebSpec

type DebSpec struct {
	DebCtrl *DebControl  `cfg-attr:"control"`
	Debian  []*FileEntry `cfg-attr:"debian"`
	Content []*FileEntry `cfg-attr:"content"`
	Link    []*Symlink   `cfg-attr:"link"`
}

DebSpec specifies the whole deb structure: control files and data files.

type FileEntry

type FileEntry struct {
	Path    string `cfg-attr:"path"`     // input file path
	DebPath string `cfg-attr:"deb-path"` // path in deb file

	FileInfo os.FileInfo
	Md5sum   string
}

FileEntry specifies a input file and it's path in the debian package.

func FillFileInfo

func FillFileInfo(contentFiles []*FileEntry, verbose bool) ([]*FileEntry, error)

FillFileInfo fills in the FileInfo field of each content file entry and returns the new file slice. For directories, it recursively walk the tree to collect each directory or file.

type Params

type Params struct {
	OutputDir string
	Spec      string
	Desc      string
	Version   string
	Arch      string
	Verbose   bool
	PkgName   string
	Postinst  string
	Prerm     string
	TmpDir    string

	Files stringSlice
	Dirs  stringSlice
}
type Symlink struct {
	From string `cfg-attr:"from"`
	To   string `cfg-attr:"to"`
}

Symlink specifies an absolute symbolic link for data files.

Jump to

Keyboard shortcuts

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