-
Notifications
You must be signed in to change notification settings - Fork 1
Building packages
This page details how to build and manage packages in the repo.
The packages are stored under a directory in the root of the folder called packages
(example). Under this directory should go the directories that are used for building the packages. Currently we are only building debian packages however this may change in the future.
WAIT!!! We have an automatic debianizer! You can go here to get the deb generated the last time something was commit/pushed to the Github repository (newest should be on top). Read on if you'd rather get your hands dirty though :D
The naming scheme for the folders are braincase_<version>-<revision>_<arch>
where:
- <version> - the version of braincase
- <revision> - the revision number or branch name
- <arch> - the architecture the package is for
debian
|-- DEBIAN
| `-- control
| `-- preinst # script run before installing
| `-- postinst # script run after installing
| `-- prerm # script run before removal
| `-- postrm # script run after removal
`-- usr
`-- local
`-- bin
`-- create-braincase-user
First we need to clone the repository and checkout the correct branch (in this case sprint2) and init the submodules.
git clone git://github.com/hamstar/Braincase.git
git fetch origin sprint2
git checkout sprint2
git submodule init
git submodule update
First we need to freshen the packages folder in packages/debian. We'll need to delete everything except for DEBIAN, then copy stuff from the main folder into it.
cd Braincase/packages/debian
rm -rf usr var etc
cd ../..
cp -Rf usr var etc packages/debian
This is the control file for braincase_0.1-sprint1_all:
Package: braincase
Version: 0.1
Section: misc
Priority: optional
Architecture: all
Essential: no
Depends: git, openssh-server, python2.6
Installed-Size: 16
Maintainer: James Skene <james.skene@aut.ac.nz>
Homepage: https://github.com/hamstar/Braincase
Description: A personal knowledge base system for expansion of the mind in a virtual space
Very early version of a personal knowledge base system. Emphasis is on automatic backups to external storage to protect the knowledge inside it.
The only thing that should need changing is Installed-Size, Depends and possibly Description.
Building is easy, just use dpkg --build debian
and it will generate a debian.deb
file. Just rename that to the naming standard for deb files (e.g. braincase_0.2-sprint1_all.deb
).
$ cd packages/
$ dpkg-deb --build debian
dpkg-deb: building package `braincase' in `debian.deb'.
Do a test install of the package and check that everything is working good.
dpkg -i debian.deb
If everything went well, then rename the package and commit it to the repository.
$ mv debian.deb braincase_0.4-sprint1_all.deb
$ git add braincase_0.4-sprint1_all.deb
$ gc -m '#221: built new package v0.4.1'
$ git tag v0.4.1
$ git push origin sprint1 --tags
The package manager should take care of the rest.
Commit the work done in the debian folder as well as the new package. This will allow us to track changes to the debian working directory over time and serve as a place from which to download packages.