C.6. How to build a package with svn-buildpackage

Please refer to the svn-builpackage documentation for more complete information. Here is just a quick guide.

All options, except those starting on --svn, are passed to dpkg-buildpackage. Hence, basic usage should be something like this (from the trunk/packages/my_package/trunk directory): svn-buildpackage -rfakeroot -uc -us.

svn-buildpackage will complain when your copy of the debian directory is not in sync with the repository. You may use the option --svn-ignore-new to override this behaviour. The package will be build in the directory ../build-area.

If your package is ready for upload you may use the --svn-tag option for the final build. This will put a tag in the svn-repository on the current version, and add a new entry in the changlog to start working on the upcomming next version: svn-buildpackage --svn-tag. Provided you have commited all your changes to the svn repository, this will after a successful build of the package create a tag for the current version in tags/packages/my_package. The tagging is done directly in the SVN repository.

Tip

Some useful aliases taken from the svn-buildpackage HOWTO:


alias svn-b='svn-buildpackage -rfakeroot --svn-dont-clean -us -uc --svn-ignore'
alias svn-bt='svn-buildpackage -rfakeroot --svn-lintian --svn-dont-clean --svn-tag'
            

The former (svn-b) is to be used for test builds, while you are working on your package; while the latter (svn-bt) is to be used at the end, after you commit your changes and just before uploading a new version of the package to the debian archive.

Adding -k<your gpg id> to the svn-bt alias may also be useful when working on collaboratively maintained packages:


alias svn-bt='svn-buildpackage -rfakeroot -k<gpgid> --svn-lintian --svn-dont-clean --svn-tag'