diff options
Diffstat (limited to 'x11-wm/lxmed')
-rw-r--r-- | x11-wm/lxmed/Makefile | 48 | ||||
-rw-r--r-- | x11-wm/lxmed/distinfo | 2 | ||||
-rw-r--r-- | x11-wm/lxmed/files/lxmed.sh.in | 9 | ||||
-rw-r--r-- | x11-wm/lxmed/files/pc-su | 34 | ||||
-rw-r--r-- | x11-wm/lxmed/pkg-descr | 10 | ||||
-rw-r--r-- | x11-wm/lxmed/pkg-plist | 8 |
6 files changed, 111 insertions, 0 deletions
diff --git a/x11-wm/lxmed/Makefile b/x11-wm/lxmed/Makefile new file mode 100644 index 000000000000..4e31ee01ea94 --- /dev/null +++ b/x11-wm/lxmed/Makefile @@ -0,0 +1,48 @@ +# Created by: Rusmir Dusko <nemysis@FreeBSD.org> +# $FreeBSD$ + +PORTNAME= lxmed +PORTVERSION= 20120515 +CATEGORIES= x11-wm java +MASTER_SITES= SF/${PORTNAME}/ +DIST_SUBDIR= java + +MAINTAINER= nemysis@FreeBSD.org +COMMENT= LXDE Main Menu Editor + +LICENSE= GPLv3 + +RUN_DEPENDS= gksu:${PORTSDIR}/sysutils/gksu + +WRKSRC= ${WRKDIR}/${PORTNAME} + +USE_JAVA= yes +JAVA_VERSION= 1.6+ +NO_BUILD= yes + +DATADIR= ${JAVASHAREDIR}/${PORTNAME} + +SUB_FILES= ${PORTNAME}.sh + +post-patch: + @${REINPLACE_CMD} -e 's|/opt/lxmed/${PORTNAME}.png|${PREFIX}/share/pixmaps/${PORTNAME}.png|' \ + -e 's|Main Menu Editor|${COMMENT}|g' \ + ${WRKSRC}/content/${PORTNAME}.desktop + @(cd ${WRKSRC}/content/ && ${CP} -a ${PORTNAME}.desktop ${PORTNAME}-root.desktop) + @${REINPLACE_CMD} -e 's|Exec=lxmed|Exec=${DATADIR}/pc-su ${PORTNAME}|' \ + -e 's|${COMMENT}|${COMMENT} (as root)|g' \ + ${WRKSRC}/content/${PORTNAME}-root.desktop + +do-install: + ${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME}.sh ${STAGEDIR}${PREFIX}/bin/${PORTNAME} + @${MKDIR} ${STAGEDIR}${DATADIR} + ${CP} -a ${FILESDIR}/pc-su ${STAGEDIR}${DATADIR} + ${INSTALL_DATA} ${WRKSRC}/content/LXMenuEditor.jar ${STAGEDIR}${DATADIR} + ${INSTALL_DATA} ${WRKSRC}/content/${PORTNAME}.png ${STAGEDIR}${PREFIX}/share/pixmaps/ + @${MKDIR} ${STAGEDIR}${DESKTOPDIR} + +.for d in ${PORTNAME}.desktop ${PORTNAME}-root.desktop + ${INSTALL_DATA} ${WRKSRC}/content/${d} ${STAGEDIR}${DESKTOPDIR} +.endfor + +.include <bsd.port.mk> diff --git a/x11-wm/lxmed/distinfo b/x11-wm/lxmed/distinfo new file mode 100644 index 000000000000..de2e6bc39f72 --- /dev/null +++ b/x11-wm/lxmed/distinfo @@ -0,0 +1,2 @@ +SHA256 (java/lxmed-20120515.tar.gz) = 156318768dc4440fdf851cb7eeedfa96678382eca05ce52a8766936ab5d10cca +SIZE (java/lxmed-20120515.tar.gz) = 80181 diff --git a/x11-wm/lxmed/files/lxmed.sh.in b/x11-wm/lxmed/files/lxmed.sh.in new file mode 100644 index 000000000000..39c9d9933cd9 --- /dev/null +++ b/x11-wm/lxmed/files/lxmed.sh.in @@ -0,0 +1,9 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +export JAVA_VERSION="%%JAVA_VERSION%%" + +cd "%%DATADIR%%" && exec "%%LOCALBASE%%/bin/java" \ +-Djava.ext.dirs="%%DATADIR%%" -jar "%%DATADIR%%/LXMenuEditor.jar" "${@}" diff --git a/x11-wm/lxmed/files/pc-su b/x11-wm/lxmed/files/pc-su new file mode 100644 index 000000000000..87c6ea74a21b --- /dev/null +++ b/x11-wm/lxmed/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 qsudo first, should always be the default + which qsudo >/dev/null 2>/dev/null + if [ $? -eq 0 ] ; then + qsudo $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 diff --git a/x11-wm/lxmed/pkg-descr b/x11-wm/lxmed/pkg-descr new file mode 100644 index 000000000000..32e309464969 --- /dev/null +++ b/x11-wm/lxmed/pkg-descr @@ -0,0 +1,10 @@ +LXMenuEditor is a small, simple, free, open source, easy to use application +that allows you to customize the LXDE menu. + +LXMenuEditor is very useful for people that want to create their own, +customized menus for LXDE. + +This editor can also be used to customize GNOME's main menu and menus +of other enviroments, although it's specially designed for the LXDE environment. + +WWW: http://lxmed.sourceforge.net/ diff --git a/x11-wm/lxmed/pkg-plist b/x11-wm/lxmed/pkg-plist new file mode 100644 index 000000000000..902e461c6568 --- /dev/null +++ b/x11-wm/lxmed/pkg-plist @@ -0,0 +1,8 @@ +bin/lxmed +share/applications/lxmed-root.desktop +share/applications/lxmed.desktop +%%DATADIR%%/LXMenuEditor.jar +%%DATADIR%%/pc-su +share/pixmaps/lxmed.png +@dirrm %%DATADIR%% +@dirrmtry share/applications |