====== src2pkg for the impatient ====== The following instructions presume at least a basic understanding of: - Linux (!) - Slackware packages & their installation - Building programs from source Also, it is assumed you are running src2pkg on Slackware. src2pkg has been developed to make it as easy as possible to go from a single source archive to a single installable package. It is not, however, a substitute for package-making experience and understanding. For a more complete picture, try the [[:tutorial|tutorial]]. ===== Download & install ===== Download the Slackware package [[http://distro.ibiblio.org/pub/linux/distributions/amigolinux/download/src2pkg/|here]]. Install as root, with: ~# installpkg src2pkg-*.tgz After installation, while still root: ~# src2pgk --setup Put the kettle on. ===== Setup & Preparation ===== It's advisable to set up a clean working area to keep your source if you don't have one already, and doubly advisable to do so as a user, not root. ~$ mkdir src Next, take a look at the configuration file just installed. ~$ less /etc/src2pkg/src2pkg.conf The important part we need to know is on line 185: ## Working Directories # The default settings for these are like for Slackware SlackBuilds: # # The tarball, or link to it, is in the current directory # SOURCES_DIR="$CWD" # Sources are unpacked and built in /tmp # SRC_BUILDS_DIR="/tmp" # The package build tree is also in /tmp # PKG_BUILDS_DIR="/tmp" # Finished packages are left in /tmp # PKG_DEST_DIR="/tmp" Read the rest of the file for details. Now we know most of what's going to happen is going to happen in /tmp . Make tea. ===== Package building ===== Push the button, make the noise: ~/src$ src2pkg http://example.com/sources/a_configure_make_makeinstall.tar.gz Pay attention to the output. You should now find a package in ''/tmp'' called: /tmp/a_configure_make_makeinstall-1.0.0-i486-1.tgz Drink you tea. ===== Finishing up ===== Install the package you've just created, and do the washing up. ===== What next? ===== Some ideas: * Check the [[:tutorial|Tutorial]] for a more detailed description on package building. * Verify the packages you've built by untarring them before installing. Make sure all the binaries you think should be there are. * Pay attention to the output of the package build. Check the [[:faq|FAQ]] for ideas on solutions to build failures. * [[:config|Configure]] your global build settings in ''/etc/src2pkg/src2pkg.conf'', and tweak your user settings in ''~/.src2pkg/src2pkg.conf''. The latter is especially useful for not overriding the main configuration file. * [[:tutorial#Using src2pkg build scripts|Generate a script]] with the ''-N'' option, then run the build from the script with ''-X''. * Tweak the script as required, reading about the processes in the file. * [[:archive_v1:tutorials#Converting an RPM Archive to a Slackware Package|Convert a file]] from an RPM to a Slackware package. * [[:archive_v1:tutorials#Building a Package from the Internet (using a URL as the argument)|Build a package from the internet!]] * [[|Build something exotic, like a cmake package]]. * Set up any pre- and post-hooks to these processes by adding commands to the ''~/.src2pkg/extensions/.'', where type is ''pre'' or ''post'' and ''process_number'' is the number found from the process index - the two digit number prefixed on the files in ''/usr/libexec/src2pkg/''. * [[http://www.google.co.uk/search?q=make+tea|Make more tea]].