How to have a simple debian repository to offer your packages.
You probably have them already installed
- Python (I used 2.7).
- dpkg-scanpackages:
sudo apt-get install dpkg-dev
- gzip:
sudo apt-get install gzip
mkdir simple_debian_repo
cd simple_debian_repo
mkdir debian
cp my_awesome_thing.deb simple_debian_repo/debian
You'll need to do this every time you add/update a .deb
.
dpkg-scanpackages debian /dev/null | gzip -9c > debian/Packages.gz
You'll get an output similar to:
dpkg-scanpackages: warning: Packages in archive but missing from override file:
dpkg-scanpackages: warning: my_awesome_thing.deb
dpkg-scanpackages: info: Wrote 1 entries to output Packages file.
Any will do, for simplicity I used Python one.
python -m SimpleHTTPServer 8000
For testing in your own machine (for other machines just use your IP address).
echo "deb [trusted=yes] http://127.0.0.1:8000 debian/" > /etc/apt/sources.list
Note that the packages will be non authenticated, so if you want to stop having warnings you'll need to add the [trusted=yes]
Follow instructions in this gist.
Nice instructions in this stack overflow answer.