Magellan Linux

Annotation of /smage/trunk/include/mcore-split.sminc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 58 - (hide annotations) (download)
Mon Jan 4 15:09:47 2010 UTC (14 years, 4 months ago) by niro
File size: 2505 byte(s)
-include mcore
1 niro 29 # $Id$
2     # mcore split packages
3    
4 niro 58 sminclude mcore cleanutils
5 niro 30
6 niro 29 # global split defines
7     : ${SPLIT_PACKAGES="${PNAME} ${PNAME}-dev"}
8    
9 niro 50 # some basics defines:
10 niro 46
11 niro 50 # zap in normal packages
12     MCORE_ZAPMOST_OPTS=""
13    
14     # delete from dev packages
15     MCORE_RM_OPTS="usr/$(mlibdir)/*.a
16     usr/$(mlibdir)/*.la
17     usr/share/doc
18     usr/share/info
19     usr/share/locale
20 niro 52 usr/share/man
21 niro 50 usr/include"
22    
23     # zap in normal packages
24     MCORE_DEV_ZAPMOST_OPTS=""
25    
26     # delete from dev packages
27     MCORE_DEV_RM_OPTS="$(mlibdir)/*.so
28     $(mlibdir)/*.so
29     usr/$(mlibdir)/*.so
30     usr/$(mlibdir)/*.so.*"
31    
32 niro 45 # mcore keeps
33 niro 47 if [[ ! -z ${MCORE_ONLY_KEEP} ]]
34 niro 45 then
35 niro 49 MCORE_ZAPMOST_OPTS+=" ${MCORE_ONLY_KEEP}"
36     MCORE_DEV_RM_OPTS+=" ${MCORE_ONLY_KEEP}"
37 niro 45 fi
38    
39 niro 46 # mcore dev keeps
40 niro 47 if [[ ! -z ${MCORE_DEV_ONLY_KEEP} ]]
41 niro 45 then
42 niro 49 MCORE_DEV_ZAPMOST_OPTS+=" ${MCORE_DEV_ONLY_KEEP}"
43     MCORE_RM_OPTS+=" ${MCORE_DEV_ONLY_KEEP}"
44 niro 45 fi
45    
46 niro 37 mcore-split_generate_split_info()
47     {
48     eval "split_info_${PNAME}()
49     {
50     DESCRIPTION=\"${DESCRIPTION}\"
51     DEPEND=\"${DEPEND}\"
52     }"
53     }
54    
55 niro 29 mcore-split_generate_split_info_dev()
56     {
57     eval "split_info_${PNAME}-dev()
58     {
59 niro 36 DESCRIPTION=\"Development files for ${PCATEGORIE}/${PNAME}-${PVER}-${PBUILD}.\"
60 niro 35 DEPEND=\"== ${PCATEGORIE}/${PNAME}-${PVER}\"
61 niro 29 }"
62     }
63    
64 niro 30 mcore-split_generate_src_install_dev()
65     {
66     eval "mcore-split_src_install_${PNAME}-dev()
67     {
68 niro 46 cd \${SRCDIR}
69 niro 55 if [[ ! -z \$(typeset mcore_generic_src_install) ]]
70     then
71     mcore_generic_src_install
72     else
73     mmake DESTDIR=\${BINDIR} install || die
74     fi
75 niro 44
76 niro 46 if [[ ! -z \${MCORE_DEV_RM_OPTS} ]]
77 niro 44 then
78     local i
79 niro 46 for i in \${MCORE_DEV_RM_OPTS}
80 niro 44 do
81 niro 53 if [[ -e \${BINDIR}/\${i} ]]
82 niro 44 then
83 niro 46 rm -r \${BINDIR}/\${i} || die
84 niro 44 fi
85     done
86     fi
87 niro 54
88     if [[ ! -z \${MCORE_DEV_ZAPMOST_OPTS} ]]
89     then
90     zapmost \${BINDIR} \${MCORE_DEV_ZAPMOST_OPTS} || die
91     fi
92 niro 30 }"
93     }
94    
95 niro 31 mcore-split_generate_src_install()
96     {
97     eval "mcore-split_src_install_${PNAME}()
98     {
99 niro 46 cd \${SRCDIR}
100 niro 55 if [[ ! -z \$(typeset mcore_generic_src_install) ]]
101     then
102     mcore_generic_src_install
103     else
104     mmake DESTDIR=\${BINDIR} install || die
105     fi
106 niro 31
107 niro 50 if [[ ! -z \${MCORE_RM_OPTS} ]]
108     then
109     local i
110     for i in \${MCORE_RM_OPTS}
111     do
112 niro 53 if [[ -e \${BINDIR}/\${i} ]]
113 niro 50 then
114     rm -r \${BINDIR}/\${i} || die
115     fi
116     done
117     fi
118 niro 44
119 niro 46 if [[ ! -z \${MCORE_ZAPMOST_OPTS} ]]
120 niro 44 then
121 niro 46 zapmost \${BINDIR} \${MCORE_ZAPMOST_OPTS} || die
122 niro 44 fi
123 niro 31 }"
124     }
125    
126 niro 39 mcore-split_generate_split_info
127 niro 29 mcore-split_generate_split_info_dev
128 niro 39
129 niro 30 mcore-split_generate_src_install_dev
130 niro 31 mcore-split_generate_src_install
131 niro 30
132 niro 31 export_inherits mcore-split src_install_${PNAME} src_install_${PNAME}-dev