/[gentoo-x86]/eclass/commonbox.eclass
Gentoo

Contents of /eclass/commonbox.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.33 - (show annotations) (download)
Mon Nov 30 04:19:36 2009 UTC (4 years, 9 months ago) by abcd
Branch: MAIN
CVS Tags: HEAD
Changes since 1.32: +1 -1 lines
FILE REMOVED
Remove eclasses that have been marked as deprecated for >=2 years; schedule other deprecated eclasses for removal

1 # Copyright 1999-2004 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/eclass/commonbox.eclass,v 1.32 2006/10/29 22:22:34 omp Exp $
4 #
5 # Author: Seemant Kulleen <seemant@gentoo.org>
6 #
7 # The commonbox eclass is designed to allow easier installation of the box
8 # window managers such as blackbox and fluxbox and commonbox
9 # The common utilities of those window managers get installed in the
10 # commonbox-utils dependency, and default styles with the commonbox-styles
11 # utility. They all share the /usr/share/commonbox directory now.
12 #
13 #
14 # THIS ECLASS IS DEPRECATED. PLEASE DO NOT USE IT.
15
16
17 EXPORT_FUNCTIONS src_compile src_install pkg_postinst
18
19 IUSE="nls kde gnome xinerama truetype"
20
21 DEPEND="dev-util/pkgconfig
22 =sys-apps/sed-4*"
23
24 RDEPEND="nls? ( sys-devel/gettext )
25 x11-themes/commonbox-styles"
26
27 PROVIDE="virtual/blackbox"
28
29 myconf=""
30 MYCONF=""
31 mydoc=""
32 BOOTSTRAP=""
33 FORCEXFT=""
34
35 if [ -z "${MYBIN}" ]
36 then
37 MYBIN="${PN}"
38 fi
39
40 commonprep() {
41
42 sed -i -e 's:data ::' ${S}/Makefile.am
43
44 sed -i -e 's:bsetbg::; s:bsetroot::' ${S}/util/Makefile.am
45
46 sed -i -e 's:bsetroot.1::; s:bsetbg.1::' ${S}/doc/Makefile.am
47
48 for i in `find ${S} -name 'Makefile.am'`
49 do
50 sed -i -e 's:$(pkgdatadir)/nls:/usr/share/locale:' ${i}
51 done
52
53 for i in `find ${S}/nls -name 'Makefile.am'`
54 do
55 sed -i -e "s:blackbox.cat:${MYBIN}.cat:g; s:${PN}.cat:${MYBIN}.cat:g" ${i}
56 done
57
58 for i in `find ${S}/src -name 'Makefile*'`
59 do
60 sed -i \
61 -e "s:/styles/Results:/styles/Fury-NG:" \
62 -e "s:/styles/mbdtex:/styles/Fury-NG:" \
63 -e "s:/styles/Clean:/styles/Fury-NG:" \
64 ${i}
65 done
66
67 }
68
69 commonbox_src_compile() {
70
71 commonprep
72
73 if [ -z "${BOOTSTRAP}" ]
74 then
75 aclocal
76 automake
77 autoconf
78 else
79 ./bootstrap
80 fi
81
82 use nls \
83 && myconf="${myconf} --enable-nls" \
84 || myconf="${myconf} --disable-nls"
85
86 use kde \
87 && myconf="${myconf} --enable-kde" \
88 || myconf="${myconf} --disable-kde"
89
90 use gnome \
91 && myconf="${myconf} --enable-gnome" \
92 || myconf="${myconf} --disable-gnome"
93
94 use xinerama \
95 && myconf="${myconf} --enable-xinerama" \
96 || myconf="${myconf} --disable-xinerama"
97
98 use truetype \
99 && myconf="${myconf} --enable-xft" \
100 || myconf="${myconf} --disable-xft"
101
102 if [ -z "${MYCONF}" ]
103 then
104 econf \
105 --sysconfdir=/etc/X11/${MYBIN} \
106 --datadir=/usr/share/commonbox \
107 ${myconf} || die
108 else
109 econf \
110 --sysconfdir=/etc/X11/${MYBIN} \
111 --datadir=/usr/share/commonbox \
112 ${myconf} ${MYCONF} || die
113 fi
114
115 [ ! -z "${FORCEXFT}" ] && echo "#define XFT 1" >> ${S}/config.h
116
117 emake \
118 pkgdatadir=/usr/share/commonbox || die
119
120 }
121
122
123 commonbox_src_install() {
124
125 dodir /usr/share/commonbox/${PN}
126
127 make DESTDIR=${D} install || die
128
129 # move the ${PN} binary to ${MYBIN}
130
131 if [ "${MYBIN}" != "${PN}" ]
132 then
133 mv ${D}/usr/bin/${PN} ${D}/usr/bin/${MYBIN}
134
135 # same to manpage
136 rm ${D}/usr/share/man/man1/${PN}.1
137 mv doc/${PN}.1 doc/${MYBIN}.1
138 doman doc/${MYBIN}.1
139 fi
140
141 dodoc README* AUTHORS TODO* ${mydoc}
142
143 # move nls stuff
144 use nls && ( \
145 dodir /usr/share/commonbox/${MYBIN}
146 mv ${D}/usr/share/${PN}/nls ${D}/usr/share/commonbox/${MYBIN}
147 )
148
149 rmdir ${D}/usr/share/${MYBIN}
150
151 dodir /etc/X11/Sessions
152 echo "/usr/bin/${MYBIN}" > ${D}/etc/X11/Sessions/${MYBIN}
153 fperms a+x /etc/X11/Sessions/${MYBIN}
154 }
155
156 commonbox_pkg_postinst() {
157 #notify user about the new share dir
158 if [ -d /usr/share/commonbox ]
159 then
160 einfo
161 einfo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
162 einfo "! ${MYBIN} no longer uses /usr/share/${MYBIN} as the !"
163 einfo "! default share directory to contain styles and menus. !"
164 einfo "! The default directory is now /usr/share/commonbox !"
165 einfo "! Please move any files in /usr/share/${MYBIN} that you !"
166 einfo "! wish to keep (personal styles and your menu) into the !"
167 einfo "! new directory and modify your menu files to point all !"
168 einfo "! listed paths to the new directory. !"
169 einfo "! Also, be sure to update the paths in each user's !"
170 einfo "! config file found in their home directory. !"
171 einfo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
172 einfo
173 fi
174
175 commonbox-menugen -kg
176 }

  ViewVC Help
Powered by ViewVC 1.1.20