Tomek Wyderka
Tomek Wyderka

Reputation: 1465

deb package for new software for ubuntu

I want to build mysoftware.deb package for ubuntu and debian.

Every tutorial about building deb files is for maintaining not your own software, just for making deb files for ready source code. In my case I want to have building and installing software together with building deb package in one Makefile. So I can:

make
make install
make deb

How to write that makefile? I'm assuming I have debian/* files ready and under my version control system.

Very mysterious to me is creating that mysoftware.orig.tar.gz and uncompressing it back so I can invoke debuild inside that folder. !?!?....

Does anybody have some short and accurate documentation?

Upvotes: 0

Views: 441

Answers (1)

tripleee
tripleee

Reputation: 189387

If you already have a debian/rules file and just want to create a simple target to create your Debian package from your main Makefile, you could do something like this:

.PHONY: deb
deb:
        # maybe invoke dch here to add a new entry to debian/Changelog ...
        debuild -us -uc -rfakeroot -b

Just make sure this is not your default target (assuming your debian/rules invokes the main Makefile, as it usually does).


With dh-make you can create a simple "native" package, which means there is no upstream.

debian$ dh_make --native --other-options ...

I agree that the upstream assumption is kind of distracting. On the other hand, making a native package is so simple you hardly need much of a tutorial.

Upvotes: 1

Related Questions