How do I get debuild to put the binary in /usr/bin?

Posted by SammySP on Ask Ubuntu See other posts from Ask Ubuntu or by SammySP
Published on 2011-06-24T11:12:42Z Indexed on 2011/06/24 16:31 UTC
Read the original article Hit count: 168

Filed under:

I have been recently trying to package a small Python utility to put on my PPA and I've almost got it to work, but I'm having problems in making the package install the binary (a chmod +x Python script) under /usr/bin. Instead it installs under /. I have this directory structure -> http://db.tt/0KhIYQL.

My package Makefile is like so:

TARGET=usr/bin/txtrevise

make:
      chmod +x $(TARGET)

install:
      cp -r $(TARGET) $(DESTDIR)

I've used $(DESTDIR), as I understand it to place the file under the debian subdir when debuild is run.

I have the txtrevise script, my executable, under usr/bin folder under the root of my package. I also have the Makefile and usr/bin/textrevise in my tarball: txtrevise_1.1.original.tar.gz.

However when I build this and look inside of the Debian package, txtrevise is always at the root of the package instead of under usr/bin and will be installed to / instead of /usr/bin.

How can I get debuild to put the script in the right place?

Thanks. Any help would be greatly appreciated. I'm stumped.

© Ask Ubuntu or respective owner

Related posts about packaging