Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I know, this has already been asked a few times, but it doesn't seem to cover my case yet.

I'm trying to package a Mono-application to run from /opt.

First, I tried these guides:

But they don't seem to do the job.

The problem I see is that dh_make doesn't seem to like building packages that are installed in /opt. It always applies its own prefix to the path (/usr/) and puts the files in the usual directorys (bin/share/lib). But what I want is a flat layout just as I have it usually when building directly with MonoDevelop.

How can I do that with dh_make? do I have to create the debian/rules file manually to force installation to /opt?

share|improve this question
up vote 1 down vote accepted

The packaging produced by dh_make should just be considered a starting point. In all but the most straight forward cases, you'll need to edit some of the files. In order to install to /opt, you'll need to set an install prefix. Assuming that you are using an autotools build system, your debian/rules file might look like:

#!/usr/bin/make -f

    dh $@ --with cli

    dh_auto_configure -- --prefix=/opt/my_program
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.