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. useful links: - https://www.debian.org/doc/debian-policy/ch-controlfields.html
<a name="ContainerName"></a>
const (
ContainerName = "egdebuild"
UbuntuLatestCodename = "resolute"
)
<a name="Option"></a>
var Option = option(nil)
<a name="Build"></a>
func Build(cfg Config, opts ...option) eg.OpFn
Build creates a debian package from debian skeleton folder containing. requires a working
<a name="Prepare"></a>
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.
<a name="Runner"></a>
func Runner() eg.ContainerRunner
container for this package.
<a name="Runtime"></a>
func Runtime(cfg Config, opts ...option) shell.Command
Shell environment runtime from a config.
<a name="UploadDPut"></a>
func UploadDPut(gcfg Config, dput fs.FS, opts ...option) eg.OpFn
uploads the generated deb packages using a dput configuration.
<a name="ChangeLog"></a>
type ChangeLog struct {
When time.Time
}
<a name="Config"></a>
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.
// contains filtered or unexported fields
}
<a name="From"></a>
func From(c Config, opts ...option) Config
<a name="New"></a>
func New(pkg string, distro string, src string, opts ...option) (c Config)
<a name="Dependency"></a>
type Dependency struct {
Build []string
Runtime []string
}
<a name="Maintainer"></a>
type Maintainer struct {
Name string
Email string
}