Annotation of /smage/branches/alx-0_7/include/alx.sminc
Parent Directory | Revision Log
Revision 1661 -
(hide annotations)
(download)
Sat Jan 22 23:14:38 2011 UTC (13 years, 8 months ago) by niro
Original Path: smage/branches/alx-0_6_0/include/alx.sminc
File size: 1959 byte(s)
Sat Jan 22 23:14:38 2011 UTC (13 years, 8 months ago) by niro
Original Path: smage/branches/alx-0_6_0/include/alx.sminc
File size: 1959 byte(s)
added includes
1 | niro | 1661 | # $Header: /alx-cvs/smage/include/alx.sminc,v 1.3 2006/04/03 20:04:47 niro Exp $ |
2 | # alx functions | ||
3 | |||
4 | # to build a stripped down package version | ||
5 | # you must call 'package_all_targets' in src_install(). | ||
6 | # be sure you have the strip-target-alx() function defined, | ||
7 | # get stuff stripped from the package. | ||
8 | # | ||
9 | # the dev version will be always build when including this file | ||
10 | # | ||
11 | # The only way to change the bevavior is to set ALX_PKGTYPE | ||
12 | # ALX_PKGTYPE=only-alx-dev -> means that *only* the alx-dev package gets build | ||
13 | # ALX_PKGTYPE=only-alx -> means that *only* the stripped alx package gets build | ||
14 | # | ||
15 | |||
16 | # all targets for alx | ||
17 | MAGE_TARGETS="alx_dev alx_livecd alx" | ||
18 | |||
19 | # overrides | ||
20 | [[ ${ALX_PKGTYPE} = only-alx-dev ]] && MAGE_TARGETS="alx_dev" | ||
21 | [[ ${ALX_PKGTYPE} = only-alx-livecd ]] && MAGE_TARGETS="alx_livecd" | ||
22 | [[ ${ALX_PKGTYPE} = only-alx ]] && MAGE_TARGETS="alx" | ||
23 | |||
24 | # dummy functions, should be overrided in smage | ||
25 | alx_dev_pkgbuild() { return 0; } | ||
26 | alx_livecd_pkgbuild() { return 0; } | ||
27 | alx_pkgbuild() { return 0; } | ||
28 | |||
29 | |||
30 | # checks if compilation should be against alx | ||
31 | target_alx_dev() | ||
32 | { | ||
33 | local i | ||
34 | |||
35 | if [ -n "${MAGE_TARGETS}" ] | ||
36 | then | ||
37 | for i in ${MAGE_TARGETS} | ||
38 | do | ||
39 | [[ ${i} = alx_dev ]] && return 0 | ||
40 | |||
41 | # alx-dev will always build when building target alx, | ||
42 | # so target alx ist also allowed to be alx-dev | ||
43 | [[ ${i} = alx ]] && return 0 | ||
44 | |||
45 | # same for alx_livecd | ||
46 | [[ ${i} = alx_livecd ]] && return 0 | ||
47 | done | ||
48 | fi | ||
49 | |||
50 | # nothing match, we are *not* on alx linux | ||
51 | return 1 | ||
52 | } | ||
53 | |||
54 | # check if compilation should be against stripped down alx for livecds | ||
55 | target_alx_livecd() | ||
56 | { | ||
57 | if [ -n "${MAGE_TARGETS}" ] | ||
58 | then | ||
59 | for i in ${MAGE_TARGETS} | ||
60 | do | ||
61 | [[ ${i} = alx_livecd ]] && return 0 | ||
62 | done | ||
63 | fi | ||
64 | |||
65 | # nothing match, we are *not* on alx linux | ||
66 | return 1 | ||
67 | } | ||
68 | |||
69 | # check if compilation should be against stripped down alx | ||
70 | target_alx() | ||
71 | { | ||
72 | if [ -n "${MAGE_TARGETS}" ] | ||
73 | then | ||
74 | for i in ${MAGE_TARGETS} | ||
75 | do | ||
76 | [[ ${i} = alx ]] && return 0 | ||
77 | done | ||
78 | fi | ||
79 | |||
80 | # nothing match, we are *not* on alx linux | ||
81 | return 1 | ||
82 | } |