# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit multilib font mozextension DESCRIPTION="brings the Mac OS X user interface to GNU/Linux" HOMEPAGE="http://sourceforge.net/projects/mac4lin" SRC_URI="mirror://sourceforge/${PN}/Mac4Lin_v${PV}.tar.gz mirror://sourceforge/${PN}/Mac4Lin_Icons_v${PV}a_for_GNOME_2.20.tar.gz mirror://sourceforge/${PN}/Wallpapers_Mac4Lin_v${PV}.tar.gz mirror://sourceforge/${PN}/Mac4Lin_Icons_v${PV}_for_GNOME_2.18_ONLY.tar.gz" LICENSE="" SLOT="0" KEYWORDS="~amd64" IUSE="cursor avant simdock compiz exaile fonts gdm grub metacity gtk \ gtk-splash firefox pidgin dark light sound xmms audacious icons \ backgrounds" DEPEND="" RDEPEND="cursor? ( x11-base/xorg-server ) avant? ( gnome-extra/avant-window-navigator ) simdock? ( gnome-extra/simdock ) compiz? ( x11-wm/compiz x11-wm/emerald ) exaile? ( media-sound/exaile ) gdm? ( gnome-base/gdm ) grub? ( sys-boot/grub ) metacity? ( x11-wm/metacity ) gtk? ( x11-libs/gtk+ ) fonts? ( media-fonts/corefonts ) || ( >=www-client/mozilla-firefox-bin-1.5.0.7 >=www-client/mozilla-firefox-1.5.0.7 )" S=${WORKDIR} src_install() { cd "${S}" if use cursor ; then dodir /usr/share/cursors/xorg-x11/ tar \ -xzf Cursors/Mac4Lin_v${PV}_Cursors.tar.gz \ -C ${D}/usr/share/cursors/xorg-x11/ \ || die "installing cursors failed" fi if use avant ; then die "TODO: Avant not yet supported" fi if use compiz ; then dodir /usr/share/emerald/themes/Mac4Lin_Emerald_v${PV} tar \ -xzf Emerald/Mac4Lin_Emerald_v${PV}.emerald \ -C ${D}/usr/share/emerald/themes/Mac4Lin_Emerald_v${PV} \ || die "installing emerald themes failed" fi if use exaile && use avant ; then dodir /usr/$(get_libdir)/exaile/xl cp \ Exaile\ AWN\ Plugin/awn.py \ ${D}/usr/$(get_libdir)/exaile/xl \ || die "installing exaile avant plugin failed" fi if use fonts ; then dodir /usr/share/fonts tar \ -xzf Fonts/OSX_Fonts.tar.gz \ -C ${D}/usr/share/fonts \ || die "installing fonts failed" mv ${D}/usr/share/fonts/OSX_Fonts ${D}/usr/share/fonts/${PN} cd ${D}/usr/share/fonts/${PN} font_xfont_config font_xft_config font_fontconfig cd "${S}" fi if use gdm ; then dodir /usr/share/gdm/themes tar \ -xzf GDM\ Theme/Mac4Lin_v${PV}_GDM.tar.gz \ -C ${D}/usr/share/gdm/themes \ || die "installing gdm themes failed" fi if use grub ; then if [[ -d ${ROOT}/boot/grub ]]; then dodir /boot/grub chmod 644 Grub\ Splash/* mv Grub\ Splash/appleblack.xpm.gz Grub\ Splash/appleblack.xpm gzip Grub\ Splash/appleblack.xpm cp \ Grub\ Splash/* \ ${D}/boot/grub \ || die "installing grub themes failed" else die "/boot/grub/ does not exist, please make sure you have /boot mounted" fi fi if use metacity || use gtk ; then dodir /usr/share/themes for THEME in Mac4Lin_GTK Mac4Lin_GTK_Aqua; do tar \ -xzf GTK\ Metacity\ Theme/${THEME}_v${PV}.tar.gz \ -C ${D}/usr/share/themes \ || die "installing metacity/GTK theme failed" done fi if use gtk-splash ; then dodir /usr/share/pixmaps/splash/ cp \ GTK\ Splash/* \ ${D}/usr/share/pixmaps/splash \ || die "installing gtk splash failed" fi if use firefox ; then # mv Mozilla\ Themes Mozilla_Themes # cd Mozilla_Themes/Extensions # for EXT in custom_buttons fission stop_reload_button ; do # mkdir ${EXT} # cd ${EXT} # #TODO: xpi_unpack did not work # unzip -qo ../${EXT}.xpi # cd .. # rm ${EXT}.xpi # done # # declare MOZILLA_FIVE_HOME # if has_version '>=www-client/mozilla-firefox-1.5.0.7' ; then # MOZILLA_FIVE_HOME="/usr/$(get_libdir)/mozilla-firefox" # for EXT in custom_buttons fission stop_reload_button ; do # xpi_install ${S}/Mozilla_Themes/Extensions/${EXT} # done # fi # if has_version '>=www-client/mozilla-firefox-bin-1.5.0.7' ; then # MOZILLA_FIVE_HOME="/opt/firefox" # for EXT in custom_buttons fission stop_reload_button ; do # xpi_install ${S}/Mozilla_Themes/Extensions/${EXT} # done # fi # cd "${S}" die "TODO: firefox extensions not yet supported" fi if use pidgin ; then if use dark ; then dodir /usr/share/pixmaps/ tar \ -xzf Pidgin/pidgin-osx-theme-black.tar.gz \ -C ${D}/usr/share/pixmaps/ \ || die "installing dark pidgin theme failed" else if use light ; then dodir /usr/share/pixmaps/ tar \ -xzf pidgin-osx-theme.tar.gz \ -C ${D}/usr/share/pixmaps/ \ || die "installing light pidgin theme failed" else ewarn "No Pidgin style installed, choose 'dark' or 'light'" fi fi #if use avant ; then # TODO: shipped awn plugin is binary only crap #fi fi if use sound ; then dodir /usr/share/sounds mkdir TMP tar \ -xzf Sounds/OSX_Sounds_v${PV}.tar.gz \ -C TMP \ || die "installing sounds failed" find TMP -name "*.wav" -exec chmod 644 {} \; cp TMP/OSX_Sounds_v0.2/* ${D}/usr/share/sounds rm -rf TMP fi # usplash will never be supported, I guess for PLAYER in xmms audacious ; do if use ${PLAYER} ; then dodir /usr/share/${PLAYER}/Skins tar \ -xzf XMMS Audacious BMP Skin/Audacious_ XMMS_BMP_OSX_v${PV}.tar.gz \ -C ${D}/usr/share/${PLAYER}/Skins \ || die "installing ${PLAYER} skins failed" fi done if use icons ; then dodir /usr/share/icons if has_version '>=gnome-base/gnome-2.20.0' ; then cp -R \ Mac4Lin_Icons_v${PV}a \ ${D}/usr/share/icons \ || die "installing icons failed for 2.20 failed" else tar \ -xvf Mac4Lin_Icons/Mac4Lin_Icons_v${PV}_for_GNOME_2.18.tar.gz \ ${D}/usr/share/icons \ || die "installing icons failed for 2.18 failed" fi fi if use backgrounds ; then dodir /usr/share/pixmaps/backgrounds/${PN} cp \ Wallpapers_Mac4Lin_v${PV}/* \ ${D}/usr/share/pixmaps/backgrounds/${PN} \ || die "installing backgrounds failed" fi } pkg_postinst() { einfo "Please refer to:" einfo " http://www.howtoforge.com/mac4lin_make_linux_look_like_a_mac" einfo "for how to set up the themes" }