rpms/pekwm/devel pekwm-xdg-menu.py, NONE, 1.1 pekwm.desktop, NONE, 1.1 pekwm.spec, NONE, 1.1 pekwm_configure.patch, NONE, 1.1 pekwm_menu.patch, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Michael Rice (errr) fedora-extras-commits at redhat.com
Wed Oct 18 01:39:14 UTC 2006


Author: errr

Update of /cvs/extras/rpms/pekwm/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv5503/devel

Modified Files:
	.cvsignore sources 
Added Files:
	pekwm-xdg-menu.py pekwm.desktop pekwm.spec 
	pekwm_configure.patch pekwm_menu.patch 
Log Message:
auto-import pekwm-0.1.5-5.fc5 on branch devel from pekwm-0.1.5-5.fc5.src.rpm


--- NEW FILE pekwm-xdg-menu.py ---
#!/usr/bin/env python
# vim: noexpandtab:ts=4:sts=4

"""Menu Generator for PekWM 
Generates a dynamic menu for PekWM using the freedesktop.org standards

Usage:

  Options:
  -l ..., --lang=...      create the menu using a language. Default = $LANG
  -h, --help              show this help

"""

__author__ = "Michael Rice , Rudolf Kastl , Antonio Gomes"
__version__ = "$Revision: 1.0 $"
__date__ = "$Date: 2006/10/12 18:20:10 $"
__license__ = "GPL"

import xdg.Menu,xdg.DesktopEntry
import getopt,os,sys

def usage():
	print __doc__

def checkWm(entry):
	if entry.DesktopEntry.getOnlyShowIn() != []:
		entry.Show = False
	if entry.DesktopEntry.getNotShowIn() != []:
		if isinstance(entry, xdg.Menu.MenuEntry):
			if wm in entry.DesktopEntry.getNotShowIn():
				entry.Show = False
			else:
				entry.Show = True 
	
def parseMenu(menu,depth=1):
    print "%s Submenu =  \"%s\" {" % ( (depth*"\t"), menu.getName().encode('utf8'), )
    depth += 1
    for entry in menu.getEntries():
		if isinstance(entry, xdg.Menu.Menu):
			parseMenu(entry,depth)
		elif isinstance(entry, xdg.Menu.MenuEntry):
		    checkWm(entry)
		    if entry.Show == False: continue
		    print "%sEntry = \"%s\" { Actions = \"Exec %s &\" }  " % ( (depth*"\t"), \
		      entry.DesktopEntry.getName().encode("utf8"), \
		  	  entry.DesktopEntry.getExec().split()[0]) 
		elif isinstance(entry,xdg.Menu.Separator):
			print "%sSeparator {}" % (depth*"\t")
		elif isinstance(entry.xdg.Menu.Header):
			print "%s%s" % ( (depth*"\t"), entry.Name )
	depth -= 1
	print "%s}" % (depth*"\t")
def main(argv):
	lang = os.getenv("LANG","C")
	try:
	    opts, args = getopt.getopt(argv, "hf:dl:d", ["help","lang="])
	except getopt.GetoptError:
	    usage()
		raise SystemExit
	for opt, arg in opts:
	    if opt in ("-h", "--help"):
		    usage()
			raise SystemExit
		elif opt in ("-l", "--lang"):
		    lang = arg
	
	menu=xdg.Menu.parse()
	print "Dynamic {"
	parseMenu(menu)
	print "}"

if __name__ == "__main__":
	main(sys.argv[1:])


--- NEW FILE pekwm.desktop ---
[Desktop Entry]
Encoding=UTF-8
Name=PekWM
Comment=Very small and fast window manger
Exec=pekwm
Terminal=False
TryExec=pekwm

[Window Manager]
SessionManaged=true
# vi: encoding=utf-8


--- NEW FILE pekwm.spec ---
Name:           pekwm
Version:        0.1.5
Release:        5%{?dist}
Summary:        The Pek Window Manager

Group:          User Interface/Desktops
License:        GPL
URL:            http://pekwm.org
Source0:        http://pekwm.org/files/%{name}-%{version}.tar.bz2
Source1:        %{name}.desktop
Source2:        pekwm-xdg-menu.py
Patch0:         pekwm_configure.patch
Patch2:         pekwm_menu.patch

BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  libX11-devel, xorg-x11-proto-devel, libXft-devel,libXpm-devel
BuildRequires:  libXrandr-devel, libXinerama-devel, libpng-devel, libjpeg-devel
BuildRequires:  pcre-devel
Requires:       pyxdg, procps, xprop

%description
A lightweight window manager with tabs based on aewm++.

%prep
%setup -q
%patch0
%patch2

sed -i s,"<BINDIR>",%{_bindir},g data/menu.in
sed -i s,"XftDrawString8","XftDrawStringUtf8", src/PFont.cc

%build
%configure --enable-shape \
           --enable-xinerama \
           --enable-xrandr \
           --enable-xft \
           --enable-image-xpm \
           --enable-image-jpeg \
           --enable-image-png  \
           --enable-menus \
           --enable-harbour \
           --enable-pcre \
           --x-includes=%{_includedir} \
           --x-libraries=%{_libdir} 

make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT scriptsdir=%{_bindir}

mkdir -p $RPM_BUILD_ROOT%{_datadir}/xsessions/
install -m 0644 -p %SOURCE1 $RPM_BUILD_ROOT%{_datadir}/xsessions/
install -m 0755 -p %SOURCE2 $RPM_BUILD_ROOT%{_bindir}/pekwm-xdg-menu
%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,755)
%doc AUTHORS ChangeLog
%{_bindir}/pekwm
%{_bindir}/pekwm-xdg-menu
%{_bindir}/pekwm_themeset.pl
%{_bindir}/pekwm_themeset.sh
%{_bindir}/pekwm_ws_menu.pl
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/themes/
%dir %{_datadir}/%{name}/themes/default
%{_datadir}/%{name}/themes/default/theme
%dir %{_sysconfdir}/%{name}
%{_datadir}/xsessions/%{name}.desktop
%config(noreplace) %attr(755,root,root) %{_sysconfdir}/%{name}/start
%config(noreplace) %{_sysconfdir}/%{name}/menu
%config(noreplace) %{_sysconfdir}/%{name}/keys
%config(noreplace) %{_sysconfdir}/%{name}/autoproperties
%config(noreplace) %{_sysconfdir}/%{name}/config
%config(noreplace) %{_sysconfdir}/%{name}/mouse
%config(noreplace) %{_sysconfdir}/%{name}/vars


%changelog
* Tue Oct 17 2006 Michael Rice <errr[AT]errr-online.com> - 0.1.5-5
- Add UTF-8 support per: 
    http://adresh.com/pekwm/dev_docs/html/faq/answers.html#FAQ-1546

* Tue Oct 17 2006 Michael Rice <errr[AT]errr-online.com> - 0.1.5-4
- Add dir datadir/name/themes/ for ownership
- Add BR for pcre
- Add Requires for use of pkill in a provided script
- Change summary & add a . to the description
- Change Requires to xprop and not xorg-x11-utils

* Mon Oct 16 2006 Michael Rice <errr[AT]errr-online.com> - 0.1.5-3
- Move default configs into sysconfdir
- Fix double listing of sysconf stuff
- Place all scripts into bindir
- fix typo in menu_patch

* Fri Oct 13 2006 Michael Rice <errr[AT]errr-online.com> - 0.1.5-2
- Add fedora compliant menu generator.
- Remake provided menu to use the pekwm-xdg-menu
- Add requires for pyxdg
- Rebuilt with pcre
- Add BR for jpeg, png, and xinerama

* Mon Oct 09 2006 Michael Rice <errr[AT]errr-online.com> - 0.1.5-1
- Initial RPM release

pekwm_configure.patch:

--- NEW FILE pekwm_configure.patch ---
--- configure	2006-04-17 13:22:36.000000000 -0500
+++ configure.new	2006-10-09 14:19:21.000000000 -0500
@@ -4915,18 +4915,18 @@
   if test x$xft_config_exec_prefix != x ; then
      xft_config_args="$xft_config_args --exec-prefix=$xft_config_exec_prefix"
      if test x${XFT_CONFIG+set} != xset ; then
-       XFT_CONFIG=$xft_config_exec_prefix/bin/xft-config
+       XFT_CONFIG=$xft_config_exec_prefix/bin/pkg-config xft --cflags
      fi
   fi
   if test x$xft_config_prefix != x ; then
      xft_config_args="$xft_config_args --prefix=$xft_config_prefix"
      if test x${XFT_CONFIG+set} != xset ; then
-       XFT_CONFIG=$xft_config_prefix/bin/xft-config
+       XFT_CONFIG=$xft_config_prefix/bin/pkg-config xft --cflags
      fi
   fi
 
-  # Extract the first word of "xft-config", so it can be a program name with args.
-set dummy xft-config; ac_word=$2
+  # Extract the first word of "pkg-config xft --cflags", so it can be a program name with args.
+set dummy pkg-config xft --cflags; ac_word=$2
 echo "$as_me:$LINENO: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
 if test "${ac_cv_path_XFT_CONFIG+set}" = set; then
@@ -5013,10 +5013,10 @@
           echo    ".$xft_wanted_micro_version."
           echo "***"
           echo "*** If you have already installed a sufficiently new version, this error"
-          echo "*** probably means that the wrong copy of the xft-config shell script is"
+          echo "*** probably means that the wrong copy of the pkg-config xft --cflags shell script is"
           echo "*** being found. The easiest way to fix this is to remove the old version"
           echo "*** of xft, but you can also set the XFT_CONFIG environment to point to the"
-          echo "*** correct copy of xft-config. (In this case, you will have to"
+          echo "*** correct copy of pkg-config xft --cflags. (In this case, you will have to"
           echo "*** modify your LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf"
           echo "*** so that the correct libraries are found at run-time)"
         fi
@@ -5031,8 +5031,8 @@
 #define HAVE_XFT
 _ACEOF
 
-			XFT_LIBS=`xft-config --libs`
-			XFT_CFLAGS=`xft-config --cflags`
+			XFT_LIBS=`pkg-config xft --cflags --libs`
+			XFT_CFLAGS=`pkg-config xft --cflags --cflags`
 			LIBS="$LIBS $XFT_LIBS"
 			CXXFLAGS="$CXXFLAGS $XFT_CFLAGS"
 			FEATURES="$FEATURES Xft";
@@ -5041,10 +5041,10 @@
      echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6
      if test "$XFT_CONFIG" = "no" ; then
-       echo "*** The xft-config script installed by xft could not be found"
+       echo "*** The pkg-config xft --cflags script installed by xft could not be found"
        echo "*** If xft was installed in PREFIX, make sure PREFIX/bin is in"
        echo "*** your path, or set the XFT_CONFIG environment variable to the"
-       echo "*** full path to xft-config."
+       echo "*** full path to pkg-config xft --cflags."
      fi
      XFT_CFLAGS=""
      XFT_LIBS=""

pekwm_menu.patch:

--- NEW FILE pekwm_menu.patch ---
--- data/menu.in	2006-04-17 13:22:21.000000000 -0500
+++ data/my_menu.in	2006-10-16 16:01:25.000000000 -0500
@@ -6,97 +6,33 @@
 RootMenu = "Pekwm" {
 	Entry = "Terminal" { Actions = "Exec $TERM &" }
 	Entry = "Run.." { Actions = "ShowCmdDialog" }
+  Entry = "Web Browser" { Actions = "Exec htmlview &" }
 
 	Separator {}
-
-	Submenu = "Editors" {
-		Entry = "vi" { Actions = "Exec $TERM -title vi -e vi &" }
-		Entry = "vim" { Actions = "Exec $TERM -title vim -e vim &" }
-		Entry = "gvim" { Actions = "Exec gvim &" }
-		Entry = "Emacs" { Actions = "Exec emacs &" }
-		Entry = "Emacs Terminal" { Actions = "Exec $TERM -title emacs -e emacs -nw &" }
-		Entry = "Kate" { Actions = "Exec kate &" }
-	}
-	Submenu = "Graphics" {
-		Entry = "display" { Actions = "Exec display &" }
-		Entry = "Gimp" { Actions = "Exec gimp &" }
-		Entry = "Gv" { Actions = "Exec gv &" }
-		Entry = "Xpdf" { Actions = "Exec xpdf &" }
-		Entry = "gqview" { Actions = "Exec gqview &" }
-	}
-	Submenu = "Multimedia" {
-		Entry = "Amarok" { Actions = "Exec amarok &" }
-		Entry = "Quod Libet" { Actions = "Exec quodlibet &" }
-		Entry = "Xmms" { Actions = "Exec xmms &" }
-		Entry = "MPlayer" { Actions = "Exec gmplayer &" }
-		Entry = "Xine" { Actions = "Exec xine &" }
-		Entry = "xawtv" { Actions = "Exec xawtv &" }
-		Entry = "Ogle" { actions = "exec ogle &" }
-		Entry = "alsamixer" { Actions = "Exec $TERM -title alsamixer -e alsamixer &" }
-	}
-	Submenu = "Utils" {
-		Entry = "XCalc" { Actions = "Exec xcalc &" }
-		Entry = "XMan" { Actions = "Exec xman &" }
-		Entry = "Xpdf" { Actions = "Exec xpdf &" }
-		Entry = "GGv" { Actions = "Exec ggv &" }
-		Entry = "Evince" { Actions = "Exec evince &" }
-		Entry = "gucharmap" { Actions = "Exec gucharmap &" }
-		Entry = "Gkrellm" { Actions = "Exec gkrellm &" }
-		Entry = "Gkrellm2" { Actions = "Exec gkrellm2 &" }
-		Entry = "ROX Filer" { Actions = "Exec rox &" }
-	}
-	Submenu = "WWW" {
-		Entry = "Dillo" { Actions = "Exec dillo &" }
-		Entry = "Konqueror" { Actions = "Exec konqueror &" }
-		Entry = "Mozilla" { Actions = "Exec mozilla &" }
-		Entry = "Firefox" { Actions = "Exec firefox &" }
-		Entry = "Mozilla Firefox" { Actions = "Exec mozilla-firefox &" }
-	}
-	Submenu = "FTP" {
-		Entry = "gftp" { Actions = "Exec gftp &" }
-		Entry = "lftp" { Actions = "Exec $TERM -title lftp -e lftp &" }
-	}
-	Submenu = "Communication" {
-		Entry = "Mutt" { Actions = "Exec $TERM -title mutt -e mutt &" }
-		Entry = "Pine" { Actions = "Exec $TERM -title pine -e pine &" }
-		Entry = "Thunderbird" { Actions = "Exec thunderbird &" }
-		Entry = "Mozilla Thunderbird" { Actions = "Exec mozilla-thunderbird &" }
-		Entry = "Evolution" { Actions = "Exec evolution &" }
-		Entry = "KMail" { Actions = "Exec kmail &" }
-		Entry = "Gaim" { Actions = "Exec gaim &" }
-		Entry = "Irssi" { Actions = "Exec $TERM -title irssi -e irssi &" }
-		Entry = "Kopete" { Actions = "Exec kopete &" }
-	}
-	Submenu = "Office" {
-		Entry = "KOffice Workspace" { Actions = "Exec koshell &" }
-		Entry = "OpenOffice" { Actions = "Exec ooffice &" }
-		Entry = "StarOffice" { Actions = "Exec soffice &" }
-	}
-	Submenu = "Development" {
-		Entry = "Anjuta" { Actions = "Exec anjuta &" }
-		Entry = "Eclipse" { Actions = "Exec eclipse &" }
-		Entry = "KDevelop" { Actions = "Exec kdevelop &" }
-	}
-
+  
+  Submenu = "Fedora Menu" {
+      Entry { Actions = "Dynamic <BINDIR>/pekwm-xdg-menu" }
+  }
+  
 	Separator {}
 
 	Submenu = "Go to" {
 		SubMenu = "Workspace" {
 			# Create goto menu once per pekwm config reload. The fast way that
 			# will work for most if not all users.
-			COMMAND = "<PREFIX>/scripts/pekwm_ws_menu.pl -n goto"
+			COMMAND = "<BINDIR>/pekwm_ws_menu.pl -n goto"
 			# Create goto menu every time the menu is opened. The slow way.
 			# This is what you want if you are using external tools to make
 			# the amount of workspaces something else than what you define in
 			# ~/.pekwm/config. You will know if you want this.
-			# Entry = "" { Actions = "Dynamic <PREFIX>/scripts/pekwm_ws_menu.pl goto" }
+			# Entry = "" { Actions = "Dynamic <BINDIR>/pekwm_ws_menu.pl goto" }
 		}
 		Entry = "Window.." { Actions = "ShowMenu GotoClient True" }
 	}
 	Submenu = "Pekwm" {
 		Submenu = "Themes" {
-			Entry { Actions = "Dynamic <PREFIX>/scripts/pekwm_themeset.pl <PREFIX>/themes" }
-			Entry { Actions = "Dynamic <PREFIX>/scripts/pekwm_themeset.pl ~/.pekwm/themes" }
+			Entry { Actions = "Dynamic <BINDIR>/pekwm_themeset.pl <PREFIX>/themes" }
+			Entry { Actions = "Dynamic <BINDIR>/pekwm_themeset.pl ~/.pekwm/themes" }
 		}
 		Entry = "Reload" { Actions = "Reload" }
 		Entry = "Restart" { Actions = "Restart" }
@@ -143,12 +79,12 @@
 	SubMenu = "Send To" {
 		# Create sendto menu once per pekwm config reload. The fast way that
 		# will work for most if not all users.
-		COMMAND = "<PREFIX>/scripts/pekwm_ws_menu.pl -n send"
+		COMMAND = "<BINDIR>/pekwm_ws_menu.pl -n send"
 		# Create sendto menu every time the menu is opened. The slow way.
 		# This is what you want if you are using external tools to make
 		# the amount of workspaces something else than what you define in
 		# ~/.pekwm/config. You will know if you want this.
-		# Entry = "" { Actions = "Dynamic <PREFIX>/scripts/pekwm_ws_menu.pl send" }
+		# Entry = "" { Actions = "Dynamic <BINDIR>/pekwm_ws_menu.pl send" }
 	}
 	Separator {}
 	Entry = "Close" { Actions = "Close" }


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/pekwm/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	18 Oct 2006 01:38:10 -0000	1.1
+++ .cvsignore	18 Oct 2006 01:38:43 -0000	1.2
@@ -0,0 +1 @@
+pekwm-0.1.5.tar.bz2


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/pekwm/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	18 Oct 2006 01:38:10 -0000	1.1
+++ sources	18 Oct 2006 01:38:43 -0000	1.2
@@ -0,0 +1 @@
+fe3e0d77250d27963991994f83ccb4ea  pekwm-0.1.5.tar.bz2




More information about the fedora-extras-commits mailing list