From 1189082976a77df32bd75fc407280b17a1f8e789 Mon Sep 17 00:00:00 2001 From: Joe Marcus Clarke Date: Tue, 15 Apr 2003 22:21:27 +0000 Subject: Add a pkg-install check to see if xscreensaver is already installed. This way, users won't end up with two versions of xscreensaver. Based on patches that were Submitted by: Miguel Mendez --- x11/xscreensaver-gnome/Makefile | 5 +++++ x11/xscreensaver-gnome/pkg-install | 21 +++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 x11/xscreensaver-gnome/pkg-install (limited to 'x11/xscreensaver-gnome') diff --git a/x11/xscreensaver-gnome/Makefile b/x11/xscreensaver-gnome/Makefile index e9d285883b99..d586053fc1c5 100644 --- a/x11/xscreensaver-gnome/Makefile +++ b/x11/xscreensaver-gnome/Makefile @@ -71,6 +71,11 @@ post-patch: @${REINPLACE_CMD} -e 's|malloc[.]h|stdlib.h|g' \ ${WRKSRC}/hacks/glx/extrusion.c +.if !defined(PACKAGE_BUILDING) +pre-install: + @${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL +.endif + post-install: @${INSTALL_DATA} ${WRKSRC}/utils/images/logo-50.xpm \ ${PREFIX}/share/gnome/pixmaps/xscreensaver.xpm diff --git a/x11/xscreensaver-gnome/pkg-install b/x11/xscreensaver-gnome/pkg-install new file mode 100644 index 000000000000..453b4b82d4a6 --- /dev/null +++ b/x11/xscreensaver-gnome/pkg-install @@ -0,0 +1,21 @@ +#!/bin/sh + +if [ -n "${PACKAGE_BUILDING}" ]; then + exit 0 +fi + +PATH=/bin:/usr/bin:/sbin:/usr/sbin:${PATH} +export PATH + +if [ "$2" = "PRE-INSTALL" ]; then + if pkg_info | grep "^xscreensaver-[0-9]" >/dev/null 2>&1; then + echo "" + echo "*********************************************************" + echo "You already have the non-gnome xscreensaver installed." + echo "Please deinstall it before installing xscreensaver-gnome." + echo "*********************************************************" + echo "" + false + fi + done +fi -- cgit v1.2.3