summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorAron Griffis <agriffis@gentoo.org>2004-05-28 02:32:16 +0000
committerAron Griffis <agriffis@gentoo.org>2004-05-28 02:32:16 +0000
commit891b0eb62f06bcb5d0f0b9729c9e15255c3e7db0 (patch)
treee2efaccc59b297e5d0efd220350da60802402dc8 /eclass
parentsnapshot update (diff)
downloadgentoo-2-891b0eb62f06bcb5d0f0b9729c9e15255c3e7db0.tar.gz
gentoo-2-891b0eb62f06bcb5d0f0b9729c9e15255c3e7db0.tar.bz2
gentoo-2-891b0eb62f06bcb5d0f0b9729c9e15255c3e7db0.zip
add mozilla-launcher eclass which updates symlinks to support source and bin installations
Diffstat (limited to 'eclass')
-rw-r--r--eclass/mozilla-launcher.eclass38
1 files changed, 38 insertions, 0 deletions
diff --git a/eclass/mozilla-launcher.eclass b/eclass/mozilla-launcher.eclass
new file mode 100644
index 000000000000..bcd54a177239
--- /dev/null
+++ b/eclass/mozilla-launcher.eclass
@@ -0,0 +1,38 @@
+# Copyright 1999-2004 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/eclass/mozilla-launcher.eclass,v 1.1 2004/05/28 02:32:16 agriffis Exp $
+
+ECLASS=mozilla-launcher
+INHERITED="$INHERITED $ECLASS"
+
+update_mozilla_launcher_symlinks() {
+ local f browsers="mozilla firefox thunderbird"
+ cd ${ROOT}/usr/bin
+
+ # Remove launcher symlinks that no longer apply
+
+ for f in ${browsers}; do
+ if [[ -L ${f} && ! -f ${f} ]]; then
+ einfo "Removing dangling ${f} launcher"
+ rm -f ${f}
+ fi
+ done
+
+ # Create symlinks
+ #
+ # - If there's a -bin symlink in /usr/bin, and no corresponding
+ # non-bin symlink, then create one.
+ #
+ # - Can't do this in src_install otherwise it overwrites the one
+ # for the non-bin package.
+ #
+ # - Link to the -bin symlink so it's easier to detect when to
+ # remove the symlink.
+
+ for f in ${browsers}; do
+ if [[ -L ${f}-bin && ! -e ${f} ]]; then
+ einfo "Adding link from ${f}-bin to ${f}"
+ ln -s ${f}-bin ${f}
+ fi
+ done
+}