# Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI="2" inherit mozextension multilib versionator MY_PV=$(delete_all_version_separators) XPINAME="OxygenKDE_$(replace_all_version_separators '_')" DESCRIPTION="Oxygen style for Firefox" HOMEPAGE="http://kde-look.org/content/show.php?content=117962" SRC_URI="http://oxygenkde.netsons.org/download/${XPINAME}.xpi" LICENSE="BSD" SLOT="0" KEYWORDS="amd64 x86" IUSE="" RDEPEND=" || ( >=www-client/firefox-3.6 >=www-client/firefox-bin-3.6 )" DEPEND="${RDEPEND}" S="${WORKDIR}" src_unpack() { xpi_unpack "${XPINAME}.xpi" mv "${S}/${XPINAME}/oxykde_opt${MY_PV}.xpi" "${S}/${XPINAME}/oxykde_theme${MY_PV}.xpi" "${DISTDIR}" rm -r "${S}/${XPINAME}" xpi_unpack "oxykde_opt${MY_PV}.xpi" xpi_unpack "oxykde_theme${MY_PV}.xpi" } src_prepare() { chmod +x oxykde_opt${MY_PV} oxykde_theme${MY_PV} } oxygenkde_install() { local emid_opt="{c2a3f51e-2920-4eab-9008-1bcb44d21d57}" local emid_theme="{C1F83B1E-D6EE-11DE-B441-1AD556D89593}" # You must tell xpi_install which xpi to use [[ ${#} -ne 1 ]] && die "$FUNCNAME takes exactly one arguments, please specify an xpi to unpack" x="${1}" cd ${x} insinto "${MOZILLA_FIVE_HOME}/extensions/${emid_opt}" doins -r "${x}/oxykde_opt${MY_PV}"/* || die "failed to copy extension" insinto "${MOZILLA_FIVE_HOME}/extensions/${emid_theme}" doins -r "${x}/oxykde_theme${MY_PV}"/* || die "failed to copy extension" } src_install() { local MOZILLA_FIVE_HOME mozillas="" if has_version '>=www-client/firefox-3.6'; then MOZILLA_FIVE_HOME="/usr/$(get_libdir)/firefox" oxygenkde_install "${S}" mozillas="$(best_version www-client/firefox) ${mozillas}" fi if has_version '>=www-client/firefox-bin-3.6'; then MOZILLA_FIVE_HOME="/opt/firefox" oxygenkde_install "${S}" mozillas="$(best_version www-client/firefox-bin) ${mozillas}" fi } pkg_postinst() { elog "OxygenKDE has been installed for the following packages:" for i in ${mozillas}; do elog " $i" done elog elog elog "To hide the firefox titlebar, do the following or go to http://oxygenkde.netsons.org/exceptionsguide.html for screenshots" elog elog "Go to System Settings > Workspace Appearance > Window Decorations" elog "Select \"Oxygen\" (if it's unselected), click the button \"Configure Decoration\" and select tab \"Window-Specific Overrides\"" elog elog "Two exceptions are to be created" elog elog "For the first, use these values" elog "> Matching window property: Window Title" elog "> Regular Expression to match: Mozilla Firefox" elog "> Check Hide window title bar" elog elog "For the second, use these values" elog "> Matching window property: Window Class Name" elog "> Regular Expression to match: Firefox" elog "> Check Background style and select Radial gradient" elog "> Check Separator display and select Always Draw Separator" elog elog "Now you may need the buttons minimize, maximize, close or drag to control the window" elog "Right click on the tab area and select Customize" elog "You'll find minimize, maximize and close buttons" elog "Drag them into the main Firefox window" }