Re: Package a single binary.
On Mon, Feb 11, 2002 at 05:50:19PM -0700, Blake Barnett wrote:
> I've actually built quite a few packages for Debian. Just never a
> single binary. All the tools want a complete source-tree to do so.
A .deb is constructed using a script (debian/rules) that does this:
* Compile stuff, if appropriate.
* Copy stuff into a temporary directory, usually debian/tmp or
debian/<packagename>.
* Tar up the temporary directory and wrap it in a few other things to
produce a .deb.
The simple tools might be a little confused without a source tree, but
you really don't need anything complicated.
For example, I've attached a completely untested debian/rules script
which is about as simple as it gets (though not policy-compliant yet).
You'll need a debian/control file as well, but there really isn't much
magic involved.
--
Colin Watson [cjwatson@flatline.org.uk]
#!/usr/bin/make -f
build:
clean:
rm -rf *~ debian/tmp debian/*~ debian/files debian/substvars
binary-arch:
binary-indep:
install -d debian/tmp debian/tmp/DEBIAN debian/tmp/usr/bin
install -m 0644 myscript debian/tmp/usr/bin
dpkg-gencontrol -isp
chown -R root.root debian/tmp
chmod -R g-ws debian/tmp
dpkg --build debian/tmp
binary: binary-arch binary-indep
.PHONY: build clean binary-arch binary-indep binary
Reply to: