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.
const (
ContainerName = "egdebuild"
)
var Option = option(nil)
func Build(cfg Config, opts ...option) eg.OpFn
Build creates a debian package from debian skeleton folder containing. requires a working
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() eg.ContainerRunner
container for this package.
func Runtime(cfg Config, opts ...option) shell.Command
Shell environment runtime from a config.
func UploadDPut(gcfg Config, dput fs.FS) eg.OpFn
uploads the generated deb packages using a dput configuration.
type ChangeLog struct {
When time.Time
}
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(c Config, opts ...option) Config
func New(pkg string, distro string, src string, opts ...option) (c Config)
type Dependency struct {
Build []string
Runtime []string
}
type Maintainer struct {
Name string
Email string
}