Giter VIP home page Giter VIP logo

cibs's Introduction

Overview

This is Common IPS Build System (CIBS). It intend to replace all userland-hell known from OpenSolaris and OpenIndiana.

CIBS is inspired by Common Debian Build System

Major features are:

  • Makefile-based (need GNU make)
  • Modular design (include autotools.mk for GNU configure, or cmake.mk for CMake-based packages)
  • Tracking build dependencies
  • Building packages independently (no more terrible "consolidations" or "incorporations")

To create and publish an IPS package you need:

  • CIBS package installed (pkg:/developer/pkg/cibs)
  • Makefile describing what and how you are building
  • At least one canonical IPS manifest.

Look into directory examples for examples.

CIBS modules

common.mk

This module defines common variables and targets. All other modules include this module, and it should not be included directly, unless you are doing something really special.

Targets provided by common.mk

All targets (but clean) provided by this module are abstract and do nothing. Other modules extend these targets. Each target has its annex target-stamp which does the real job. Each *-stamp is a file created with touch command. All internal dependencies are implemented through these "stamps", but developer can use basename for target, e. g. make unpack instead of make unpack-stamp.

Meaning of these targets depends on other included modules:

  • unpack - put sources into the source directory (./work/source by default),
  • patch - modify sources,
  • configure - configure sources, e. g. execute GNU configure or CMake,
  • build - build sources, e. g. compile with C compiler,
  • install - install files into proto directory.
  • clean - remove all stamps and working directory (./work by default)

Each target in the list above depends on previous target. Yes, except clean.

clean has a double-colon rule and by default it is:

clean::
    rm -f *-stamp
    rm -rf $(workdir)

ips.mk

This module provides functions to work with IPS manifests and publish packages.

Targets provided by ips.mk

  • publish - publish IPS package into IPS repository
  • pre-publish - make everything required to publish (including downloading archive, patching, compiling, mogrifying manifests etc), but do not publish. Usefull for final verifications what is going into IPS repository. All intermediate and final manifests are in "work/manifests" directory.
  • build-dep - install build dependencies

Variables used by ips.mk

  • ips-repo - IPS repository to publish, e. g. make publish ips-repo=http://example.com:1234

Any variable defined in Makefile will be passed to pkgmogrify and can be used in IPS manifests (*.p5m). This is especially useful when with variable ips-version, which is by default = version. Example is OpenSSL, where version = 0.9.8x, but ips-version=0.9.8.23 (because letters are not allowed by IPS).

These variables passed additionally: build32 = # or empty, and build64 = # or empty. These variables can be used to cut off some line in package manifest (by commenting out). By default these vars are # (pound). If module 32.mk is included, build32 becomes '' (empty), so lines like:

$(build32) file path=usr/lib/libfoo.so.1

become uncommented. Same for modules 64.mk.

Other automatic variables are protodir.<variant> and builddir.<variant>. These variables hold paths to corresponding directories used to install or build package. <variant> can be, for example, 32 or 64. This allow exact specifying which file is requested, e. g.:

file $(builddir.32)/libfoo.so.1 path=usr/lib/libfoo.so.1

git.mk

Use this modules to get sources from Git repositories. With this module included targets download and unpack mean the same thing - clone git reporitory into source directory ("work/source"), then checkout given tag, commit or branch.

Makefile should define two variables:

  • git-url - URL of Git repository, used as git clone $(git-url) $(sourcedir)
  • git-checkout - Git tag, branch or commit; used as git checkout $(git-checkout)

For example see "examples/symlinks".

copy.mk

If this module is included, entire source tree will be copied into all requested building directories. This is useful for packages that do not support building out of source tree, such as zlib or openssl.

cibs's People

Contributors

ip1981 avatar

Watchers

Dmitry Yusupov 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.