Web Hosting Philippines, Offshore Programming, Offshore SEO Philippines, Cheap Webhosting Manila Philippines
Home -> Resources -> Linux -> Slackware Package Creation

A Short and Sweet Slackware Package Creation Tutorial

or... 'How to work with a .tar.gz distribution more easily than with that blamed RPM' ;-). The instructions below work with the majority of autoconf-enabled source distributions.

Package Creation

Step 1. Create a work directory for package creation
# mkdir -p /pkgcreate/usr/local
Step 2. Unpack the source distribution, configure it, then compile.
# tar -zxvf foobar-a.b.c.tar.gz
# cd foobar-a.b.c
# ./configure --prefix=/usr/local
# make
3. 'make install' the created files to the package creation directory by using one (or all) of the 'make install' variables shown below.
# make install prefix=/pkgcreate/usr/local

# make install DESTDIR=/pkgcreate/usr/local

# make install ROOT=/pkgcreate/usr/local

# make install prefix=/pkgcreate/usr/local \
               DESTDIR=/pkgcreate/usr/local \
Step 4. Build the tarball package
# cd /pkgcreate
# makepkg /tmp/foobar-a.b.c-i686-1.tgz

(usually follow the suggestions to create symbolic links via the script and to NOT change ownership attributes of the files)

NOTE: outputting the built package to a different directory (e.g. /tmp ) is now required for recent versions of makepkg

Step 5. Presto you have your tarball package! Stow it away for safekeeping.
# mv foobar-a.b.c-i686-1.tgz /your-directory-of-choice

(I use /root/slackpacks)

Package Installation

# cd /root/slackpacks
# installpkg foobar-a.b.c-i686-1.tgz

Package Removal

Removing your installed package is as clean and easy as

# removepkg foobar-a.b.c-i686-1

Note: removepkg will not delete any files that you have modified.


Always clean up the package creation directory for use next time, even for recreating the same package again.

# cd /pkgcreate
# rm -r *

Other Resources

For a much more thorough discussion of Slackware package creation (as well as a nice repository of pre-built Slackware packages, you may refer to the following pages over at http://linuxpackages.net:

  1. (Slackware) Package HOW-TO
  2. The Perfect (Slackware) Package
 Want to tip via bitcoin?

(address string below for double checking)

Back to Top

© 2012 by Andy Sy
last updated: 2012-01-16

NeoTitans- Offshore Outsourced Corporate Web and Software Development Internet Marketing SEO

Web Development / Rich Internet Applications (RIA) Development

Programming Languages


Database Development

Small Business Web Design Philippines Corporate Web Development
   © 2003-2019 Neotitans Technologies Inc.