www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - APT repository

An APT repository is a self contained directory, it does not require a
program or webserver to work. If you want to share the repository with
the world just point a webserver to the repository's directory.

Inside a directory you would like to be hold your repository create a
directory called conf and edit a file conf/distributions In this file I
suggest the following (Origin and Discription updated as needed).
Commands will assume operating inside the directory containing conf, not
inside the conf directory itself)

conf/distributions
----------
Origin: Jesse Phillips
Label: Digital Mars
Suite: stable
Codename: lenny
Version: 5.1
Architectures: i386 amd64 any source
Components: non-free
Description: Test repository for Digital Mars
-----------

To support the different naming conventions accross Ubuntu and Debian I
suggest these commands:

mkdir dists
mkdir dists/lenny
ln -s -T lenny dists/stable
ln -s -T lenny dists/hardy
ln -s -T lenny dists/squeeze
ln -s -T lenny dists/testing
ln -s -T lenny dists/lucid

Now install reprepro: aptitude install reprepro

And use it to pull in your first deb package

$ reprepro -Vb . includedeb lenny path/to/deb

V for verbose and b for base directory (repository location on system).
The repository is now ready for everyone to add to their sources file
with one of the following:

deb http://www.example.com/apt lenny non-free
deb http://www.example.com/apt stable non-free
deb http://www.example.com/apt squeeze non-free
deb http://www.example.com/apt testing non-free
deb http://www.example.com/apt hardy non-free
deb http://www.example.com/apt lucid non-free

Walter, please take note that you will not be able to include version
1.x and 2.x compilers with this (forcing it might work). For this reason
DDebber will packages them in dmd-1 and dmd-2

References:

1. http://www.debian-administration.org/articles/286
2. http://dsource.org/projects/ddebber
May 30 2010