|How to make your custom debian packages apt-gettable|
You don't need apt-ftparchive (1) or debarchiver (1) (which are not available on a potato system) to make your custom package apt-gettable.
apt-get (8) needs package overview files Packages.gz (for binary packages) and Sources.gz (for source package). To create them, use dpkg-scanpackages (8) (for Packages.gz) and dpkg-scansources (8) (for Sources.gz).
You need the following files to create them:
the binary packages (.deb)
the source packages (.orig.tar.gz, .diff.gz and .dsc)
the override file (optional), which is described below
dpkg-scanpackages needs the override file. It is a text file for overriding the Priority: and Section: fields of the control file. It has the following format (one line for one package):
<package> <priority> <section> [<maintainerinfo>]
If you don't care the Priority: and Section: fields, you can use /dev/null as the override file. Run dpkg-scanpackages in this way:
$ dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz
For source packages, use dpkg-scansources instead.
$ dpkg-scansources . /dev/null | gzip -9c > Sources.gz
Upload the packages, the files Packages.gz and Sources.gz in the same directory of your web server, say, http://your.web.server/debian-custom/ .
In the above example, the "apt lines" (the lines for /etc/apt/sources.list) are:
deb http://your.web.server/debian-custom/ ./ deb-src http://your.web.server/debian-custom/ ./
I back-ported the packages debarchiver (a tool to sort debian packages and make them apt-gettable) and opalmod (debarchiver needs it) to a potato system. I wanted to make them apt-gettable.
First I put the packages and their sources to a new directory.
$ ls debarchiver_0.0.12potato1.dsc opalmod_0.1.4-1potato1.dsc debarchiver_0.0.12potato1.tar.gz opalmod_0.1.4-1potato1.tar.gz debarchiver_0.0.12potato1_all.deb opalmod_0.1.4-1potato1_all.deb
I cared the Priority: and Section: fields, so I wrote a override file "override.txt"
# dpkg-scanpackages override file debarchiver optional devel opalmod optional devel
I could run dpkg-scanpackages and dpkg-scansources manually, but I wrote a makefile for easier maintenance instead.
all: Packages.gz Sources.gz Packages.gz: override.txt dpkg-scanpackages . override.txt | gzip -9c > Packages.gz Sources.gz: override.txt dpkg-scansources . override.txt | gzip -9c > Sources.gz .PHONY: clean clean: -rm -f Packages.gz Sources.gz
Then I ran make (1) to create package overview files.
$ ls Makefile opalmod_0.1.4-1potato1.dsc debarchiver_0.0.12potato1.dsc opalmod_0.1.4-1potato1.tar.gz debarchiver_0.0.12potato1.tar.gz opalmod_0.1.4-1potato1_all.deb debarchiver_0.0.12potato1_all.deb override.txt $ make dpkg-scanpackages . override.txt | gzip -9c > Packages.gz Wrote 2 entries to output Packages file. dpkg-scansources . override.txt | gzip -9c > Sources.gz $ ls Makefile debarchiver_0.0.12potato1_all.deb Packages.gz opalmod_0.1.4-1potato1.dsc Sources.gz opalmod_0.1.4-1potato1.tar.gz debarchiver_0.0.12potato1.dsc opalmod_0.1.4-1potato1_all.deb debarchiver_0.0.12potato1.tar.gz override.txt
I uploaded all of those files except Makefile and override.txt to http://www.interq.or.jp/libra/oohara/debian-unofficial/. Now you can download them with apt-get (8) if you add these lines to your /etc/apt/sources.list :
deb http://www.interq.or.jp/libra/oohara/debian-unofficial/ ./ deb-src http://www.interq.or.jp/libra/oohara/debian-unofficial/ ./