diff options
author | rm <rm@FreeBSD.org> | 2013-01-12 04:22:28 +0800 |
---|---|---|
committer | rm <rm@FreeBSD.org> | 2013-01-12 04:22:28 +0800 |
commit | 9d91899585c3b675c117371d8443efff4825ee2a (patch) | |
tree | ba07b3355b61d3dc52a8d18b71761e589a36f604 | |
parent | 8db09351b297b0508bd12821f9d98cddec8ce348 (diff) | |
download | freebsd-ports-gnome-9d91899585c3b675c117371d8443efff4825ee2a.tar.gz freebsd-ports-gnome-9d91899585c3b675c117371d8443efff4825ee2a.tar.zst freebsd-ports-gnome-9d91899585c3b675c117371d8443efff4825ee2a.zip |
- drop PKGNAMEPREFIX (it's an app, not library)
- replace su-to-zenmap.sh (su detection script) with more clean solution
from PC-BSD, that does not require modification to work properlt with kde4
- bump PORTREVISION
PR: 175120
Submitted by: nemysis <nemysis@gmx.ch> (maintainer)
-rw-r--r-- | security/zenmap/Makefile | 8 | ||||
-rw-r--r-- | security/zenmap/files/pc-su | 34 |
2 files changed, 41 insertions, 1 deletions
diff --git a/security/zenmap/Makefile b/security/zenmap/Makefile index a9a99bb1f7d6..29237183e057 100644 --- a/security/zenmap/Makefile +++ b/security/zenmap/Makefile @@ -3,9 +3,9 @@ PORTNAME= zenmap PORTVERSION= 6.25 +PORTREVISION= 1 CATEGORIES= security ipv6 MASTER_SITES= http://nmap.org/dist/ -PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} DISTNAME= nmap-${PORTVERSION} MAINTAINER= nemysis@gmx.ch @@ -37,7 +37,13 @@ PLIST_SUB+= NLS="" PLIST_SUB+= NLS="@comment " .endif +post-extract: + @${RM} -f ${WRKSRC}/install_scripts/unix/su-to-zenmap.sh + @${CP} -a ${FILESDIR}/pc-su ${WRKSRC}/install_scripts/unix/su-to-zenmap.sh + post-patch: + @${REINPLACE_CMD} -e 's|su-to-zenmap.sh %F|su-to-zenmap.sh ${PORTNAME}|' \ + ${WRKSRC}/install_scripts/unix/zenmap-root.desktop @${REINPLACE_CMD} \ -e '/self.create_uninstaller/s|^|#|' ${WRKSRC}/setup.py @${REINPLACE_CMD} \ diff --git a/security/zenmap/files/pc-su b/security/zenmap/files/pc-su new file mode 100644 index 000000000000..ceccaace603c --- /dev/null +++ b/security/zenmap/files/pc-su @@ -0,0 +1,34 @@ +#!/bin/sh +# Wrapper script which finds the right "su" program +# to use for graphical root execution + +if [ `id -r -u` != "0" ] ; then + VARS="`echo $@`" + + # Try qsu first, should always be the default + which qsu >/dev/null 2>/dev/null + if [ $? -eq 0 ] ; then + qsu $VARS + exit $? + fi + + # Now try gksu + which gksu >/dev/null 2>/dev/null + if [ $? -eq 0 ] ; then + gksu -a "$VARS" + exit $? + fi + + # Lastly we have kdesu + which kdesu >/dev/null 2>/dev/null + if [ $? -eq 0 ] ; then + kdesu -t -c "$VARS" + exit $? + fi + + # If no utility could be found... + echo "No graphical switch-user utility found!" + exit 1 +else + ${@} +fi |