The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Enbld - Yet another package manager for building development environment

SYNOPSIS

Installation

  $ curl -L http://goo.gl/MrbDDB | perl

Prepare a conditions script

  $ cat conditions_for_build.pl
  #!/usr/bin/perl

  use strict;
  use warnings;

  use lib "$ENV{HOME}/.enbld/extlib/lib/perl5/";

  use Enbld;

  enbld 'mydevenv' => build {

      # install latest version
      target 'git' => define {
          version 'latest';
      };

      # install specific version
      target 'perl' => define {
          version '5.18.1';
      };

  };

Run as perl script

  $ chmod +x conditions_for_build.pl
  $ ./conf_for_build.pl

  -> Installs software according to the conditions which are defined at script.

DESCRIPTION

Enbld is yet another package manager for building development environment.

Write conditions of software installation (a version - latest or specific version , the execution of a test code etc.) to a conditions script, and run as perl script.

Then Enbld installs software according to the conditions which is defined in script.

FEATURES

1. The conditions of installation are defined by perl-based DSL

Once it writes a conditions script, the same environment will become reproducible easily.

2. The specified versions can install

Unlike other package management systems, Enbld does not fix a version.

The version to install can be specified freely.

And version 'latest' also can be specified. In this case the latest version is decided automatically, and it be installed.

3. The release of the newer version can check

The software specified version 'latest' can check release of the newer version.

So the software upgraded frequently (vim, git, etc.) can always use the latest version.

4. The all software are installed in a home directory.

There is not require sudo for installation.

Backup and remove is easy.

5. The same interface of installation is offered for all programing languages

Unlike other programing language version manager, the same interface of installatin is offered for all programing languages.

You do not need to learn a different way for every programming language.

ANTI FEATURES

1. Enbld does NOT aim at perfect package manager

The selection plan of the software to support by Enbld is as follows.

  • The software for development updated frequently

    e.g. vim, git

  • The Software which has a specific version specified by the projects.

    e.g.

    programming language (perl, ruby, nodejs, scala etc.)

    Web Server (apache, nginx etc.)

    Database (MySQL etc.)

  • The software required for a developer although not installed in OS X

    e.g. tmux

The software which does not correspond to the above-mentioned base does not support.

2. Enbld does not offer the features which overlaps with the module install features in which a programming language offers.

CPAN, Rubygem, etc. should use for a module install features which a programming language offers.

CAUTION

Enbld does not gurantee success of building of all the versions.

Since log file is displayed when building goes wrong, please analyze and send report:)

INSTALLATION

SUPPORTED PLATFORMS

Enbld is performing verification of running on OS X Mavericks.

Probably, it may operate also on Linux (Debian, Ubuntu etc.). When not running, it is waiting for the report :)

REQUIREMENTS

  • perl 5.10.1 or above

    Enbld certainly use the system perl (`/usr/bin/perl`).

  • GNU Make

  • compiler (gcc or clang)

  • other stuff required for individual target software (e.g. JRE for scala)

INSTALL

 $ curl -L http://goo.gl/MrbDDB | perl

Enbld installs all the components in a $HOME/.enbld directory. Therefore, it is necessary to set the PATH of the software which Enbld installed.

SET PATH

In .bashrc or .bash_profile, add below setting.

 export PATH=$HOME/.enbld/bin:$HOME/.enbld/extlib/bin:$PATH
 export MANPATH=$HOME/.enbld/share/man:$HOME/.enbld/man:$MANPATH

GETTING STARTED Enbld

INSTALL LATEST VERSION

Ready conditions script

 $ cat samples/git_install.pl
 #!/usr/bin/perl

 use strict;
 use warnings;

 use lib "$ENV{HOME}/.enbld/extlib/lib/perl5/";

 use Enbld;

 enbld 'mydevenv' => build {

     target 'git' => define {
         version 'latest';
     };
 }

Run as perl script

 $ ./samples/git_install.pl

Finish installation

 $ git --version
 git version [latest version]

Upgrade

Then, if the newer version is released, please run script again.

 $ ./samples/git_install.pl

The latest version will be installed.

INSTALL SPECIFIC VERSION

A specific version is specified in a conditions script. -> version '5.18.1';

 $ cat samples/specific_version_install.pl
 #!/usr/bin/perl
    
 use strict;
 use warnings;
    
 use lib "$ENV{HOME}/.enbld/extlib/lib/perl5/";
    
 use Enbld;
    
 enbld 'mydevenv' => build {
    
     target 'perl' => define {
         version '5.18.1';
     };
    
 };

'perl 5.18.1' is installed.

 $ perl -v

 This is perl 5, version 18, subversion 1 (v5.18.1) built for ...

ADD ARGUMENTS

'arguments' method adds an additional arguments to 'configure' script.

 target 'perl' => define {
     version '5.18.1';
     arguments '-Dusethreads';
 };

perl 5.18.1 with thread is builded.

 $ perl -v
    
 This is perl 5, version 18, subversion 1 (v5.18.1) built for darwin-thread-multi-2level

INSTALL SOFTWARE WHICH DEPENDS

When using Enbld at OS X, Enbld also solve the dependencies between softwares automatically.

For example, when the is equal to which needs a libidn library for wget, and Enbld install wget, they also install libidn automatically.

  $ enblder install wget
  =====> Start building target 'wget'.
  =====> Found dependencies.
  --> Dependency 'libidn'.
  --> libidn is not installed yet.
  =====> Start building target 'libidn'.

Please solve the software which needs the fix patterns of a dependencies at that of a many using the package Management manager of operating system in operating system of Linux and BSD(s) other than OS X.

UTILITY COMMAND 'enblder'

Enbld installs utility command 'enblder'.

The main commands are shown below.

The description of all commands are shown by perldoc enblder.

Displays available software

Subcommand 'available' displays software list that can install by Enbld.

 $ enblder available

The name displayed on this list is used for the name of the Software which I specify as a condition script.

Install the software

subcommand 'install' installs the latest version of the software.

Use to install Software, without writing a condition script.

Then the 'freeze' subcommand is used, displays the conditions script reflecting the installation.

Displays installed software

Subcommand 'list' displays software list that is installed.

 $ enblder list

Displays conditions script

Subcommand 'freeze' displays the condition script reproducing the software of an installed.

 $ enblder freeze

If the displayed content is redirected to a text file, it will become a script of perl which can be performed as it is.

 $ enblder freeze > conditions.pl
 $ chmod +x conditions.pl
 $ ./conditions.pl

Displays outdated software

Subcommand 'outdated' displays outdated software list.

 $ enblder outdated

Upgrade outdated software

Subcommand 'upgrade' upgrade outdated software.

 $ enblder upgrade git

HOW TO USE RECOMMENDATION OF Enbld

I introduce how to use recommendation of Enbld for the the last.

1 Install Enbld
  $ curl -L http://goo.gl/MrbDDB | perl
2 Display available software list
  $ enblder available
3 Install software to always use the latest version.
  $ enblder install git
4 Make conditions script
  $ enblder freeze > my_conditions.pl
  $ chmod +x my_conditions.pl
5 Add a software to use a specific version
  target 'perl' => define {
      version '5.18.1';
  }
6 Run a conditions script
  $ ./conditions.pl
7 Sometimes check the release of the newer version
  $ enblder outdated
8 Upgrade outdated software
  $ enblder upgrade git
9 Since a trouble is surely encountered by somewhere, please send me a report or a Patch :)

https://github.com/magnolia-k/Enbld/issues

10 Repeat 7 -> 10

SEE ALSO

Enbld::Tutorial

enblder

WEB SITE

https://github.com/magnolia-k/Enbld

http://code-stylistics.net/enbld

ISSUE REPORT

https://github.com/magnolia-k/Enbld/issues

COPYRIGHT

copyright 2013- Magnolia <magnolia.k@me.com>.

LICENSE

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.