pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: pkgsrc/games/cbzone



(adding tech-pkg; let's continue this discussion there)

On Sat, Mar 19, 2011 at 10:21:46PM +0900, OBATA Akio wrote:
 > > > * honor VARBASE for game score file.
 > > > * add user-destdir installation support
 > > > * take care score file for binary package
 > >
 > >If I haven't completely forgotten how my own changes work, that needs
 > >USE_GAMESGROUP=yes. And, having done that, it shouldn't need to add to
 > >BUILD_DEFS. (If the right stuff doesn't all get added to BUILD_DEFS,
 > >that should be fixed in the infrastructure.)
 > 
 > GAMES_USER, GAMES_GROUP and GAMEDATAMODE?

The current logic in mk/pkginstall/bsd.pkginstall.mk is:

.if (defined(USE_GAMESGROUP) && !empty(USE_GAMESGROUP:M[yY][eE][sS])) ||\
    (defined(SETGIDGAME) && !empty(SETGIDGAME:M[yY][eE][sS]))
PKG_GROUPS+=    ${GAMES_GROUP}
PKG_USERS+=     ${GAMES_USER}:${GAMES_GROUP}
.endif

If that isn't enough (and I guess it won't put GAMES_GROUP and such in
BUILD_DEFS after all) then things should be added to BUILD_DEFS there:

   GAMES_USER
   GAMES_GROUP
   GAMEMODE
   GAMEDIRMODE
   GAMEDATAMODE

should probably all go in.

 > pkglint(8) also should be fixed?

Probably.

 > >I'm wondering if there should also be a USE_GAMESDIR to automatically
 > >provide ${VARBASE}/games so every game doesn't need to make it
 > >manually.

Where in mk/ should this logic be put? Something like

.if (defined(USE_GAMESDIR) && !empty(USE_GAMESDIR:M[yY][eE][sS]))
GAMESDIR+=      ${VARBASE}/games
MAKE_DIRS+=     ${GAMESDIR}
.endif

It occurs to me that ${VARBASE}/games should not itself be
games-writable. Games that need a whole dir to scribble in should be
using a subdir.

bsd.pkginstall.mk line 399:

  # Note that GAMEDIR_PERMS should only be used when the game requires
  # write access to scribble in its directory; many games do not, in which
  # case REQD_DIRS instead of REQD_DIRS_PERMS can be used and GAMEDIR_PERMS
  # is not needed.

...also, for games that do need a whole directory, should that
directory be made with MAKE_DIRS or REQD_DIRS? The docs say REQD_DIRS,
because that's what it looked like when I wrote them a few months ago,
but I see now that it says "all directories listed in REQD_DIRS should
be under ${PREFIX}". Or should that comment be updated to say "under
${PREFIX} or ${VARBASE}"?

 > And I'm wondering if packages using ${PREFIX}/share as location of
 > score files should be changed to use ${VARBASE}/games.

Yes, they should.

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index