I worked out how to make simple debian packages by hand as described in a previous post.
Trying to build other software into packages is still rather difficult...
I found a really good, simple tutorial on how to use the debian tools to do this more easily at:
http://www.debian.org/doc/packaging-manuals/packaging-tutorial/packaging-tutorial.pdf.
A record of me trying to fathom out how to do a few nerdy things - hopefully this will help me remember how I made things work when I have forgotten...
Showing posts with label deb. Show all posts
Showing posts with label deb. Show all posts
Friday, 22 July 2011
Friday, 17 June 2011
Ubuntu packages and repositories
Creating Ubuntu (debian) packages always seems a bit fiddly....At the moment I can do it, so thought I'd better write down quickly how I did it.
Packages
Packages
- Create a directory and put the files you want to install into a directory tree under it (e.g. if you create a directory called [pkgname], files that you want in /usr/local/bin go in [pkgname]/usr/local/bin.
- Create a directory called [pkgname]/DEBIAN and put a file in it called 'control'. This can be as simple as:
Package: grahamstestdeb
Version: 001
Architecture: i386
Depends:
Maintainer: Graham Jones (grahamjones139@gmail.com)
Description: Test Debian Package
- Create a file called 'postinst' in DEBIAN. This will be executed when the package is installed. This can be
- #!/bin/sh
- echo "postinst works!!!!"
- Create the .deb package by doing
dpkg-deb --build [pkgname]
- Copy your new [pkgname].deb file into a new folder called repository.
- Run 'sudo dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz' in the repostitory directory.
- Upload the repository directory to your web server:
ncftpput -v -R -u maps3.org.uk -pftp.maps3.org.uk public_html/apt/ *
- Add the following to /etc/apt/sources.lst
deb http://apt.maps3.org.uk /
- Run sudo apt-get update
- Run sudo apt-cache search [pkgname] - should find your package.
- Run sudo apt-get install [pkgname] - should run your postinst script.
Subscribe to:
Posts (Atom)