Bug 175936 - [NEW PORT] x11-wm/lxmed: LXDE Main Menu Editor
Summary: [NEW PORT] x11-wm/lxmed: LXDE Main Menu Editor
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Rusmir Dusko
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-07 20:00 UTC by nemysis
Modified: 2013-10-19 00:50 UTC (History)
0 users

See Also:


Attachments
.shar (4.24 KB, text/plain)
2013-02-07 20:00 UTC, nemysis
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description nemysis 2013-02-07 20:00:00 UTC
LXMenuEditor

lxmed is a small, simple, free, open source, easy to use application
that allows you to customize the LXDE menu.

lxmed 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, altough it's specially designed for the LXDE environment.

WWW: http://lxmed.sourceforge.net/

Generated and tested manually, tested with port test, sent with FreeBSD Port Tools 0.99_6 (mode: new)

How-To-Repeat: 
portlint -A
looks fine.

port test: clean
Comment 1 Martin Wilke freebsd_committer freebsd_triage 2013-02-10 05:06:11 UTC
State Changed
From-To: open->feedback

please reread the porter handbook about how to create rc.d scripts. thx
Comment 2 nemysis 2013-02-10 12:39:50 UTC
> please reread the porter handbook about how to create rc.d scripts. thx

This isn't a RC script this is from PC-BSD to start graphically
an other user, mostly root.

http://trac.pcbsd.org/browser/pcbsd/current/src-sh/pc-su


And pc-su is too used in Zenmap

http://svnweb.freebsd.org/ports/head/security/zenmap/files/
Comment 3 Martin Wilke freebsd_committer freebsd_triage 2013-08-14 10:30:03 UTC
Responsible Changed
From-To: freebsd-ports-bugs->nemysis

submitter is now committer.
Comment 4 Rusmir Dusko freebsd_committer freebsd_triage 2013-10-18 00:43:50 UTC
State Changed
From-To: feedback->open

Submitter has fixed.
Comment 5 dfilter service freebsd_committer freebsd_triage 2013-10-19 00:43:43 UTC
Author: nemysis
Date: Fri Oct 18 23:43:34 2013
New Revision: 330799
URL: http://svnweb.freebsd.org/changeset/ports/330799

Log:
  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/
  
  PR:		ports/175936
  Submitted by:	nemysis (self)
  Approved by:	pawel (mentor)

Added:
  head/x11-wm/lxmed/
  head/x11-wm/lxmed/Makefile   (contents, props changed)
  head/x11-wm/lxmed/distinfo   (contents, props changed)
  head/x11-wm/lxmed/files/
  head/x11-wm/lxmed/files/lxmed.sh.in   (contents, props changed)
  head/x11-wm/lxmed/files/pc-su   (contents, props changed)
  head/x11-wm/lxmed/pkg-descr   (contents, props changed)
  head/x11-wm/lxmed/pkg-plist   (contents, props changed)
Modified:
  head/x11-wm/Makefile

Modified: head/x11-wm/Makefile
==============================================================================
--- head/x11-wm/Makefile	Fri Oct 18 23:42:09 2013	(r330798)
+++ head/x11-wm/Makefile	Fri Oct 18 23:43:34 2013	(r330799)
@@ -109,6 +109,7 @@
     SUBDIR += libdockapp
     SUBDIR += libwraster
     SUBDIR += lwm
+    SUBDIR += lxmed
     SUBDIR += lxsession
     SUBDIR += matwm2
     SUBDIR += mcwm

Added: head/x11-wm/lxmed/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11-wm/lxmed/Makefile	Fri Oct 18 23:43:34 2013	(r330799)
@@ -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>

Added: head/x11-wm/lxmed/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11-wm/lxmed/distinfo	Fri Oct 18 23:43:34 2013	(r330799)
@@ -0,0 +1,2 @@
+SHA256 (java/lxmed-20120515.tar.gz) = 156318768dc4440fdf851cb7eeedfa96678382eca05ce52a8766936ab5d10cca
+SIZE (java/lxmed-20120515.tar.gz) = 80181

Added: head/x11-wm/lxmed/files/lxmed.sh.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11-wm/lxmed/files/lxmed.sh.in	Fri Oct 18 23:43:34 2013	(r330799)
@@ -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" "${@}"

Added: head/x11-wm/lxmed/files/pc-su
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11-wm/lxmed/files/pc-su	Fri Oct 18 23:43:34 2013	(r330799)
@@ -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

Added: head/x11-wm/lxmed/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11-wm/lxmed/pkg-descr	Fri Oct 18 23:43:34 2013	(r330799)
@@ -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/

Added: head/x11-wm/lxmed/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11-wm/lxmed/pkg-plist	Fri Oct 18 23:43:34 2013	(r330799)
@@ -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
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 6 Rusmir Dusko freebsd_committer freebsd_triage 2013-10-19 00:44:50 UTC
State Changed
From-To: open->closed

New port added. Thanks!