Opened 9 years ago

Closed 8 years ago

#1543 closed task (fixed (in master))

Use standard configure variables

Reported by: magnate Owned by: noz
Milestone: 3.4.0 Keywords: unix build

Description (last modified by noz)

Back in 3.1.2 noz and I hacked around with the buildsystem and created --with-libpath, --with-configpath and --with-varpath so that I could build a Debian package with static data in /usr/share/angband, editable data in /etc/angband and runtime data in /var/games/angband - in accordance with Debian policy and the FHS.

Greater familiarity with configure and with Debian packaging tells me that these are unnecessary. configure already supports --datadir for "read-only arch-independent data" - so that's /usr/share/angband. It also supports --sysconfdir=/etc/angband and --localstatedir=/var/games/angband.

Ho hum.

Change History (5)

comment:1 Changed 9 years ago by noz

  • Description modified (diff)

Before using the above variables, I want to get the various combinations accurately set out:

Case 1) You want to run in the build dir, so you specify --with-no-install:
(this should become the default case, as it applies to people building for themselves - package maintainers can learn to use other options)

Everything in ./lib/

This case can also be used when building a tarball/zip for user-only local installation

Case 2a) Install using 'make install', using private save/score files:

By default, unless PREFIX is changed

  • Binary in /usr/local/bin
  • Config files in /usr/local/etc/angband (i.e. lib/edit, lib/pref)
  • Shared data in /usr/local/share/angband (i.e. lib/file, lib/help/, lib/info, lib/xtra)
  • Save and score files in ~/.angband/Angband on Linux

should they go in
Root\Documents and Settings\<user>\Angband on Windows?

and in an equivalent position on Macs?

Case 2b) Install using 'make install', using public (common) save/score files:

  • Binary in /usr/local/bin (setgid games)
  • Config files in /usr/local/etc/angband
  • Shared data in /usr/local/share/angband
  • Save and score files in /usr/local/var/games/angband

Case 3a) Package maintainer on Linux

  • Binary in /usr/games/
  • Config files in /etc/angband
  • Shared data in /usr/share/angband
  • Saves and scores in ~/.angband/Angband

I'm making the assumption that on an installed system, we've made the decision to stick with private score files

Case 3b) Package maintainer on Windows

Do we actually have/want an installer for Windows, or just provide a zip file for local installation?

Assuming we do or will in the future, then:

  • Binary in C:\Program Files\Angband
  • Config files in C:\Program Files\Angband
  • Shared data in C:\Program Files\Angband
  • Saves and scores in C:\Documents and Settings\<user>\Angband

Case 3c) Package maintainer on Mac

TBD (I don't know anything about expectations for Macs)

What's become clear in writing this out is that there are too many options!

comment:2 Changed 9 years ago by myshkin

Macs don't really have any tradition of make install, except under systems like fink or Macports, and they will typically put things into /opt/local or /usr/local (and not build a native application). I need to find out where private saves ought to go. Right now, the Carbon port uses $HOME/Library/Preferences/Angband/save/, and the Cocoa port uses $HOME/Documents/Angband/save/.

There isn't really a package maintainer on the Mac. The dist target of the Makefile creates a disk image (.dmg), suitable for distribution.

comment:3 Changed 9 years ago by magnate

  • Keywords unix,build added; unix removed
  • Owner set to noz
  • Status changed from new to assigned

comment:4 Changed 9 years ago by noz

So the configure invocations I'm proposing (leaving out the various port --enable-* options) are:

Case 1) ./configure --with-no-install (save files still go into ~/.angband/Angband/save)

Case 2a) ./configure

Case 2b) ./configure --with-setgid=games

Case 3a) ./configure --prefix=/usr --sysconfdir=/etc

Case 3b) ./configure --with-no-install (and unpack a zip file into one dir)

Case 3c) ./configure --with-no-install (and install a prepared .dmg)

I'm making the assumption that we don't want a 1b), where everything, including saves, are local to the source dir.

comment:5 Changed 8 years ago by magnate

  • Keywords unix build added; unix,build removed
  • Resolution set to fixed (in master)
  • Status changed from assigned to closed

[829c66c0bb] in both master and v4-master

Note: See TracTickets for help on using tickets.