Here are the basic steps to getting a development copy of tpkg up and running. Once you're ready to progress to a production-grade install see our production setup page.
Client
Via RubyGems
Our recommended installation process is via RubyGems:
gem install tpkg
MacPorts
On a Mac the MacPorts system provides an alternative easy installation:
port install tpkg
The Hard Way
If you'd prefer, you can download the tpkg source tarball and run from there.
Download tpkg and unpack it.
If you add the client directory to your PATH you can run tpkg without installing it. Since you're running the client without building and installing the client package you'll have to resolve dependencies manually for now. The client depends on the facter library. This page has links to facter packages for a variety of platforms. If you have Ruby Gems you can install facter with gem install facter.
Configuration
Tpkg will use /opt/tpkg as the base directory by default, which is where it will install relocatable packages and store its own state. If you want to test out tpkg without root privileges you can create ~/.tpkg.conf:
base = /home/you/tpkgbase
Demo Package
Here are some instructions for making up a quick package and installing it.
- mkdir /tmp/demopkg
- Create /tmp/demopkg/tpkg.yml:
name: demopkg version: 1.0 maintainer: Nobody description: Some description
- mkdir /tmp/demopkg/reloc
- touch /tmp/demopkg/reloc/demofile
- tpkg --make /tmp/demopkg
- tpkg --install /tmp/demopkg-1.0.tpkg
- rm -rf /tmp/demopkg /tmp/demopkg-1.0.tpkg
The install should have created /home/you/tpkgbase/demofile. tpkg --qa should list the package as installed, tpkg --ql demopkg should list the files in the package, etc. Experiment with more complex packages, check out the packaging documentation page for more info, or consult the pkgs directory in the distribution for scripts which build complete packages of common applications like Perl, Ruby, etc.
To see what other tpkg operations are available, please consult the man page or use the tpkg -h command.