LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Easy Build script system (https://www.linuxquestions.org/questions/slackware-14/easy-build-script-system-403576/)

gnashley 01-15-2006 06:40 AM

Easy Build script system
 
http://distro.ibiblio.org/pub/linux/...3-noarch-1.tgz

After an extensive rewrite and lot's of testing, I've released a new version of Amigo PkgBuild.

PkgBuild is a very easy way to compile and package software for yourself, or for distribution. It allows you to create a build script for source-code packages, usually in just a few seconds. All the repetitive commands are included in a FUNCTIONS file which is read by each build script. This keeps nearly all the working code out of sight.

For software which will successfully compile with just the configure and make commands, you only need to fill in 4 variables in the PkgBuild script. This means you can create a build script for most software in just a few seconds. It also means that folks who don't know how to write BASH scripts can create build scripts.

An advanced PkgBuild template allows for more flexibility for compiling software which requires extra config flags, or that needs special handling of documents or installation.

As configured by default, PkgBuild doesn't actually install the package on your system. And you can configure the directories where the source code gets unpacked and built, plus the dirs where the package gets built and where the final package gets placed.

The program script is pretty well commented. Documents and examples are included which will help you to get started.
Feedback is welcomed.

GlowGlow 01-16-2006 04:40 AM

FWIW, I use this for building my packages:

http://danieldk.org/buildpkg/

It is heavily inspired by pkgmk from Crux, but was rewritten from scratch. Just like pkgmk it can download source tarballs, very their checksums, and do a footprint check after building a package (to check whether the permissions are correct). A small collection of build scripts that use buildpkg can be found at:

http://builds.slackbasics.org/newsource/

gnashley 01-17-2006 09:05 AM

Here you'll find around 100 tarballs with PkgBuild scripts. These are all software which can be compiled with just GTK/GLIB-1.2.

G12 SOURCES

Most of these are repackaged tarballs.
For many of them I have updated the configuration or Makefiles for successful compilation.
A few of them required minor changes to the source code for compiling
with GCC-3.3.4.
In tarballs where source code has been changed, or very major changes in config files have been made, you|ll find notes which indicate such changes.

Having a look at a few of the PkgBuild scripts will show you how easy it is to write one for nearly any source code package. For software which will compile with just ./configure, make, make install, all you have to give is the name, version and suffix of the tarball to write your script.

The whole script without commmets looks like this:

#!/bin/sh
BUILD="1"
NAME="PackageName"
VERSION="0.0.0"
SRC_SUFFIX=".tar.bz2"
source /usr/share/Amigo/PkgBuild/FUNCTIONS ;
do_all_processes ;
exit 0

Or, for more complex control, you can use a step-by-step script which divides the package creation into several steps which you can customize or skip. Again, without comments, it looks like this:

#!/bin/sh
BUILD="1"
NAME="GUIcompletion"
VERSION="0.1.5"
SRC_SUFFIX=".tar.bz2"

pre_process ;
find_source ;
make_dirs ;
unpack_source ;
fix_source_perms ;
configure_source ;
compile_source ;
fake_install ;
fix_pkg_perms ;
strip_bins ;
create_docs ;
compress_man_pages ;
make_description ;
make_doinst ;
make_package ;
post_process ;
exit 0


All times are GMT -5. The time now is 01:11 AM.