SourceFiles.org - Use the Source, Luke
Home | Register | News | Forums | Guide | MyLinks | Bookmark

Related Sites

Latest News
  General News
  Reviews
  Press Releases
  Software
  Hardware
  Security
  Tutorials
  Off Topic


Back to files

UniPackage v0.5.2 <ben.myles@gmail.com>

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Note: The GNU General Public License should be available in the same directory as this readme, under the name UniPackage.License

IMPORTANT: Although UniPackage itself is licensed under the GNU General Public License, software packaged using UniPackage MAY NOT BE.


UniPackage is an alternative to distribution-specific packaging systems like dpkg and RPM. UniPackage is a simple system that works on any Linux distribution.

UniPackage packages are tar.bz2 archives which contain a self-contained "AppDir" which can be moved anywhere in the filesystem without disturbing the application's installation. In most cases, this packaging does not require changes to the application's code.

The issue of dependencies is avoided by bundling all required libraries in the AppDir. However, to conserve memory, applications will default to using existing libraries already installed on the system if they are available.

Disk space is conserved by transparently decompressing the application's "bin" and "lib" directories upon execution of the application (new to v0.5.2).


Quick Guide to Creating Packages:

In the following example, we will show how to create a package for MPlayer.

  1. Extract the UniPackage tarball somewhere on your system (if you're reading this, then obviously you've done that).
  2. Download the MPlayer source archive (the .tar.bz2) and extract it somewhere on your system (anywhere is fine).
  3. Change your working directory to where you extracted UniPackage.
  4. UniPackage makes use of 'recipes' to compile programs, similar to in GoboLinux (www.gobolinux.com). A recipe is a simple bash script that contains the commands necessary to compile a program. For most programs, the 'Recipe.Standard' recipe should work fine. However, for more complex programs you may need to either create a recipe or find one that someone else has created.

    Included with UniPackage is an example of a "complex" recipe for creating an MPlayer package - 'Recipe.MPlayer'. If you have a look through the recipe, you will see that it's not really complex. It just sets up a few extra directories, downloads and extracts fonts/codecs/skins which are specific to MPlayer. You can modify the recipe as much as you like to get the desired compilation result.

    Once you have created/found your recipe, you invoke the 'CreatePackage' script to create your package. CreatePackage requires a few arguments, and running CreatePackage without any arguments will give you a concise overview of what you need to supply to it.

    To create our MPlayer package, we invoke CreatePackage by

    typing

./CreatePackage /usr/local/src/MPlayer-1.0pre5 MPlayer-1.0pre5 gmplayer Recipe.MPlayer "--enable-gui"

To break down the arguments:

Arg1: Path to the program's source files

/usr/local/src/MPlayer-1.0pre5

Arg2: Name of the program (arbritrary, use whatever you like)

MPlayer-1.0pre5

Arg3: Name of the binary which will launch the compiled program

gmplayer

Arg4: Filename of the recipe you wish to use (MUST be in the

        current directory).
        Recipe.MPlayer

Arg5: Any additional commands you would like to send to the configure

         script when compiling (this is just exported to the recipe as
         a variable so even if the program does not use a configure
         script, you can still specify options which the recipe will
         insert into the right place).

         If there are no additional options you wish to specify, you
         must still provide the argument, but just use empty quotes: ""

        "--enable-gui"

And that's it. The program should compile, and be packaged up into a nice bzip2-compressed tarball.

To distribute the package, just have your users download the tarball and instruct them to extract its contents to wherever they like (I like to place my packages under /Applications but it's entirely up to the user).

All configuration files (if applicable) will be contained within the extracted package directory. Regardless of where the user extracts the tarball, the program should still be able to find all required config files, libraries etc just fine.

To run the program, the user just navigates to the directory and executes the "AppRun" script. If they use Rox-Filer, all they need to do is click on the directory in Rox to launch the program.


Comments? Suggestions? Like to help make UniPackage better?

Send email to ben.myles@gmail.com or visit our website at https://developer.berlios.de/projects/unipackage/


Other Sites

Discussion Groups
  Beginners
  Distributions
  Networking / Security
  Software
  PDAs

About | FAQ | Privacy | Awards | Contact
Comments to the webmaster are welcome.
Copyright 2006 Sourcefiles.org All rights reserved.