GithubHelp home page GithubHelp logo

brewkit's Introduction

pkgx

BrewKit

BrewKit is build infrastructure for pkgx.

$ env +brewkit
$ pkg build node

If you are inside a pantry then BrewKit will figure out what packages you are editing and build them.

$ cd pantry
$ dev
$ pkg edit openssl
# make some edits…
$ pkg build
brewkit: building openssl.org

You can build for Linux (via Docker) using -L, e.g.:

pkg -L build

To run pkg without shellcode you can do eg. pkgx +brewkit -- pkg build, this is necessary because pkg is not listed as a provided program by brewkit since many other projects have decided to provide pkg and we didn’t want to trump them.

Some Details

  • The pkg build environment ensures you have a c/c++ compiler and make
    • We do this to ensure builds on Mac and Linux have a consistent base layer of tooling
    • We also provide shims so use of tools like pkg-config just work
    • We shim sed since Mac comes with BSD sed and Linux typically comes with GNU sed and they are subtly different
  • The pkg test environment automatically adds pkgs when called
    • We emit a warning for this since sometimes these deps should be explicit

Outside a Pantry Checkout

Outside a pantry checkout we operate against your pkgx installation (which defaults to ~/.pkgx). Builds occur in a temporary directory rather than local to your pantry checkout.

env "$(pkgx +brewkit)" pkg build zlib.net

Additions

This repo is for tooling built on top of the pkgx primitives with the purpose of generalized building and testing of open source packages.

If you have an idea for an addition open a discussion!

Stuff That Needs to be Added

Getting the rpath out of a macOS binary:

lsrpath() {
    otool -l "$@" |
    awk '
        /^[^ ]/ {f = 0}
        $2 == "LC_RPATH" && $1 == "cmd" {f = 1}
        f && gsub(/^ *path | \(offset [0-9]+\)$/, "") == 2
    '
}

This should be added to a pkg doctor type thing I reckon. E.g. pkg doctor zlib.net -Q:rpath.

Hacking on brewkit

In a pantry clone, if you do ../brewkit/bin/pkg build for example your local brewkit will be used rather than that which is installed.

 

Tasks

Bump

Priority is one of major|minor|patch|prerelease|VERSION

Inputs: PRIORITY

./scripts/publish-release.sh $PRIORITY

Shellcheck

for x in bin/*; do
  if file $x | grep 'shell script'; then
    pkgx shellcheck --shell=dash --severity=warning $x
  fi
done

pkgx shellcheck --shell=dash --severity=warning **/*.sh

brewkit's People

Contributors

abevier avatar branchvincent avatar jhheider avatar jrgoodle avatar magnusviri avatar mfts avatar mxcl avatar uesyn avatar waldyrious avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.