summaryrefslogtreecommitdiff
blob: 7335fce169d9a4999d7c1098b31da2ba20b7af4e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
.TH "GAMES.ECLASS" "5" "Jun 2003" "Portage 2.0.51" "portage"
.SH "NAME"
games.eclass \- standardize the install of all games
.SH "DESCRIPTION"
The \fBgames\fR eclass is used to centrally control how all games
will be emerged onto systems.  Here we basically control the filesystem
locations and the ownership of all files.  If you want to change an
aspect of how your games are installed, then just edit the \fBgames\fR
eclass ! :)
.SH "VARIABLES"
.TP
.B "GAMES_PREFIX" = \fI"/usr/games"\fR
The prefix that the game will be installed under.
.TP
.B "GAMES_PREFIX_OPT" = \fI"/opt"\fR
The prefix that the game will be installed under if it is a binary distribution.
.TP
.B "GAMES_DATADIR" = \fI"/usr/share/games"\fR
The prefix for installing shared data files.
.TP
.B "GAMES_DATADIR_BASE" = \fI"/usr/share"\fR
Same as above, but some games auto append '/games/' to the datadir path.
.TP
.B "GAMES_SYSCONFDIR" = \fI"/etc/games"\fR
The location where games will save their configuration files.
.TP
.B "GAMES_STATEDIR" = \fI"/var/games"\fR
The location where games will save their state in behind runs.  This
includes things like highscore files.  If a game creates more than
one file, have it save all files inside \fB${GAMES_STATEDIR}/${PN}\fR.  
Otherwise, just create the single file in \fB${GAMES_STATEDIR}/\fR.  
Again, try to use a package specific name for the file if you are
creating it directly in the statedir.
.TP
.B "GAMES_LIBDIR" = \fI"/usr/games/lib"\fR
The location where games will store their libraries.
.TP
.B "GAMES_BINDIR" = \fI"/usr/games/bin"\fR
The location where the games will store/link their executables.  Putting
game binaries here helps to cut down on the $PATH bloat.
.TP
.B "GAMES_ENVD" = \fI"90games"\fR
The filename that the env.d entry will use.
.TP
.B "GAMES_USER" = \fI"games"\fR
The user that will own all game related files.
.TP
.B "GAMES_GROUP" = \fI"games"\fR
The group that will own all game related files.
.SH "FUNCTIONS: general"
.TP
.B "prepgamesdirs" \fI[directories]\fR
This will change ownership on all files/directories found inside of
the \fBGAMES_*\fR variables and any extra directories specified as
parameters.  It will change the permissions on all directories to
750 (u+rwx,g+rx-w,u-rwx) and change the permissions of all files
with a mask of g+r,o-rwx.
.br
\fB*NOTE\fR: This should *always* be the last thing called in the
\fBsrc_install\fR function.  If portage allowed for hookable calls then
this would be hooked to the end of \fBsrc_install\fR, but until that
happens, make sure to call!
.TP
.B games_pkg_setup
This will automagically add \fBGAMES_USER\fR and \fBGAMES_GROUP\fR to
your system.  If you define \fBpkg_setup\fR in your ebuild, then make
sure to call this function at the end of the function.
.TP
.B games_pkg_postinst
This will automagically generate the \fBGAMES_ENVD\fR file and display
a little message about being in the \fBGAMES_GROUP\fR in order to play
a game.  If you define \fBpkg_postinst\fR in your ebuild, then make
sure to call this function at the end of the function.
.SH "FUNCTIONS: compile"
.TP
.B egamesconf
The same as \fBeconf\fR except this passes all the game related variables
(see above).  For more info on \fBeconf\fR see \fBebuild\fR(5).
.SH "FUNCTIONS: install"
.TP
.B egamesinstall
The same as \fBeinstall\fR except this passes all the game related variables
(see above).  For more info on \fBeinstall\fR see \fBebuild\fR(5).
.TP
.B dogamesbin dogamessbin
The same as \fBdobin\fR and \fBdosbin\fR respectively except these will
install binaries into \fBGAMES_PREFIX\fR.  For more info see \fBebuild\fR(5).
.TP
.B dogameslib dogameslib.a dogameslib.so
The same as \fBdolib\fR, \fBdolib.a\fR, and \fBdolib.so\fR respectively
except these will install binaries into \fBGAMES_PREFIX\fR.  For more info
see \fBebuild\fR(5).
.TP
.B newgamesbin newgamessbin
The same as \fBnewbin\fR and \fBnewsbin\fR respectively except these will
install binaries into \fBGAMES_PREFIX\fR.  For more info see \fBebuild\fR(5).
.TP
.B gamesowners \fI<files/directories>\fR
\fBgamesowners\fR will change the user and group ownership to \fBGAMES_USER\fR
and \fBGAMES_GROUP\fR respectively.
.TP
.B gamesperms \fI<files/directories>\fR
\fBgamesperms\fR will change the permissions with a mask of u+rw,g+r-w,o-rwx.
.TP
.B games_make_wrapper \fI<wrapper>\fR \fI<bin>\fR \fI<chdir>\fR
Create a small wrapper script.  Useful when dealing with packages that need to 
change directory to the base of their data tree before running.  This will create 
a wrapper script called \fIwrapper\fR that will chdir to \fIchdir\fR before 
executing \fIbin\fR.  The \fIwrapper\fR will be placed in \fBGAMES_BINDIR\fR.
.SH "REPORTING BUGS"
Please report bugs via http://bugs.gentoo.org/
.SH "SEE ALSO"
.BR ebuild (5)
.SH "FILES"
.BR /usr/portage/eclass/games.eclass
.SH "AUTHORS"
Mike Frysinger <vapier@gentoo.org>
.SH "CVS HEADER"
$Header: /var/cvsroot/gentoo-src/portage/man/games.eclass.5,v 1.7.2.1 2005/01/15 00:19:36 vapier Exp $