Annotation of /trunk/include/games.sminc
Parent Directory | Revision Log
Revision 1931 -
(hide annotations)
(download)
Wed Jun 10 17:01:31 2009 UTC (15 years, 5 months ago) by niro
Original Path: trunk/core/include/games.sminc
File size: 1137 byte(s)
Wed Jun 10 17:01:31 2009 UTC (15 years, 5 months ago) by niro
Original Path: trunk/core/include/games.sminc
File size: 1137 byte(s)
-modernize
1 | niro | 1931 | # $Id$ |
2 | niro | 2 | |
3 | niro | 1931 | sminclude mtools |
4 | |||
5 | niro | 2 | # some sane defaults |
6 | [[ -z ${GAME_EXEC} ]] && GAME_EXEC="${PNAME}" | ||
7 | |||
8 | games_configure() | ||
9 | { | ||
10 | local configure_opts="$@" | ||
11 | |||
12 | mconfigure \ | ||
13 | --prefix=/usr/games/${PNAME} \ | ||
14 | --mandir=/usr/share/man \ | ||
15 | --infodir=/usr/share/info \ | ||
16 | --datadir=/usr/games/${PNAME}/share \ | ||
17 | ${configure_opts} \ | ||
18 | || die | ||
19 | } | ||
20 | |||
21 | games_src_prepare() | ||
22 | { | ||
23 | munpack ${SRCFILE} || die | ||
24 | } | ||
25 | |||
26 | games_src_compile() | ||
27 | { | ||
28 | cd ${SRCDIR} | ||
29 | games_configure || die | ||
30 | mmake || die | ||
31 | } | ||
32 | |||
33 | games_src_install() | ||
34 | { | ||
35 | cd ${SRCDIR} | ||
36 | |||
37 | # needed directories | ||
38 | niro | 1931 | minstalldir /usr/bin || die |
39 | niro | 2 | |
40 | mmake DESTDIR=${BINDIR} install || die | ||
41 | |||
42 | # symlink binary to /usr/bin | ||
43 | niro | 1931 | mlink ../games/${PNAME}/bin/${GAME_EXEC} /usr/bin/${GAME_EXEC} || die |
44 | niro | 2 | |
45 | # fix permissions | ||
46 | niro | 1931 | mchown root:games /usr/bin/${GAME_EXEC} || die |
47 | mchown -R root:games /usr/games/${PNAME} || die | ||
48 | mchmod 0754 /usr/bin/${GAME_EXEC} || die | ||
49 | mchmod 0754 /usr/games/${PNAME}/bin/${GAME_EXEC} || die | ||
50 | niro | 2 | |
51 | local i | ||
52 | for i in ABOUT-NLS AUTHORS BUGS CHANGES ChangeLog COPYING \ | ||
53 | FAQ LICENSE NEWS README TODO | ||
54 | do | ||
55 | if [ -f ${SRCDIR}/${i} ] | ||
56 | then | ||
57 | minstalldocs ${i} || die | ||
58 | fi | ||
59 | done | ||
60 | } | ||
61 | |||
62 | export_inherits games src_prepare src_compile src_install |