Magellan Linux

Contents of /trunk/core/include/games.sminc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2 - (show annotations) (download)
Fri Oct 10 13:29:42 2008 UTC (15 years, 7 months ago) by niro
File size: 1251 byte(s)
import repo
1 # $Header: /magellan-cvs/smage/include/games.sminc,v 1.2 2007/04/24 23:14:05 niro Exp $
2
3 # some sane defaults
4 [[ -z ${GAME_EXEC} ]] && GAME_EXEC="${PNAME}"
5
6 games_configure()
7 {
8 local configure_opts="$@"
9
10 mconfigure \
11 --prefix=/usr/games/${PNAME} \
12 --mandir=/usr/share/man \
13 --infodir=/usr/share/info \
14 --datadir=/usr/games/${PNAME}/share \
15 ${configure_opts} \
16 || die
17 }
18
19 games_src_prepare()
20 {
21 munpack ${SRCFILE} || die
22 }
23
24 games_src_compile()
25 {
26 cd ${SRCDIR}
27 games_configure || die
28 mmake || die
29 }
30
31 games_src_install()
32 {
33 cd ${SRCDIR}
34
35 # needed directories
36 install -d ${BINDIR}/usr/bin || die
37
38 mmake DESTDIR=${BINDIR} install || die
39
40 # symlink binary to /usr/bin
41 ln -snf ../games/${PNAME}/bin/${GAME_EXEC} ${BINDIR}/usr/bin/${GAME_EXEC} || die
42
43 # fix permissions
44 chmod 0754 ${BINDIR}/usr/bin/${GAME_EXEC} || die
45 chmod 0754 ${BINDIR}/usr/games/${PNAME}/bin/${GAME_EXEC} || die
46 chown root:games ${BINDIR}/usr/bin/${GAME_EXEC} || die
47 chown -R root:games ${BINDIR}/usr/games/${PNAME} || die
48
49 local i
50 for i in ABOUT-NLS AUTHORS BUGS CHANGES ChangeLog COPYING \
51 FAQ LICENSE NEWS README TODO
52 do
53 if [ -f ${SRCDIR}/${i} ]
54 then
55 minstalldocs ${i} || die
56 fi
57 done
58 }
59
60 export_inherits games src_prepare src_compile src_install