Contents of /branches/R11-unstable/include/kde4-split-2.sminc
Parent Directory | Revision Log
Revision 24893 -
(show annotations)
(download)
Tue Nov 25 02:21:44 2014 UTC (9 years, 11 months ago) by niro
File size: 3751 byte(s)
Tue Nov 25 02:21:44 2014 UTC (9 years, 11 months ago) by niro
File size: 3751 byte(s)
-release R11-unstable
1 | # $Id$ |
2 | |
3 | sminclude kde4 |
4 | |
5 | # generate a meta package |
6 | # 1=yes, 0=no |
7 | : ${KDE4_GENERATE_META_PACKAGE=1} |
8 | |
9 | # fake an empty src_install for split-packages |
10 | kde-split_src_install() { :; } |
11 | |
12 | kde4-split_src_install_wrapper() |
13 | { |
14 | local KDEMODULE="$1" |
15 | |
16 | # fix modulename kdesdk4-kate -> kate |
17 | [[ ${KDEMODULE/${SPLIT_PACKAGE_BASE}-/} != ${KDEMODULE} ]] && KDEMODULE="${KDEMODULE/${SPLIT_PACKAGE_BASE}-/}" |
18 | |
19 | cd ${BUILDDIR}/build |
20 | |
21 | # install the kde module |
22 | mmake -C ${KDEMODULE} DESTDIR=${BINDIR} ${KDE4_MAKE_OPTS} install || die |
23 | |
24 | # install docs |
25 | if [[ -d doc/${KDEMODULE} ]] |
26 | then |
27 | mmake -C doc/${KDEMODULE} DESTDIR=${BINDIR} ${KDE4_MAKE_OPTS} install || die |
28 | fi |
29 | |
30 | # move dbus service dirs to a proper location if KDEDIR != /usr |
31 | if [[ ${KDEDIR} != /usr ]] |
32 | then |
33 | if [[ -d ${BINDIR}/${KDEDIR}/share/dbus-1 ]] |
34 | then |
35 | echo -e "${COLYELLOW}Warning: using dbus hotfix, dbus locations should be fixed!${COLDEFAULT}" |
36 | minstalldir /usr/share || die |
37 | cp -R ${BINDIR}/${KDEDIR}/share/dbus-1 ${BINDIR}/usr/share/ || die |
38 | rm -r ${BINDIR}/${KDEDIR}/share/dbus-1 || die |
39 | fi |
40 | fi |
41 | # or if KDECONFDIR != /etc |
42 | if [[ ${KDECONFDIR} != /etc ]] |
43 | then |
44 | if [[ -d ${BINDIR}/${KDECONFDIR}/dbus-1 ]] |
45 | then |
46 | echo -e "${COLYELLOW}Warning: using dbus hotfix, dbus locations should be fixed!${COLDEFAULT}" |
47 | minstalldir /etc || die |
48 | cp -R ${BINDIR}/${KDECONFDIR}/dbus-1 ${BINDIR}/etc/ || die |
49 | rm -r ${BINDIR}/${KDECONFDIR}/dbus-1 || die |
50 | fi |
51 | fi |
52 | |
53 | cd ${SRCDIR} |
54 | local i |
55 | for i in ABOUT-NLS AUTHORS BUGS CHANGES ChangeLog COPYING \ |
56 | FAQ LICENSE NEWS README TODO |
57 | do |
58 | if [ -f ${SRCDIR}/${i} ] |
59 | then |
60 | minstalldocs ${i} || die |
61 | fi |
62 | done |
63 | } |
64 | |
65 | kde4-split_generate_split_info() |
66 | { |
67 | local subpackage |
68 | |
69 | # get all subpackages with the specified pcat |
70 | for subpackage in ${SPLIT_PACKAGES} |
71 | do |
72 | # exclude meta packages |
73 | [[ ${subpackage} = ${PNAME}-meta ]] && continue |
74 | |
75 | eval "kde4-split_split_info_${subpackage}() |
76 | { |
77 | DESCRIPTION=\"'${subpackage/${PNAME}-/}' from ${PNAME}.\" |
78 | DEPEND=\"== kde-base/kdelibs-${PVER} |
79 | == kde-base/kdepimlibs-${PVER} |
80 | == kde-base/kdebase-runtime-${PVER}\" |
81 | }" |
82 | export_inherits kde4-split split_info_${subpackage} |
83 | done |
84 | } |
85 | |
86 | kde4-split_generate_meta_package() |
87 | { |
88 | local subpackage |
89 | local export_depends |
90 | |
91 | # get all subpackages with the specified pcat |
92 | for subpackage in ${SPLIT_PACKAGES} |
93 | do |
94 | # we assume the pcat is always kde-base! |
95 | export_depends="${export_depends} |
96 | >= ${PCAT}/${subpackage}-${PVER}" |
97 | done |
98 | |
99 | eval "split_info_${PNAME}-meta() |
100 | { |
101 | DESCRIPTION=\"Meta package for ${PNAME}.\" |
102 | DEPEND=\"${export_depends}\" |
103 | PKGTYPE=\"virtual\" |
104 | |
105 | # drop everything we don't need in the meta package: |
106 | INHERITS="" |
107 | SPECIAL_VARS="" |
108 | SPECIAL_FUNCTIONS="" |
109 | SDEPEND="" |
110 | PROVIDE="" |
111 | unset -f preinstall |
112 | unset -f postinstall |
113 | unset -f preremove |
114 | unset -f postremove |
115 | }" |
116 | |
117 | export SPLIT_PACKAGES+=" ${PNAME}-meta" |
118 | } |
119 | |
120 | kde4-split_generate_src_install() |
121 | { |
122 | local subpackage |
123 | |
124 | # run kde4-split_src_install for all SPLIT_PACKAGES |
125 | for subpackage in ${SPLIT_PACKAGES} |
126 | do |
127 | # exclude meta packages |
128 | [[ ${subpackage} = ${PNAME}-meta ]] && continue |
129 | |
130 | # create function kde-split_src_install-${subpackage} |
131 | eval "kde4-split_src_install_${subpackage}(){ kde4-split_src_install_wrapper ${subpackage} || die; }" |
132 | |
133 | # export kde-split_src_install_${subpackage} as src_install_${subpackage} |
134 | export_inherits kde4-split src_install_${subpackage} |
135 | done |
136 | } |
137 | |
138 | # generate generic split_infos |
139 | kde4-split_generate_split_info |
140 | |
141 | # generate a meta package |
142 | # run this after kde-split_generate_split_info |
143 | # as we add the virtual meta package |
144 | [[ ${KDE4_GENERATE_META_PACKAGE} = 1 ]] && kde4-split_generate_meta_package |
145 | |
146 | # run kde4-split_src_install for all SPLIT_PACKAGES |
147 | kde4-split_generate_src_install |
148 | |
149 | # export empty src_install |
150 | export_inherits kde4-split src_install |