gogurt

package module
v0.0.0-...-7544721 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2017 License: GPL-3.0 Imports: 14 Imported by: 0

README

gogurt

Build Status

Downloads and builds static packages from source.

The successor to install-from-source, packaged in one, neat binary.

To install it:

  go install github.com/alexandrecarlton/gogurt/cmd/gogurt

Caveats

For now, this will ignore musl, and install gcc to get libstdc++.a. To this end, we use a Docker container to build these applications.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyFile

func CopyFile(src, dest string) error

CopyFile recursively copies the src to the dest, overwriting it if it already exists. TODO: Make into a purely go function, not shelled out to 'cp -rf'.

func DecompressSourceArchive

func DecompressSourceArchive(filename string, dir string) error

func Download

func Download(url string, dest string) error

func ReplaceInFile

func ReplaceInFile(fileName, pattern, repl string) error

Just call sed.

Types

type CMakeCmd

type CMakeCmd struct {

	// Path to cmake binary
	// If empty, we will look up cmake on $PATH
	Path string

	// TODO: Rename to InstallPrefix
	Prefix string

	// Used when searching for include files and libraries
	// TODO: Rename to PrefixPath
	PathPrefix []string

	SourceDir string

	BuildDir string

	CacheEntries map[string]string

	Paths []string

	CFlags []string

	PkgConfigPaths []string
}

func (CMakeCmd) Cmd

func (cmakeCmd CMakeCmd) Cmd() *exec.Cmd

type Config

type Config struct {
	// where we assume applications will finally be installed.
	Prefix string

	// Where we store our tarballs.
	CacheFolder string

	// Where we extract and build our applications
	BuildFolder string

	// Where we install applications to keep them separate.
	InstallFolder string

	// How many cores are allocated to building applications.
	NumCores uint

	// We load from defaults, overwriting with the entries found in the config file.
	PackageVersions map[string]string
}

func (Config) BinDir

func (config Config) BinDir(p Package) string

func (Config) BuildDir

func (config Config) BuildDir(p Package) string

func (Config) CacheDir

func (config Config) CacheDir(archive SourceArchive) string

func (Config) IncludeDir

func (config Config) IncludeDir(p Package) string

func (Config) InstallDir

func (config Config) InstallDir(p Package) string

func (Config) LibDir

func (config Config) LibDir(p Package) string

func (Config) PkgConfigLibDir

func (config Config) PkgConfigLibDir(p Package) string

func (Config) PkgConfigShareDir

func (config Config) PkgConfigShareDir(p Package) string

type ConfigureCmd

type ConfigureCmd struct {
	Prefix string

	Args []string

	CC string

	CPP string

	CXX string

	CFlags []string

	CppFlags []string

	CxxFlags []string

	LdFlags []string

	Libs []string

	Paths []string

	PkgConfigPaths []string

	Dir string
}

func (ConfigureCmd) Cmd

func (configure ConfigureCmd) Cmd() *exec.Cmd

type MakeCmd

type MakeCmd struct {
	Jobs uint

	Args []string

	Dir string

	Paths []string
}

func (MakeCmd) Cmd

func (makeCmd MakeCmd) Cmd() *exec.Cmd

type Package

type Package interface {
	Name() string
	URL(version string) string

	// These execute in the checked out directory.
	// Should these take in a config object? Would make things much easier and flexible.
	Build(config Config) error
	Install(config Config) error

	Dependencies() []Package
}

Package ...

type SourceArchive

type SourceArchive interface {
	Name() string
	URL(version string) string
}

Directories

Path Synopsis
cmd
Should really learn what 'package' does
Should really learn what 'package' does

Jump to

Keyboard shortcuts

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