1. Prepare a clean install of VectorLinux Standard 5.1, preferably on a free partition. Save this 'install' as your packaging station. If you can't sacrifice the hard-drive space, just keep your system as clean as possible, meaning that it should not have any slackware-current, freerock (or other) gnome packages or OpenOffice on it. The reason being is we do not want to force dependencies that could cause eventual breakage.
  2. Setup your environment. Put the code below in your $HOME/.bashrc (that's the hidden file called '.bashrc' in your home directory!); doing so sets your system to create packages optimized to VL-standards: export CFLAGS="-O2 -mcpu=i686 -march=i586" export CXXFLAGS="$CFLAGS"
  3. Download the source code of your choice from the software homepage. Source code typically comes as *.tar.gz or *.tar.bz2 files (the latter has better compression which means a smaller download).
  4. Check for any dependencies listed in the application's documents. Install them if necessary (using existing packages - e.g., linuxpackages.net - or by compiling them from source...keep reading!). If you have to install/package any dependencies, you will need to share those in the VL-repository as well.
  5. Open a terminal or command-line interface of your choice (Note: any time this guide asks you to 'Type...', do it in the terminal).
  6. Unzip/tar your source code file. Depending on the file you downloaded, use: tar xzvf filename.tar.gz ---or--- tar xjvf filename.tar.bz2
  7. Move or 'cd' into the new directory (likely of the same name as the file you downloaded). Check for an 'Install' or 'Readme' in that folder and read it!
  8. Decide if you need to specify software-specific compiling options. Read the documentation. Also type './configure --help'. For example, when building Sylpheed, you can tell it to be built with spellcheck by typing './configure --enable-aspell' instead of just './configure'. Doing a basic './configure' should, in most cases, just provide the generic program options which should work just fine. The 'readme' or 'install' files may also discuss these options.
  9. Decide if you need to specify a specific installation location. Most configure-Makefile scripts will force installation of the software to the appropriate directory. You can force the application to be installed in a particular location. In VectorLinux almost every package you create should go to '/usr'.You tell it to install to a specific directory with the '--prefix=/directory' option. Generally, if you are contributing a new package (one not available up to now), use --prefix=/usr. If you're contributing an updated version of an existing package, check where the old one is installed and use that prefix (sometimes it's /usr sometimes /usr/X11R6, etc.). The standards are: - /usr : for text based applications and libraries - /usr/X11R6 : for X11, GTK, GTK2, WxGTK, ... applications. HOWEVER, the GTK/GTK2 itself is on /usr ! - /opt : for static applications (OpenOffice, Acrobat reader, etc) - /opt/kde : kde and it's applications - /opt/xfce4 : XFCE4 and it's applications - /usr/local : games and experimental
  10. Do the initial configure and compile steps with: ./configure (+any options you chose above) && make. Example for Sylpheed: ./configure --prefix=/usr/X11R6 --enable-aspell && make.
  11. Setup Checkinstall and produce a description-pak file. checkinstall is an amazing little piece of software which produces a *.tgz or 'Vector Package' that can be installed/removed via Gslapt or using the 'installpkg' command. However, for effective package building using checkinstall, a description-pak file needs to be created. Create a file called description-pak and save it in the top level of the build directory (i.e., the directory you first cd'ed into way back when/above). That file should then be edited and should include the following:
    Why do we bother with the description-pak? Well, if you don't provide the proper description, VL-Install or gslapt will show "Package created by checkinstall-x.y", which is very useful to the user. Making complete descriptions will also help in the event that someone creates a database of available packages at some point (*hint*) - the database could pull the info directly from the package descriptions.
  12. Run Checkinstall. For the final step we need root privileges, so 'su' and type your root password. As root, type: checkinstall . Note:USE ONLY the VectorLinux provided checkinstall that has been patched with slapt-get support. The original checkinstall does not create dependency info by itself. You might setup a manual dependency info by creating files named required-pak and conflict-pak in the base directory of the package.
  13. Install the newly created package to test it. Code:installpkg software-name.tgz. After testing, you may remove the package from your host by typing Code: removepkg software-name.tgz.
  14. Name the new package appropriately. Ensuring appropriate filenames for our packages is a crucial step. As a general rule, Checkinstall will handle the naming for you. In case it doesn't, here's what we're looking for:
  15. Share your package with the VectorLinux Community. "johnvan" is our local package repository guru. Send him a personal message via the VectorLinux Forum (http://www.vectorlinux.com/forum) that you have a new package available and he will send you details on how and where to upload it.