Back to the main page

Creation of Solaris package

This article talks about creating Solaris package for latest stable version of ProFTPD (it's 1.3.3e when I write this).
For example, has version 1.3.0, so say you wanna do this instead of waiting them to create the package.

Getting the Proftpd source code

Download the latest stable version source code from
Extract and untar it in the directory /tmp/
This creates the subdirectory /tmp/proftpd-1.3.3e/


Depending of your options, a package configuration can fail if some modules are missing.
If this is the case, the modules can be taken from

For this excercise, I had to download files:
1. proftpd-mod-rename-0.17.tar.gz
2. proftpd-mod-deflate-0.5.4.tar.gz

Extract the files and place modules (files mod_rename.c and mod_deflate.c) in directory /tmp/proftpd-1.3.3e/contrib/

Proftpd configuration

First configure proftpd to be installed in temporary location (using --prefix)
{host}/tmp/proftpd-1.3.3e> ./configure \
'--prefix=/genpackage' \
'--with-modules=mod_tls:mod_ldap:mod_rewrite:mod_load:mod_readme:mod_radius:mod_rename:mod_exec:mod_deflate:mod_shaper:mod_sftp' \
'--enable-ctrls' \
'--enable-openssl' \
'--with-includes=/opt/csw/include' \
'--with-libraries=/opt/csw/lib' \
'--disable-ipv6' \


{host}/tmp/proftpd-1.3.3e> gmake

Note 1:
If needed (since Makefile uses make), create symbolic link 'make' (to the file /usr/sfw/bin/gmake)
Note 2:
If needed add directory /usr/ccs/bin to the path (location of command 'ar')
{host}/> setenv PATH /usr/ccs/bin:$PATH


{host}/tmp/proftpd-1.3.3e> gmake install

The proftpd will be installed in /genpackage directory.

Package information file (prototype)

This file contains all objects included in the software (directory, executables, etc)
1. Make sure umask is 22

2. First, create list of all files in the software.
{host}/genpackage> find /genpackage -print > /tmp/proftpd.file_list.txt

3. Replace temporary 'install location' with required one for final installation.
{host}/tmp> cat proftpd.file_list.txt | sed 's/genpackage/opt\/csw/g' > proftpd.file_list.txt~
{host}/tmp> mv proftpd.file_list.txt~ proftpd.file_list.txt

4. Create prototype file
{host}/tmp> cat proftpd.file_list.txt | pkgproto > prototype-proftpd

5. Add line 'i pkginfo' at the beginning of prototype-proftpd file. This tells pkgmk utility all details of package you are making.

6. Verify prototype-proftpd file
6.1 All files are root owned, root group and world readable (0644 or 0755)
6.2 All directories are 0755 owned by root
6.3 Install directory is required one (like /opt/csw/)

A file 'pkginfo'

Create this file, the mandatory paramaters are: PKG, NAME, ARCH, VERSION and CATEGORY
An example:
NAME=proftpd - GPL-licensed FTP server - for Genesys
See pkginfo(4)

The package creation

{host}/tmp> pkgmk -o -r / -d . -f prototype-proftpd

-o = overwrite package instance if already exists
-r = defines root directory for file location
-d = defines location where to create package
-f = defines prototype file. Can be omitted if filename is [Pp]rototype

The package will be created into directory /tmp/MYProftpd/

Archive the package.
{host}/tmp> tar -cf MYProftpd_1.3.3e-SPARC.pkg.tar MYProftpd
{host}/tmp> gzip MYProftpd_1.3.3e-SPARC.pkg.tar

Back to the main page