summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--x11/xscreensaver-gnome/Makefile5
-rw-r--r--x11/xscreensaver-gnome/pkg-install21
2 files changed, 26 insertions, 0 deletions
diff --git a/x11/xscreensaver-gnome/Makefile b/x11/xscreensaver-gnome/Makefile
index e9d2858..d586053 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 0000000..453b4b8
--- /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
OpenPOWER on IntegriCloud