diff options
author | Seemant Kulleen <seemant@gentoo.org> | 2002-07-14 21:39:03 +0000 |
---|---|---|
committer | Seemant Kulleen <seemant@gentoo.org> | 2002-07-14 21:39:03 +0000 |
commit | 6ef38edb4104e027d33fc91454048bedc36d0c7c (patch) | |
tree | 22418dbc919646d330548c1afe395caac2e9605d /eclass/commonbox.eclass | |
parent | unmask powertweak (diff) | |
download | gentoo-2-6ef38edb4104e027d33fc91454048bedc36d0c7c.tar.gz gentoo-2-6ef38edb4104e027d33fc91454048bedc36d0c7c.tar.bz2 gentoo-2-6ef38edb4104e027d33fc91454048bedc36d0c7c.zip |
added commonbox eclass for all the box wm's
Diffstat (limited to 'eclass/commonbox.eclass')
-rw-r--r-- | eclass/commonbox.eclass | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/eclass/commonbox.eclass b/eclass/commonbox.eclass new file mode 100644 index 000000000000..0fdcd5cb583b --- /dev/null +++ b/eclass/commonbox.eclass @@ -0,0 +1,90 @@ +# Copyright 2002 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 +# Author: Seemant Kulleen <seemant@gentoo.org> +# $Header: /var/cvsroot/gentoo-x86/eclass/commonbox.eclass,v 1.1 2002/07/14 21:39:03 seemant Exp $ + +# The commonbox eclass is designed to allow easier installation of the box +# window managers such as blackbox and fluxbox and commonbox +# The common utilities of those window managers get installed in the +# commonbox-utils dependency, and default styles with the commonbox-styles +# utility. They all share the /usr/share/commonbox directory now. + +ECLASS=commonbox +INHERITED="$INHERITED $ECLASS" + +EXPORT_FUNCTIONS commonify src_compile src_install + +DEPEND="x11-misc/commonbox-utils + x11-misc/commonbox-styles" + +RDEPEND="nls? ( sys-devel/gettext )" +PROVIDE="virtual/blackbox" + +myconf="" +mydoc="" +MYBIN="" + +commonbox_commonify() { + cd ${S} + + cp Makefile Makefile.orig + sed -e "s:\(SUBDIRS = \).*:\1doc nls src:" \ + Makefile.orig > Makefile + + cd ${S}/doc + + cp Makefile Makefile.orig + sed -e "s:bsetroot.1::" \ + -e "s:bsetbg.1::" \ + Makefile.orig > Makefile + + cd ${S}/src + cp Makefile Makefile.orig + sed -e "s:\(DEFAULT_MENU = \).*:\1/usr/share/commonbox/menu:" \ + -e "s:\(DEFAULT_STYLE = \).*:\1/usr/share/commonbox/styles/Clean:" \ + -e "s:\(DEFAULT_INITFILE = \).*:\1/usr/share/commonbox/init:" \ + Makefile.orig > Makefile + + cd ${S} + +} + +commonbox_src_compile() { + + use nls \ + && myconf="${myconf} --enable-nls" \ + || myconf="${myconf} --disable-nls" + + use kde \ + && myconf="${myconf} --enable-kde" \ + || myconf="${myconf} --disable-kde" + + use gnome \ + && myconf="${myconf} --enable-gnome" \ + || myconf="${myconf} --disable-gnome" + + econf \ + --sysconfdir=/etc/X11/${PN} \ + --datadir=/usr/share/commonbox \ + ${myconf} || die + + commonify || die + emake || die +} + + +commonbox_src_install() { + + einstall || die + + dodoc README* AUTHORS TODO* ${mydoc} + + if [ -z "${MYBIN}" ] + then + MYBIN=${PN} + fi + + dodir /etc/X11/Sessions + echo "/usr/bin/${MYBIN}" > ${D}/etc/X11/Sessions/${MYBIN} + fperm +x /etc/X11/Sessions/${MYBIN} +} |