Building deb packages
Setup the pbuilder environment for all the architecture you intend to support
$ sudo pbuilder create --debootstrapopts --arch --debootstrapopts i386 \ --debootstrapopts --variant=buildd --basetgz /var/cache/pbuilder/base_i386.tgz \ --othermirror "deb http://archive.ubuntu.com/ubuntu intrepid \ main restricted universe multiverse" $ sudo pbuilder create --debootstrapopts --arch --debootstrapopts amd64 \ --debootstrapopts --variant=buildd --basetgz /var/cache/pbuilder/base_amd64.tgz \ --othermirror "deb http://archive.ubuntu.com/ubuntu intrepid main \ restricted universe multiverse"
Set the package name, do a fresh checkout from the trunk of the sources and of the support files, and create an archive with the original sources
$ export PKG_NAME=qpitch-1.0.1
$ svn export svn://svn.gna.org/svn/qpitch/trunk ${PKG_NAME}
$ svn export svn://svn.gna.org/svn/qpitch/tags/deb_packaging/debian ${PKG_NAME}/debian
$ tar -czvf "`echo ${PKG_NAME} | sed 's/-/_/g'`.orig.tar.gz" ${PKG_NAME} --exclude=debian
Build sources and binary packages and check them for correctness
$ cd ${PKG_NAME}
$ debuild -S
$ sudo pbuilder build --basetgz /var/cache/pbuilder/base_i386.tgz ../*.dsc
$ sudo pbuilder build --basetgz /var/cache/pbuilder/base_amd64.tgz ../*.dsc
$ cd ..
$ lintian -Ivi *.dsc
$ lintian -Ivi /var/cache/pbuilder/result/*.deb
Maintaining the Ubuntu repository
The repository structure is created and maintained using reprepro, which can be installed through apt-get
$ sudo apt-get install reprepro
Create the repository structure with two subdirectories containing the configuration files
$ mkdir -p ubuntu/conf $ cd ubuntu
Create a configuration file conf/distributions to specify which architecture the repository will support. A new block is added for each supported release.
Origin: William Spinelli Label: William Spinelli Codename: intrepid Architectures: i386 amd64 source Components: main Description: QPitch APT Repository SignWith: yes
Populate the repository
$ export PKG_DIR=/var/cache/pbuilder/result/
$ reprepro --ask-passphrase -Vb . includedeb intrepid ${PKG_DIR}/qpitch*.deb
$ reprepro --ask-passphrase -Vb . includedsc intrepid ${PKG_DIR}/qpitch*.dsc
Upload the files to the Gna! dowload area
$ rsync --delete -avr --rsh="ssh" . wspinell@download.gna.org:/upload/qpitch/ubuntu
QPitch - Simple chromatic tuner