SRC2PKG(1)

NAME
src2pkg - manual page for src2pkg-2.1

DESCRIPTION
src2pkg - Builds an installable package from a source archive or from other installable content.

src2pkg [-h(--help), -hh(--more-help), --version, --list]

src2pkg [User Options] [Build Options]  file-name

src2pkg -[ABCDHINOPRSTUV(VV)WX] -[abcdefimnpsuv] file-name

EXTENDED OPTIONS
-E -LANG -[DEST,JAIL,REAL,SAFE,UNION] -[DEB,PET,PET2,TAZ,TBZ,TGZ,TLZ,TXZ,Z1,Z2,Z3,Z4] -[ACF,ACN] -LOG -BUMP - -[M32,M64] --machine=?? --jobs=?? -[L32,L64] --libdirsuffix=??

    Capitalized User Options take no argument:

-A  Autogenerate a src2pkg script when and if the build succeeds.

-B  Keep backup of any files overwritten by this installation.

-C  Place finished package in Current directory.

-CWD
    Use the current directory for all build locations.

-D  Don't apply diff or patch files automatically.

-H  Place finished package in your HOME directory.

-I  Install the created package when finished.

-N  Generate a starting src2pkg script and description file only.

-O  Use an OBJECT directory for building (USE_OBJ_DIR='YES').

-P  Preserve permissions in the source directory. (CORRECT_PERMS='NO')

-Q  Query the user for interactive options during configuration and package creation.

-R  Replay errors in configuration or compilation(useful in QUIET mode).

-S  Use a Shell script for installation(install.sh by default)

-T  Test-build the source code without attempting to make a package.

-U  Update the build script for compatibility if needed.

-V  DEBUG -show detailed prompts for debugging.

-VV Be verbose. Show all output from the steps (QUIET='NO').

-W  Remove (wipe out) temporary build files (CLEANUP=ALL).

-X  Execute a build script in the current working directory.

    The following Build Options require an argument separated by the '=' sign. Use single '' or double "" quotes around the arguments if they contain spaces.

-a  Set the architecture of the package [-a=noarch] (ARCH='').

-b  Set the build or release number [-b=2] (BUILD='').

-c  Set the CONFIG_COMMAND option -usually 'configure'.

-d  Set the list of douments to include [-d='README AUTHORS'] (DOCLIST='').

-e  Pass extra arguments to configure [-e='--disable-gnome'] (EXTRA_CONFIGS='').

-f  Set the CFLAGS variable [-f='-Wall -O3'] (STD_FLAGS='').

-i  Set the install command line [-i='make install'] (INSTALL_LINE).

-m  Set the 'make' command [-m='make dep all'] (MAKE_COMMAND).

-n  Set the package name [-n='newname'] (ALT_NAME='').

-p  Set the installation prefix [-p=/usr] (PRE_FIX='').

-s  Set the configuration subdir [-s=src] (CONFIG_SUBDIR='').

-u  Set the URL location of the source tarball.

-v  Set the version of the package [-v=0.0.0a] (ALT_VERSION='').

Note:
    Variables shown above in parenthesis are the src2pkg script equivalents.

    Special Options:

-h  (--help) Show the help message and then exit.

-hh (--more-help) Show the Advanced Options and then exit.

-v  (--version) Show the src2pkg version and then exit.

--setup
    This special option compiles the binaries and libraries needed by src2pkg. Usually you only need to do this when you first install src2pkg or if you upgrade src2pkg and the new version uses a new version of these programs. This command must be run as 'root' since it eventually creates and installs a package of the resulting libraries and binaries -called src2pkg-helpers-X.X.??

--list
    Show a list of the src2pkg instruction functions (for use with --resume= or --pause= option)

    Extended Options:

-LOG
    Log the output from 'configure', 'make' and 'make install' to a file.

-BUMP
    Increment the BUILD number and write the change to the build script.

-ACF
    Use configuration options from *.spec or rules files, if found.

-ACN
    Use standard configuration options found in configure script. INSTALL_TYPE

-DEST
    Run installation commands using the DESTDIR variable if possible.

-JAIL
    Run installation commands in a 'jailed' root directory.

-REAL
    Run installation commands in the real root filesystem using backup(root only).

-SAFE
    Run installation commands in a SAFE mode(root only). (Implies the -REAL option)

-UNION
    Run installation commands using a unionfs/chroot, if available(root only).

--pause=(before|after)
    (before|after) Pause before or after running each function.

--pause=funcname
    Pause before and after the named function('src2pkg --list' to see options).

--resume=funcname
    Resume a build starting at the named instruction function. Run 'src2pkg --list' to see a list of the named functions.

--cc=?? Set the CC variable to choose the C compiler to use.

--cxx=?? Set the CXX variable to choose the C++ compiler to use.

--convert Convert/translate a Slackbuild script into a src2pkg script(long form).

--convert-simple Convert/translate a Slackbuild script into a src2pkg script using a short form if possible.

--splitpkg Create separate 'devel', 'i18n', 'docs' and/or 'solibs' packages.

-E  Create and use extended database files (slack-required and slack-supplies).

--jobs=??
    Set the number of concurrent 'jobs' to be run by the 'make' program. (ex: --jobs=5 passes '-J5' to 'make' program)

-LANG
    Delete extra language files (man-pages, locale and i18n) files.
    Be sure to configure /etc/src2pkg/DONT_PURGE.locales file first.

-L(32/64)
    Set the LIBDIRSUFFIX variable to adjust installation paths for multilib systems.
    Set to -LNULL(or L0 or -Lnull), if needed, to use no suffix in the installation paths.

--libdirsuffix=??
    As above, but use this syntax if setting to anything besides 32, 64 or NULL.

-M(32/64)
    Set the '-m'(machine_option) variable to gcc, to use the selected compiler. This is used to create 32-bit libs/programs for 64-bit systems (using -M32).

--machine=??
    As above, but use this syntax for any options besides 32 or 64.

-DEB
    Create the final package as a debian *.deb archive.

-PET
    Create the final package as a '.pet' archive.

-PET2
    Create the final package as a '.pet' archive for 'woof'.

-RPM
    Create the final package as an '.rpm' archive.

-TAZ
    Create the final package as a slitaz '.tazpkg' archive.

-TBZ
    Use bzip2 to compress the final package.

-TGZ
    Use gzip to compress the final package (this is the default).

-TLZ
    Use lzma to compress the final package.

-TXZ
    Use xz to compress the final package.

-UPX
    Use upx-ucl or upx to compress binaries inside the package.

-EPX
    Use exepak to compress binaries inside the package.

-Z? SAVE_SPACE=? Squeeze packages by using more compression:
    The 'Z' options are cumulative - Z4 does all of Z1, Z2 and Z3.

-Z1 Z1 Use bzip2 instead of gzip for man-pages.

-Z2 Z2 Compresses ELF binaries using upx or upx-ucl if present.

-Z3 Z3 Link to a common copy of the GPL in /usr/share/licences.

-Z4 Z4 Archive the package doc directory and remove 'info' files.

EXAMPLES

    src2pkg myprogram-0.1.tar.bz2

    src2pkg -N myprogram-0.1.tar.bz2

    src2pkg -i='make install install-data'-A myprogram-0.1.tar.bz2

    src2pkg -e='--disable-nls' -A myprogram-0.1.tar.bz2

USAGE

    When given the name of a compressed source tarball src2pkg performs all the commands necessary to unpack and compile the sources and then install them using the command 'make install', tracking whatever directories, files or links are created and then making a Slackware-type tgz package from those files, etc.

    src2pkg will execute its' own scripts if one is named instead of a tarball, or the command 'src2pkg -X' will search the current directory and run the first *.scrpkg.auto or *.src2pkg script it finds.

    Giving a valid URL to a source tarball or *.src2pkg script online will automatically download the archive or script for you if you are connected to the internet and then build the package.

    The options -ACF and -ACN are used to allow src2pkg to try to find options automatically and pass them to the configure script. The -ACF option tells src2pkg to look for options in an RPM *.spec file or debian 'rules' file, if either one is present inside the sources. The -ACN option tells src2pkg to detect common standard options in the configure script itself. If present, they will assigned default values and used to configure the sources. The list of possible options which will be searched for can be configured in the /etc/src2pkg/src2pkg.conf file by setting the AUTO_CONFIG_OPTIONS variable.

SEE ALSO
The full documentation for src2pkg is maintained as part of the src2pkg package.

See /usr/doc/src2pkg\-x.x for further usage.