Contents of /branches/R11-stable/include/ggz.sminc
Parent Directory | Revision Log
Revision 17894 -
(show annotations)
(download)
Wed Jun 26 12:59:01 2013 UTC (11 years, 4 months ago) by niro
File size: 1628 byte(s)
Wed Jun 26 12:59:01 2013 UTC (11 years, 4 months ago) by niro
File size: 1628 byte(s)
-revert last changes
1 | # $Header: /magellan-cvs/smage/include/ggz.sminc,v 1.3 2008/03/31 21:51:32 niro Exp $ |
2 | # |
3 | # sminc for ggz-gaming-zone packages |
4 | # |
5 | |
6 | sminclude mbuild |
7 | |
8 | # some sane default values |
9 | : ${PCAT="dev-games"} |
10 | : ${SRCFILE="${PNAME}-${PVER}.tar.gz"} |
11 | : ${SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"} |
12 | : ${DESCRIPTION="The GGZ Gaming Zone - ${PNAME}"} |
13 | : ${HOMEPAGE="http://www.ggzgamingzone.org/"} |
14 | |
15 | # functions to include in the mage file |
16 | SPECIAL_FUNCTIONS="${SPECIAL_FUNCTIONS} ggz_update_modules ggz_postinstall ggz_postremove" |
17 | |
18 | SRC_URI=( |
19 | ${SRC_URI[*]} |
20 | http://ftp.belnet.be/packages/ggzgamingzone/ggz/${PVER}/${SRCFILE} |
21 | http://mirrors.dotsrc.org/ggzgamingzone/ggz/${PVER}/${SRCFILE} |
22 | http://mirrors.ibiblio.org/pub/mirrors/ggzgamingzone/ggz/${PVER}/${SRCFILE} |
23 | mirror://${PNAME}/${SRCFILE} |
24 | ) |
25 | |
26 | ggz_configure() |
27 | { |
28 | local configure_opts |
29 | |
30 | # add commandline given arguments |
31 | configure_opts="$@" |
32 | |
33 | mconfigure \ |
34 | --disable-dependency-tracking \ |
35 | --enable-noregistry=/usr/share/ggz/modules \ |
36 | --disable-debug \ |
37 | ${configure_opts} \ |
38 | || die |
39 | } |
40 | |
41 | ggz_src_compile() |
42 | { |
43 | cd ${SRCDIR} |
44 | |
45 | ggz_configure || die |
46 | mmake || die |
47 | } |
48 | |
49 | ggz_update_modules() |
50 | { |
51 | ggz-config -h &> /dev/null |
52 | |
53 | install -d ${MROOT}/etc |
54 | :> ${MROOT}/etc/ggz.modules |
55 | |
56 | if [[ -d ${MROOT}/usr/share/ggz/modules ]] |
57 | then |
58 | echo -ne "${COLBLUE} --- ${COLDEFAULT}" |
59 | echo "updating GGZ modules ..." |
60 | cd ${MROOT}/usr/share/ggz/modules |
61 | |
62 | local dsc |
63 | find . -type f -name '*.dsc' | while read dsc |
64 | do |
65 | DESTDIR=${MROOT} ggz-config -Dim "${dsc}" |
66 | done |
67 | fi |
68 | } |
69 | |
70 | ggz_postinstall() |
71 | { |
72 | ggz_update_modules |
73 | } |
74 | |
75 | ggz_postremove() |
76 | { |
77 | ggz_update_modules |
78 | } |
79 | |
80 | export_inherits ggz src_compile postinstall postremove |