From 7224c1253228e5c29c78cb3f0f26ce34770f2356 Mon Sep 17 00:00:00 2001 From: BlackNoxis Date: Sat, 15 Feb 2014 23:24:26 +0200 Subject: Added ebuilds for kogaion desktop --- .../elementary-icon-theme-2.7.1-r1.ebuild | 107 +++++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 x11-themes/elementary-icon-theme/elementary-icon-theme-2.7.1-r1.ebuild (limited to 'x11-themes/elementary-icon-theme/elementary-icon-theme-2.7.1-r1.ebuild') diff --git a/x11-themes/elementary-icon-theme/elementary-icon-theme-2.7.1-r1.ebuild b/x11-themes/elementary-icon-theme/elementary-icon-theme-2.7.1-r1.ebuild new file mode 100644 index 00000000..9bcfecea --- /dev/null +++ b/x11-themes/elementary-icon-theme/elementary-icon-theme-2.7.1-r1.ebuild @@ -0,0 +1,107 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=3 + +SLREV=1 +inherit gnome2-utils + +DESCRIPTION="Elementary gnome icon theme" +HOMEPAGE="https://launchpad.net/elementaryicons" +SRC_URI="http://launchpad.net/elementaryicons/2.0/${PV}/+download/${P}.tar.gz + http://pkg.rogentos.ro/~rogentos/distro/${CATEGORY}/fdo-icons-rogentos1.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="monochrome branding" + +DEPEND="" +RDEPEND="" +RESTRICT="binchecks strip" + +src_install() { + cd "${WORKDIR}/${PN}" + dodoc elementary/{AUTHORS,CONTRIBUTORS} || die + use monochrome && { newdoc elementary-mono-dark/AUTHORS AUTHORS.mono-dark || die; } + rm elementary/{AUTHORS,CONTRIBUTORS,COPYING} + rm elementary-mono-dark/{AUTHORS,COPYING} + + insinto /usr/share/icons + doins -r elementary || die + use monochrome && { doins -r elementary-mono-dark || die; } + + # this icon theme uses different layout + # so let's do some blah here + local base_dir icon_dir dest_icon_dir myfile + + cd "${WORKDIR}" + # Rogentos nice stuff + for base_dir in fdo-icons-rogentos/*; do + [[ -d ${base_dir} ]] || \ + die "error, ${base_dir} doesn't exist or is not a directory" + icon_dir=$(basename "${base_dir}") # example: 128x128 + dest_icon_dir=${icon_dir} + [[ ${icon_dir} != scalable ]] && \ + dest_icon_dir=${icon_dir/x*} # leave number like "128" + + # under ${base_dir} we have emblems/ and places/ + [[ -d ${base_dir}/emblems ]] || \ + die "error, ${base_dir}/emblems doesn't exist or is not a directory" + [[ -d ${base_dir}/places ]] || \ + die "error, ${base_dir}/places doesn't exist or is not a directory" + + # emblems + for myfile in "${base_dir}"/emblems/*; do + insinto /usr/share/icons/elementary/emblems/"${dest_icon_dir}" + doins "${myfile}" || die "can't copy ${myfile}!" + if use monochrome; then + insinto /usr/share/icons/elementary-mono-dark/emblems/"${dest_icon_dir}" + doins "${myfile}" || die "can't copy ${myfile}! (2)" + fi + done + + # places + for myfile in "${base_dir}"/places/*; do + insinto /usr/share/icons/elementary/places/"${dest_icon_dir}" + doins "${myfile}" || die "can't copy ${myfile}!" + dist_logo_symlink \ + "${myfile}" \ + "${ED}"usr/share/icons/elementary/places/"${dest_icon_dir}" + if use monochrome; then + insinto /usr/share/icons/elementary-mono-dark/places/"${dest_icon_dir}" + doins "${myfile}" || die "can't copy ${myfile}! (2)" + dist_logo_symlink \ + "${myfile}" \ + "${ED}"usr/share/icons/elementary-mono-dark/places/"${dest_icon_dir}" + fi + done + done +} + +# create symbolic link distributor-logo.{png,…} -> start-here.{png,…} +dist_logo_symlink() { + local path=$1 # example: /path/start-here.png + local dest_dir=$2 + local filename=${path##*/} + [[ $filename = start-here.* ]] || return + local ext=${filename##*.} + [[ -z $ext ]] && return + # remove files like elementary/places/48/distributor-logo.svg + rm -f "${dest_dir}"/distributor-logo.* + ln -s "start-here.${ext}" "${dest_dir}/distributor-logo.${ext}" \ + || die "the command ln -s \"start-here.${ext}\" \"${dest_dir}/distributor-logo.${ext}\" failed!" +} + +pkg_preinst() { + gnome2_icon_savelist +} + +pkg_postinst() { + gnome2_icon_cache_update +} + +pkg_postrm() { + gnome2_icon_cache_update +} -- cgit v1.2.3