create a .deb Package from scripts or binaries

Posted by tdeutsch on Ask Ubuntu See other posts from Ask Ubuntu or by tdeutsch
Published on 2011-02-23T11:11:39Z Indexed on 2011/02/23 15:33 UTC
Read the original article Hit count: 279

Filed under:
|
|

I searched for a simple way to create .deb Packages for things which have no source code to compile (configs, shellscripts, proprietary software). This was quite a problem because most of the package tutorials are assuming you have a source tarball you want to compile. Then I've found this short tutorial (german).

Afterwards, I created a small script to create a simple repository. Like this:

rm /export/my-repository/repository/*
cd /home/tdeutsch/deb-pkg
for i in $(ls | grep my); do dpkg -b ./$i /export/my-repository/repository/$i.deb; done
cd /export/avanon-repository/repository
gpg --armor --export "My Package Signing Key" > PublicKey
apt-ftparchive packages ./ | gzip > Packages.gz
apt-ftparchive packages ./ > Packages
apt-ftparchive release ./ > /tmp/Release.tmp; mv /tmp/Release.tmp Release
gpg --output Release.gpg -ba Release

I added the key to the apt keyring and included the source like this:

deb http://my.default.com/my-repository/ ./

It looks like the repo itself is working well (I ran into some problems, to fix them I needed to add the Packages twice and make the temp-file workaround for the Release file). I also put some downloaded .deb into the repo, it looks like they are also working without problems. But my self created packages didn't... Wenn i do sudo apt-get update, they are causing errors like this:

E: Problem parsing dependency Depends
E: Error occurred while processing my-printerconf (NewVersion2)
E: Problem with MergeList /var/lib/apt/lists/my.default.com_my-repository_._Packages
E: The package lists or status file could not be parsed or opened.

Has anyone an idea what I did wrong?

© Ask Ubuntu or respective owner

Related posts about apt-get

Related posts about packaging