Package manager

Files and directories

Configuration file /etc/wkpkg.conf:

# Default network depot
http://www.gnuwakes.org/depot main

#usb://depot main

#ftp://www.gnuwakes.org/depot main

#cdrom://depot    main

#disk://wakes/rep main

Working directory /var/wkpkg:

# ls -l /var/wkpkg
total 24
drwxr-xr-x   7 root root 4096 Jul 28 23:08 build
drwxr-xr-x   2 root root 4096 Jul 16 02:22 cat
drwxr-xr-x 198 root root 4096 Jul 19 01:32 db
drwxr-xr-x   3 root root 4096 Jul 16 02:22 mnt
drwxr-xr-x   3 root root 4096 Jul 16 02:22 rep
drwxr-xr-x   3 root root 4096 Aug  9 14:40 run

Directory structure:

  • build: where you create new packages

  • cat: where is the index catalog

  • db: database of installed packages

  • mnt: to mount device with repository

  • rep: repo where wkpkg download packages before installing them (for remote sources)

  • run: to edit packages

Create a package

create the following structure:

# ls -l
total 24
-rw-r--r-- 1 root root  186 Sep  6  2009 Buildfile
drwxr-xr-x 2 root root 4096 Sep  6  2009 binaries
drwxr-xr-x 2 root root 4096 Sep  6  2009 build
drwxr-xr-x 2 root root 4096 Sep  6  2009 infos
drwxr-xr-x 2 root root 4096 Sep  6  2009 patchs
drwxr-xr-x 2 root root 4096 Sep  6  2009 procedures

binaries is the directory where the compiled programs will stay and build is where the programs will be built with Buildfile:

f_build ()
{
  $SOURCES_DIR/configure --prefix=/usr \
    && make && make DESTDIR=$INSTALL_DIR install
}

f_clean ()
{
  return 0
} 

In patch put the patches. In procedures create the following files:

Configure  Postinstall  Postremove  Preinstall  Preremove

for a future use. Meta datas for the package are in the directory infos:

Architecture  Category  Depends  Description  Maintainer  Version

And put the sources of the program in the directory sources. Then, build the program using build and create the package using:

wkpkg <package_name>

and create the binary package:

wkpkg -b <package_name>