Skip to content

GOG PKGBUILD Standards

Joe Davison edited this page Sep 10, 2013 · 10 revisions

This document is in progress and a lot of it was written in retrospective. Some things may not be right. Don't trust it.

Arch Linux has its own set of packaging standards which these PKGBUILDs try very hard to meet up to as much as possible. However, due to, first and foremost, the inability to distribute the built packages we have to make some concessions and break standards.

And the thing about breaking standards is that you get to make your own! Just like that last sentence breaks the common English standard of how sentences should never start with the word 'and'. And establishes a new one wherein it's totally okay throughout this whole document to do that.

Package types

base packages (gogname-base) include only the game datafiles. That means a base package shouldn't really include anything to make the game run. Games which run totally natively don't require a base package. A base package is generally supplemented by a further package, like a dosbox or scummvm one (gogname-{scummvm,dosbox} and a metapackage which just depends on both (gogname).

What package do I choose?

If your GOG runs natively, for example it has its own binary or source port, you don't need a base package. You can just include the native binaries in the package itself. If your GOG has a utility like Adventure Game Studio to run, you will need a base package, but not a metapackage - the gogname package will depend on the base package and provide the launcher script.

So why have these weird package types?

The thing about GOG is that no one's happy. Some people want to play games in DOSBox even if it works better in ScummVM and some people would rather use Wine instead of native binaries. Games are broken up to enable people to do this. Further, it allows for some portability - it's theoretically possible to play some of these games on your Raspberry Pi and it'd be pretty dumb of us to stop you from installing the game datafiles.

Starting off

All packages should have the header # Part of the unofficial GOG.com PKGBUILD project: http://github.com/Tea23/arch-gog inserted. Follow this with # Maintainer: Your Name <[email protected]>'. If you modify a PKGBUILD, you should add # Contributor:` underneath the existing Maintainer line.

The parameter block of your package looks something like this: gogname=gemini_rue pkgname=gog-${_gogname}-native pkgver=1.0.0.4 pkgrel=1 pkgdesc="Gemini Rue from GOG.com, native launcher" arch=('any') url="http://www.gog.com" license=('custom:gog.com') depends=('adventuregamestudio-git' 'unionfs-fuse' "gog-${_gogname}-base") makedepends=('innoextract') options=(!strip) source=(${_gogname} ${_gogname}.png ${_gogname}.desktop) md5sums=('265c6144e61e8d65687532eb9eba5c19' 'fd2453a78a466cf96cda1fc4324b3607' 'c1db8024d6da35215ef48b959104e26f')

Clone this wiki locally