How to make Debian/Ubuntu packages?

Other talk that doesn't fit elsewhere.
This is for General Discussion, not General chat.
User avatar
noccy
Trained
Trained
Posts: 45
Joined: 01 Aug 2010, 22:21
Location: Karlstad, Sweden

Re: Vote on the new textures!

Post by noccy »

Can someone point me to information on building .deb packages? If so, I could give it a shot building for Ubuntu 10.04 (installing to /opt/) :)
noccy.com | xmpp: noccy(at)chillat.net | xfire: noccy80
User avatar
JDW
Regular
Regular
Posts: 1669
Joined: 18 May 2010, 20:44

How to make Debian/Ubuntu packages?

Post by JDW »

noccy wrote:Can someone point me to information on building .deb packages? If so, I could give it a shot building for Ubuntu 10.04 (installing to /opt/) :)
How To Create A .DEB Package [Ubuntu / Debian]

or

How to create a Debian/Ubuntu package (.deb) manually

or

Try this for more info

Good luck :)
"Speak when you are angry and you will make the best speech you will ever regret."
-- Ambrose Bierce
User avatar
noccy
Trained
Trained
Posts: 45
Joined: 01 Aug 2010, 22:21
Location: Karlstad, Sweden

Re: Vote on the new textures!

Post by noccy »

j0shdrunk0nwar wrote:
noccy wrote:Can someone point me to information on building .deb packages? If so, I could give it a shot building for Ubuntu 10.04 (installing to /opt/) :)
<snip>
Good luck :)
Woah, I had no idea building debian packages was that much of a challenge. Not giving up, but I can't for the love of life figure out how to pass a specific --prefix to the configure script. Even if I configure initially, dpkg reconfigures it and it slides into the default location. Let me see if I can add the dependencies to a checkinstall package - at least that's better than nothing :)
noccy.com | xmpp: noccy(at)chillat.net | xfire: noccy80
User avatar
JDW
Regular
Regular
Posts: 1669
Joined: 18 May 2010, 20:44

Re: Vote on the new textures!

Post by JDW »

noccy wrote: how to pass a specific --prefix to the configure script.
Maybe this info could help :hmm:
https://projects.coin-or.org/BuildTools ... -configure
http://www.gnu.org/prep/standards/html_ ... ation.html
"Speak when you are angry and you will make the best speech you will ever regret."
-- Ambrose Bierce
User avatar
noccy
Trained
Trained
Posts: 45
Joined: 01 Aug 2010, 22:21
Location: Karlstad, Sweden

Re: Vote on the new textures!

Post by noccy »

j0shdrunk0nwar wrote:
noccy wrote: how to pass a specific --prefix to the configure script.
Maybe this info could help :hmm:
https://projects.coin-or.org/BuildTools ... -configure
http://www.gnu.org/prep/standards/html_ ... ation.html
Good find but none of those does it :( Making sure the trunk builds end up in /opt/wz2100-trunk when I build from SVN normally isn't harder than doing

Code: Select all

./configure --prefix=/opt/wz2100-trunk
But when invoking the Debian package management tools it goes off and does some black magick, and then comes back and performs a clean ./configure without any parameters before starting to build the project which voids any previous configuration.

What I'm looking for is a way to tell the dpkg toolchain what parameters to pass to configure before building, and I'm sure there is a way to do this. When I build stuff for myself I use checkinstall that creates "lite" .deb packages with nothing but the actual files installed by the makefile's install action. That allows me to completely remove the package afterwards. However, as it doesn't point to any dependencies, it probably won't do anything but blow up.

Will keep on looking :)


edit: Could someone with a Debian/Ubuntu box please grab a copy of the latest build from here. It is built by Hudson on a Ubuntu 9.04 box so please report back if it works or fails. Just unpack it and move it to /opt, then open up warzone from /opt/wz2100-trunk/bin/warzone2100. If that works it's a good start :)
noccy.com | xmpp: noccy(at)chillat.net | xfire: noccy80
cybersphinx
Inactive
Inactive
Posts: 1695
Joined: 01 Sep 2006, 19:17

Re: How to make Debian/Ubuntu packages?

Post by cybersphinx »

2.3 has working Debian packaging in pkg/dpkg, I haven't ported that to trunk yet. Though why would you want to install to /opt in a package? Isn't the point of having packages that you can install things in /usr, and get rid of them again easily?
User avatar
noccy
Trained
Trained
Posts: 45
Joined: 01 Aug 2010, 22:21
Location: Karlstad, Sweden

Re: How to make Debian/Ubuntu packages?

Post by noccy »

That was in order for the testing of the textures in the topic (viewtopic.php?f=3&t=6101) to allow for multiple installations on the same box. Not really sure how I would split a "live" /usr package up, which is why I drop apps for testing into /opt/ :) That way they get a folder of their own and won't collide with anything else.

I have indeed noticed the pkg/dpkg folder, but as I haven't found any other notes about it I thought it was a relic or something :)

As you seem to have way more knowledge about distribution and so, a few quick questions;

1. how would you distribute test builds like this for Debian/Ubuntu platforms?
2. what toolchain is used for the pkg/dpkg building, and what does the trunk lack here?
noccy.com | xmpp: noccy(at)chillat.net | xfire: noccy80
cybersphinx
Inactive
Inactive
Posts: 1695
Joined: 01 Sep 2006, 19:17

Re: How to make Debian/Ubuntu packages?

Post by cybersphinx »

noccy wrote: 1. how would you distribute test builds like this for Debian/Ubuntu platforms?
Well, the most flexible way is surely the source tarball, with a "./configure --prefix=/opt/wz-trunk-texture-test && make && make install" you'll have the game in a custom folder, from which you can run it. You don't have to worry about too new/old dependencies compared to the system the package was built on, you just need one file for 32 and 64 bit... I guess a package is a bit easier to install though, when it works.

For 2.3.2/2.3.3, there are 64 bit .debs for download, with only a handful of downloads (though that is probably due to our new download page which can only list the tarball for Linux... still, not sure if I'll continue doing them).
2. what toolchain is used for the pkg/dpkg building, and what does the trunk lack here?
Toolchain? Whatever the distro includes? The difference between 2.3 and trunk is that trunk's scripts weren't touched for ages, not sure if they work. Maybe just using the files from 2.3 works, haven't looked into it yet.
User avatar
noccy
Trained
Trained
Posts: 45
Joined: 01 Aug 2010, 22:21
Location: Karlstad, Sweden

Re: How to make Debian/Ubuntu packages?

Post by noccy »

cybersphinx wrote:
noccy wrote:2. what toolchain is used for the pkg/dpkg building, and what does the trunk lack here?
Toolchain? Whatever the distro includes? The difference between 2.3 and trunk is that trunk's scripts weren't touched for ages, not sure if they work. Maybe just using the files from 2.3 works, haven't looked into it yet.
I ment as for invocation :) How would I build a .deb using those files? Using dpkg-deb? :)
noccy.com | xmpp: noccy(at)chillat.net | xfire: noccy80
cybersphinx
Inactive
Inactive
Posts: 1695
Joined: 01 Sep 2006, 19:17

Re: How to make Debian/Ubuntu packages?

Post by cybersphinx »

noccy wrote:I ment as for invocation :) How would I build a .deb using those files? Using dpkg-deb? :)
Not sure about dpkg-dev, I always use dpkg-buildpackage. I've added a section to the compile guide about this now (after rewriting the whole thing, and fixing the scripts in trunk):
http://developer.wz2100.net/wiki/LinuxC ... tuPackages
User avatar
noccy
Trained
Trained
Posts: 45
Joined: 01 Aug 2010, 22:21
Location: Karlstad, Sweden

Re: How to make Debian/Ubuntu packages?

Post by noccy »

Using your instructions and with a little help from google I managed to get a repository up and running. I've added 2.3.4 and the builds are for lucid (10.04).

The pubkey is available here. Download it and import it with:

Code: Select all

sudo apt-key add [email protected]
Adding the repository is done with this line in the sources.list file or by creating noccy.list in the sources.list.d directory:

Code: Select all

deb http://files.noccy.com/ubuntu lucid main
Perhaps you could add a sticky post somewhere with this information :)

edit: hope I'm not stepping on any toes here :) Just trying to help out in any way I can, and from what I can see there are no official .debs
noccy.com | xmpp: noccy(at)chillat.net | xfire: noccy80