In Development Package, API may change between versions.

import "github.com/egdaemon/eg/runtime/x/wasi/egdebuild"

Package egdebuild for building debian packages. allowing developers to create debian packages and upload them using common debian tools. currently only supported for local runs due to gpg requirements.

Constants

const (
    ContainerName = "egdebuild"
)

Variables

var Option = option(nil)

func Build

func Build(cfg Config, opts ...option) eg.OpFn

Build creates a debian package from debian skeleton folder containing. requires a working

func Prepare

func Prepare(c eg.ContainerRunner, archive fs.FS) eg.OpFn

Basic container for building debian packages. the archive must provide the container file to use. if you provide nil archive a default container will be provided but likely wont have dependencies needed.

func Runner

func Runner() eg.ContainerRunner

container for this package.

func Runtime

func Runtime(cfg Config, opts ...option) shell.Command

Shell environment runtime from a config.

func UploadDPut

func UploadDPut(gcfg Config, dput fs.FS) eg.OpFn

uploads the generated deb packages using a dput configuration.

type ChangeLog

type ChangeLog struct {
    When time.Time
}

type Config

type Config struct {
    Maintainer
    ChangeLog
    Dependency
    Description    string   // package description
    Architecture   string   // architecture for the debian package, defaults to any.
    SignatureKeyID string   // GPG key ID to use for signing the package.
    Name           string   // name of the package to build. correlates to the DEB_PACKAGE_NAME environment variable.
    Version        string   // version of the package to build. correlates to DEB_VERSION environment variable.
    Distro         string   // distribution to build the package for. correlates to DEB_DISTRO environment variable.
    SourceDir      string   // absolute path to the source files to use for building the package.
    Debian         fs.FS    // debian package files to use for building the package. generally only the rules file needs to be provided. the 'debian' directory is cloned from the fs.FS
    Environ        []string // additional environment variables to pass to the build process.
}

func From

func From(c Config, opts ...option) Config

func New

func New(pkg string, distro string, src string, opts ...option) (c Config)

type Dependency

type Dependency struct {
    Build   []string
    Runtime []string
}

type Maintainer

type Maintainer struct {
    Name  string
    Email string
}