Create Notes on packaging authored by Chiara Marmo's avatar Chiara Marmo
#### First time procedure
The aravis repo already created on salsa (ssh or https)
```
$ git clone git@salsa.debian.org:debian-astro-team/aravis.git
```
or
```
$ git clone https://salsa.debian.org/debian-astro-team/aravis.git
```
then
```
$ wget https://github.com/AravisProject/aravis/archive/ARAVIS_0_5_10.tar.gz
$ mv ARAVIS_0_5_10.tar.gz aravis_0.5.10.orig.tar.gz
$ cd aravis
$ git checkout -b upstream
$ tar xf ../aravis_0.5.10.orig.tar.gz --strip-components=1
$ git add --all
$ git commit -m "Initial upstream version 0.5"
$ git tag upstream/0.5
$ pristine-tar commit ../aravis_0.5.10.orig.tar.gz
$ git checkout -b master
```
Create debian files
```
$ mkdir debian
$ echo 9 > debian/compat
$ mkdir debian/source
$ echo "3.0 (quilt)" > debian/source/format
$ dch --create --package aravis -v 0.5.6-1
$ mkdir debian/patches
```
After creation of `control`, `rules`, and `copyright`
```
$ git add debian/
$ git commit -m "Initial Debian files"
```
Building the package
```
$ sudo pbuilder update
$ sudo pdebuild
```
##### How to create and build patches with quilt
```
$ quilt new <patchname>.diff
$ quilt add <sourcefile>
```
Make your change to <sourcefile>
```
$ quilt refresh
$ quilt pop -a
```
Then apply your patch
```
$ quilt push -a
```
How to edit an existing patch
```
$ quilt push <patchname>.diff
```
Now edit then when finished
```
$ quilt refresh <patchname>.diff
$ quilt pop -a
```
##### Installation tested with
```
$ sudo dpgk -i /var/cache/pbuilder/result/aravis_0.5.10-1_amd64.deb
$ sudo dpkg -r aravis
```
##### Lintian hook
```
$ sudo mkdir /var/cache/pbuilder/hooks/
$ sudo cp /usr/share/doc/pbuilder/examples/B90lintian /var/cache/pbuilder/hooks/
```
`/root/.pbuilderrc` file contains
```
HOOKDIR=/var/cache/pbuilder/hooks/
```
##### To update to a new version:
```
$ wget https://github.com/AravisProject/aravis/archive/ARAVIS_0_5_11.tar.gz
$ mv ARAVIS_0_5_11.tar.gz aravis_0.5.11.orig.tar.gz
$ cd aravis
$ git checkout upstream
$ tar xf ../aravis_0.5.11.orig.tar.gz --strip-components=1
$ git add --all
$ git commit -m "Updating upstream version 0.5.11"
$ git tag upstream/0.5.11
$ pristine-tar commit ../aravis_0.5.11.orig.tar.gz
$ git checkout master
$ git merge upstream -m "Merged upstream version 0.5.11"
```
change the version in debian/changelog then push the master, pristine-tar, and upstream branches.
\ No newline at end of file