6 |
# global split defines |
# global split defines |
7 |
: ${SPLIT_PACKAGES="${PNAME} ${PNAME}-dev"} |
: ${SPLIT_PACKAGES="${PNAME} ${PNAME}-dev"} |
8 |
|
|
9 |
|
# honor empty SDEPEND |
10 |
|
if [[ ! -z ${ALX_DEV_DEPEND} ]] && [[ -z ${SDEPEND} ]] |
11 |
|
then |
12 |
|
SDEPEND="${ALX_DEV_DEPEND}" |
13 |
|
fi |
14 |
|
|
15 |
# some basics defines: |
# some basics defines: |
16 |
|
|
17 |
# zap in normal packages |
# zap in normal packages |
26 |
usr/share/info |
usr/share/info |
27 |
usr/share/locale |
usr/share/locale |
28 |
usr/share/man |
usr/share/man |
29 |
usr/include |
usr/include" |
|
$(mlibdir)/*.so |
|
|
usr/$(mlibdir)/*.so |
|
|
$([[ $(mlibdir) != lib ]] && echo 'lib/*.so usr/lib/*.so')" |
|
30 |
|
|
31 |
# zap in normal packages |
# zap in dev packages |
32 |
ALX_DEV_ZAPMOST_OPTS="" |
ALX_DEV_ZAPMOST_OPTS="" |
33 |
|
|
34 |
# delete from dev packages |
# delete from dev packages |
35 |
ALX_DEV_RM_OPTS="$(mlibdir)/*.so.* |
ALX_DEV_RM_OPTS="" |
|
usr/$(mlibdir)/*.so.* |
|
|
$([[ $(mlibdir) != lib ]] && echo 'lib/*.so.* usr/lib/*.so.*')" |
|
36 |
|
|
37 |
# be backward compatible |
# be backward compatible |
38 |
if [[ ! -z ${ALX_ONLY_KEEP} ]] |
if [[ ! -z ${ALX_ONLY_KEEP} ]] |
55 |
then |
then |
56 |
ALX_ZAPMOST_OPTS+=" ${ALX_PKG_KEEP}" |
ALX_ZAPMOST_OPTS+=" ${ALX_PKG_KEEP}" |
57 |
ALX_DEV_RM_OPTS+=" ${ALX_PKG_KEEP}" |
ALX_DEV_RM_OPTS+=" ${ALX_PKG_KEEP}" |
58 |
|
else |
59 |
|
ALX_RM_OPTS+=" $(mlibdir)/*.so |
60 |
|
usr/$(mlibdir)/*.so |
61 |
|
$([[ $(mlibdir) != lib ]] && echo 'lib/*.so usr/lib/*.so')" |
62 |
fi |
fi |
63 |
|
|
64 |
# alx dev keeps |
# alx dev keeps |
66 |
then |
then |
67 |
ALX_DEV_ZAPMOST_OPTS+=" ${ALX_DEV_PKG_KEEP}" |
ALX_DEV_ZAPMOST_OPTS+=" ${ALX_DEV_PKG_KEEP}" |
68 |
ALX_RM_OPTS+=" ${ALX_DEV_PKG_KEEP}" |
ALX_RM_OPTS+=" ${ALX_DEV_PKG_KEEP}" |
69 |
|
else |
70 |
|
ALX_DEV_RM_OPTS+=" $(mlibdir)/*.so.* |
71 |
|
usr/$(mlibdir)/*.so.* |
72 |
|
$([[ $(mlibdir) != lib ]] && echo 'lib/*.so.* usr/lib/*.so.*')" |
73 |
fi |
fi |
74 |
|
|
75 |
alx-split_generate_split_info() |
alx-split_generate_split_info() |
78 |
{ |
{ |
79 |
DESCRIPTION=\"${DESCRIPTION}\" |
DESCRIPTION=\"${DESCRIPTION}\" |
80 |
DEPEND=\"${DEPEND}\" |
DEPEND=\"${DEPEND}\" |
81 |
|
if [[ ! -z \${ALX_DEPEND} ]] |
82 |
|
then |
83 |
|
DEPEND=\"\${DEPEND} |
84 |
|
\${ALX_DEPEND}\" |
85 |
|
fi |
86 |
_PNAME=\"${PNAME}\" |
_PNAME=\"${PNAME}\" |
87 |
}" |
}" |
88 |
} |
} |
93 |
{ |
{ |
94 |
DESCRIPTION=\"Development files for ${PCAT}/${PNAME}-${PVER}-${PBUILD}.\" |
DESCRIPTION=\"Development files for ${PCAT}/${PNAME}-${PVER}-${PBUILD}.\" |
95 |
DEPEND=\"== ${PCAT}/${PNAME}-${PVER}\" |
DEPEND=\"== ${PCAT}/${PNAME}-${PVER}\" |
96 |
|
if [[ ! -z \${ALX_DEV_DEPEND} ]] |
97 |
|
then |
98 |
|
DEPEND=\"\${DEPEND} |
99 |
|
\${ALX_DEV_DEPEND}\" |
100 |
|
fi |
101 |
_PNAME=\"${PNAME}\" |
_PNAME=\"${PNAME}\" |
102 |
}" |
}" |
103 |
} |
} |
104 |
|
|
105 |
|
# honor multilib builds |
106 |
|
if [[ ${MULTILIB_BUILD} = true ]] |
107 |
|
then |
108 |
|
if [[ ! -z $(typeset -f src_install) ]] |
109 |
|
then |
110 |
|
# rename the old one |
111 |
|
old_alx_src_install=old_alx_$(typeset -f src_install) |
112 |
|
eval "${old_alx_src_install}" |
113 |
|
|
114 |
|
alx_generic_src_install() |
115 |
|
{ |
116 |
|
old_alx_src_install || die |
117 |
|
} |
118 |
|
fi |
119 |
|
fi |
120 |
|
|
121 |
alx-split_generate_src_install_dev() |
alx-split_generate_src_install_dev() |
122 |
{ |
{ |
123 |
eval "alx-split_src_install_${PNAME}-dev() |
eval "alx-split_src_install_${PNAME}-dev() |
149 |
*\**|*\\\**) |
*\**|*\\\**) |
150 |
if [[ -e \${BINDIR}/\$(dirname \${i}) ]] |
if [[ -e \${BINDIR}/\$(dirname \${i}) ]] |
151 |
then |
then |
152 |
|
echo find \${BINDIR}/\$(dirname \${i}) -maxdepth 1 -name \"\$(basename \${i})\" | xargs --no-run-if-empty rm |
153 |
find \${BINDIR}/\$(dirname \${i}) -maxdepth 1 -name \"\$(basename \${i})\" | xargs --no-run-if-empty rm |
find \${BINDIR}/\$(dirname \${i}) -maxdepth 1 -name \"\$(basename \${i})\" | xargs --no-run-if-empty rm |
154 |
fi |
fi |
155 |
;; |
;; |
156 |
*) |
*) |
157 |
if [[ -e \${BINDIR}/\${i} ]] |
if [[ -e \${BINDIR}/\${i} ]] |
158 |
then |
then |
159 |
|
echo rm -r \${BINDIR}/\${i} |
160 |
|
rm -r \${BINDIR}/\${i} || die |
161 |
|
# busybox does not detect symlinks with -e if the reference does not exists |
162 |
|
elif [[ -L \${BINDIR}/\${i} ]] |
163 |
|
then |
164 |
|
echo rm -r \${BINDIR}/\${i} |
165 |
rm -r \${BINDIR}/\${i} || die |
rm -r \${BINDIR}/\${i} || die |
166 |
fi |
fi |
167 |
;; |
;; |
207 |
*\**|*\\\**) |
*\**|*\\\**) |
208 |
if [[ -e \${BINDIR}/\$(dirname \${i}) ]] |
if [[ -e \${BINDIR}/\$(dirname \${i}) ]] |
209 |
then |
then |
210 |
|
echo find \${BINDIR}/\$(dirname \${i}) -maxdepth 1 -name \"\$(basename \${i})\" | xargs --no-run-if-empty rm |
211 |
find \${BINDIR}/\$(dirname \${i}) -maxdepth 1 -name \"\$(basename \${i})\" | xargs --no-run-if-empty rm |
find \${BINDIR}/\$(dirname \${i}) -maxdepth 1 -name \"\$(basename \${i})\" | xargs --no-run-if-empty rm |
212 |
fi |
fi |
213 |
;; |
;; |
214 |
*) |
*) |
215 |
if [[ -e \${BINDIR}/\${i} ]] |
if [[ -e \${BINDIR}/\${i} ]] |
216 |
then |
then |
217 |
|
echo rm -r \${BINDIR}/\${i} |
218 |
|
rm -r \${BINDIR}/\${i} || die |
219 |
|
# busybox does not detect symlinks with -e if the reference does not exists |
220 |
|
elif [[ -L \${BINDIR}/\${i} ]] |
221 |
|
then |
222 |
|
echo rm -r \${BINDIR}/\${i} |
223 |
rm -r \${BINDIR}/\${i} || die |
rm -r \${BINDIR}/\${i} || die |
224 |
fi |
fi |
225 |
;; |
;; |