rpms/fvwm/FC-5 fvwm-2.5.21-htmlview.patch, NONE, 1.1 fvwm-2.5.21-menu-generate.patch, NONE, 1.1 fvwm-2.5.21-mimeopen.patch, NONE, 1.1 fvwm-xdg-menu.py, NONE, 1.1 fvwm.desktop, NONE, 1.1 fvwm.spec, NONE, 1.1 sources, 1.1, 1.2

Adam Goode (agoode) fedora-extras-commits at redhat.com
Wed Mar 21 03:44:28 UTC 2007


Author: agoode

Update of /cvs/extras/rpms/fvwm/FC-5
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv12773

Modified Files:
	sources 
Added Files:
	fvwm-2.5.21-htmlview.patch fvwm-2.5.21-menu-generate.patch 
	fvwm-2.5.21-mimeopen.patch fvwm-xdg-menu.py fvwm.desktop 
	fvwm.spec 
Log Message:
FC-5

fvwm-2.5.21-htmlview.patch:

--- NEW FILE fvwm-2.5.21-htmlview.patch ---
diff -ur fvwm-2.5.21~/bin/fvwm-menu-headlines.in fvwm-2.5.21/bin/fvwm-menu-headlines.in
--- fvwm-2.5.21~/bin/fvwm-menu-headlines.in	2006-03-25 11:15:39.000000000 -0500
+++ fvwm-2.5.21/bin/fvwm-menu-headlines.in	2007-02-28 21:16:54.000000000 -0500
@@ -192,7 +192,7 @@
 my $name  = undef;
 my $title = undef;
 my $itemF = '%h\t%[(%Y-%m-%d %H:%M)]';
-my $execF = q(netscape -remote 'openURL(%u, new-window)' || netscape '%u');
+my $execF = q(htmlview '%u');
 my $commF = undef;
 my $iconT = '';
 my $iconI = '';

fvwm-2.5.21-menu-generate.patch:

--- NEW FILE fvwm-2.5.21-menu-generate.patch ---
--- fvwm-2.5.21/fvwm/ConfigFvwmSetup.xdg	2007-01-23 11:13:32.000000000 +0100
+++ fvwm-2.5.21/fvwm/ConfigFvwmSetup	2007-01-25 12:14:26.000000000 +0100
@@ -90,7 +90,6 @@
 DestroyMenu MenuFvwmRoot
 AddToMenu MenuFvwmRoot  "$[gt.Root Menu]"             Title
 +                       "&1. XTerm"             Exec exec xterm
-+                       "&2. Rxvt"              Exec exec rxvt
 +                       ""              Nop
 +                       "&R. $[gt.Remote Logins]"     Popup MenuFvwmLogins
 +                       ""              Nop
@@ -106,19 +105,7 @@
 +                       "&X. $[gt.Exit Fvwm]" Popup MenuFvwmQuitVerify
 
 DestroyMenu MenuFvwmUtilities
-AddToMenu MenuFvwmUtilities     "$[gt.Utilities]" Title
-+                       "&T. Top"       Exec exec xterm -T Top -n Top -e top
-+                       "&C. Calculator" Exec exec xcalc
-+                       "&M. Xman"      Exec exec xman
-+                       "&G. Xmag"      Exec exec xmag
-+                       "&R. Editres"   Exec exec editres
-+                       ""              Nop
-+                       "&E. XEmacs"    Exec exec xemacs
-+                       "&A. Xmh Mail"  FuncFvwmMailXmh xmh "-font fixed"
-+                       ""              Nop
-+                       "&L. XLock"     Exec exec xlock -mode random
-+                       ""              Nop
-+                       "&D. $[gt.Reset X defaults]" Exec xrdb -load $HOME/.Xdefaults
+PipeRead "fvwm-xdg-menu -f -m MenuFvwmUtilities /etc/xdg/menus/applications.menu"
 
 DestroyMenu MenuFvwmConfig
 AddToMenu MenuFvwmConfig "$[gt.Fvwm Config Ops]" Title

fvwm-2.5.21-mimeopen.patch:

--- NEW FILE fvwm-2.5.21-mimeopen.patch ---
diff -ur fvwm-2.5.21~/bin/fvwm-menu-directory.in fvwm-2.5.21/bin/fvwm-menu-directory.in
--- fvwm-2.5.21~/bin/fvwm-menu-directory.in	2006-11-21 03:10:33.000000000 -0500
+++ fvwm-2.5.21/bin/fvwm-menu-directory.in	2007-02-28 21:22:40.000000000 -0500
@@ -24,7 +24,7 @@
 my $dir   = $home;
 my $xterm = "xterm -e";              # the X terminal program to invoke
 my $execT = $ENV{'SHELL'} || '/bin/sh';
-my $execF = $ENV{'EDITOR'} || "vi";  # the command to execute on plain files
+my $execF = "mimeopen -n";  # the command to execute on plain files
 my $execA = undef;
 my $commT = undef;
 my $commF = undef;


--- NEW FILE fvwm-xdg-menu.py ---
#!/usr/bin/python

# Author: Piotr Zielinski (http://www.cl.cam.ac.uk/~pz215/)
# Licence: GPL 2
# Date: 03.12.2005

# This script takes names of menu files conforming to the XDG Desktop
# Menu Specification, and outputs their FVWM equivalents to the
# standard output.
#
#   http://standards.freedesktop.org/menu-spec/latest/

# Syntax:
#
#   fvwm-xdg-menu.py menufile1 menufile2 menufile3 ...
#
# Each menufile is an XDG menu description file.  Example:
#
#   fvwm-xdg-menu.py /etc/xdg/menus/gnome-applications.menu 

# This script requires the python-xdg module, which in Debian can be
# installed by typing
#
#   apt-get install python-xdg

import sys
import xdg.Menu
import xdg.IconTheme
import xdg.Locale
import optparse
import os.path
import os
from xdg.DesktopEntry import *

usage = """

   %prog [options] file1 file2 ...

This script takes names of menu files conforming to the XDG Desktop
Menu Specification, and outputs their FVWM equivalents to the standard
output.

   http://standards.freedesktop.org/menu-spec/latest/

examples:

   %prog /etc/xdg/menus/gnome-applications.menu
   %prog /etc/xdg/menus/kde-applications.menu
   %prog /etc/xdg/menus/debian-menu.menu"""

parser = optparse.OptionParser(usage=usage)
parser.add_option("-e", "--exec", dest="exec_command", type="string",
                  default="Exec exec",
                  help="FVWM command used to execute programs [Exec exec]")
parser.add_option("-s", "--size", dest="icon_size", type="int",
                  default=24, help="Default icon size [24]")
parser.add_option("-f", "--force", action="store_true", dest="force",
                  default=False,
                  help="Force icon size (requires imagemagick and writes \
                  into ICON_DIR)")
parser.add_option("-i", "--icon-dir", dest="icon_dir", type="string",
                  default="~/.fvwm/icons",
                  help="Directory for converted icons [~/.fvwm/icons]")
parser.add_option("-t", "--theme", dest="theme", type="string",
                  default="gnome",
                  help="Icon theme [gnome]")
parser.add_option("-m", "--top-menu", dest="top", type="string",
                  default="",
                  help="Top menu name")


options, args = parser.parse_args()

def printtext(text):
    print text.encode("utf-8")

def geticonfile(icon, size=options.icon_size, theme=options.theme):
    iconpath = xdg.IconTheme.getIconPath(icon, size, theme, ["png", "xpm"])

    if not iconpath:
        return None

    if not options.force:
        return iconpath
    
    if iconpath.find("%ix%i" % (size, size)) >= 0: # ugly hack!!!
        return iconpath

    printtext(iconpath)
    
    iconfile = os.path.join(os.path.expanduser(options.icon_dir),
                            "%ix%i-" % (size, size) + 
                            os.path.basename(iconpath))
    os.system("if test \\( ! -f '%s' \\) -o \\( '%s' -nt '%s' \\) ; then convert '%s' -resize %i '%s' ; fi"% 
              (iconfile, iconpath, iconfile, iconpath, size, iconfile))
    return iconfile

    
def getdefaulticonfile(command):
    if command.startswith("Popup"):
        return geticonfile("gnome-fs-directory")
    else:
        return geticonfile("gnome-applications")    

def printmenu(name, icon, command):
    iconfile = geticonfile(icon) or getdefaulticonfile(command) or icon
    printtext('+ "%s%%%s%%" %s' % (name, iconfile, command))

def parsemenu(menu, name=""):
    if not name:
      name = menu.getPath()
    # print 'DestroyMenu "%s"' % name
    printtext('AddToMenu "%s"' % name)
    for entry in menu.getEntries():
	if isinstance(entry, xdg.Menu.Menu):
	    printmenu(entry.getName(), entry.getIcon(),
		      'Popup "%s"' % entry.getPath())
	elif isinstance(entry, xdg.Menu.MenuEntry):
	    desktop = DesktopEntry(entry.DesktopEntry.getFileName())
	    printmenu(desktop.getName(), desktop.getIcon(),
		      options.exec_command + " " + desktop.getExec())
	else:
	    printtext('# not supported: ' + str(entry))

    print
    for entry in menu.getEntries():
	if isinstance(entry, xdg.Menu.Menu):
	    parsemenu(entry)


for arg in args:
    print '# %s' % arg
    parsemenu(xdg.Menu.parse(arg), options.top)
        


--- NEW FILE fvwm.desktop ---
[Desktop Entry]
Encoding=UTF-8
Name=FVWM
Comment=ICCCM-compliant multiple virtual desktop window manager
Exec=fvwm
Terminal=False

[Window Manager]
SessionManaged=true


--- NEW FILE fvwm.spec ---
Name:		fvwm
Version:	2.5.21
Release:	4%{?dist}
Summary:	Highly configurable multiple virtual desktop window manager

Group:		User Interface/X
License:	GPL
URL:		http://www.fvwm.org/
Source0:	ftp://ftp.fvwm.org/pub/fvwm/version-2/%{name}-%{version}.tar.bz2
Source1:	%{name}.desktop
Source2:	http://www.cl.cam.ac.uk/~pz215/fvwm-scripts/scripts/fvwm-xdg-menu.py


Patch0:		fvwm-2.5.21-htmlview.patch
Patch1:		fvwm-2.5.21-mimeopen.patch
Patch2:		fvwm-2.5.21-menu-generate.patch

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

BuildRequires:	gettext libX11-devel libXt-devel libXext-devel libXinerama-devel libXpm-devel
BuildRequires:	libXft-devel libXrender-devel
BuildRequires:	libstroke-devel readline-devel libpng-devel fribidi-devel
Requires:	xterm %{_bindir}/mimeopen

# for fvwm-bug
Requires:	%{_sbindir}/sendmail

# for fvwm-menu-headlines
Requires:	htmlview

# for fvwm-menu-xlock
Requires:	xlockmore

# for auto-menu generation
Requires:	ImageMagick pyxdg


%description
Fvwm is a window manager for X11. It is designed to
minimize memory consumption, provide a 3D look to window frames,
and implement a virtual desktop.


%prep
%setup -q
%patch -P 0 -p1 -b .htmlview
%patch -P 1 -p1 -b .mimeopen
%patch -P 2 -p1 -b .menu-generate

# Filter out false Perl provides
cat << \EOF > %{name}-prov
#!/bin/sh
%{__perl_provides} $* |\
  sed -e '/perl(FVWM::.*)\|perl(FvwmCommand)\|perl(General::FileSystem)\|perl(General::Parse)/d'
EOF

%define __perl_provides %{_builddir}/%{name}-%{version}/%{name}-prov
chmod +x %{__perl_provides}


# Filter false requires for old perl(Gtk) and for the above provides
cat << \EOF > %{name}-req
#!/bin/sh
%{__perl_requires} $* |\
  sed -e '/perl(Gtk)\|perl(FVWM::Module::Gtk)\|perl(FVWM::.*)\|perl(FvwmCommand)\|perl(General::FileSystem)\|perl(General::Parse)/d'
EOF

%define __perl_requires %{_builddir}/%{name}-%{version}/%{name}-req
chmod +x %{__perl_requires}


# Work around FVWM bug #4208
find . -name '*.in' -type f -print0 \
 | xargs -0 sed -i -e 's:@datarootdir@:@datadir@:'



%build
%configure
make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
%find_lang %{name}
%find_lang FvwmScript
%find_lang FvwmTaskBar
cat FvwmScript.lang FvwmTaskBar.lang >> %{name}.lang

# Fedora doesn't have old Gtk Perl
rm $RPM_BUILD_ROOT%{_datadir}/%{name}/perllib/FVWM/Module/Gtk.pm
rm $RPM_BUILD_ROOT%{_libexecdir}/%{name}/%{version}/FvwmGtkDebug

# xsession
install -D -m0644 -p %{SOURCE1} \
	$RPM_BUILD_ROOT%{_datadir}/xsessions/%{name}.desktop

# menus
install -D -m0755 -p %{SOURCE2} \
	$RPM_BUILD_ROOT%{_bindir}/fvwm-xdg-menu


%clean
rm -rf $RPM_BUILD_ROOT


%files -f %{name}.lang
%defattr(-,root,root,-)
%doc README AUTHORS NEWS ChangeLog COPYING
%{_bindir}/*
%{_libexecdir}/%{name}/
%{_datadir}/%{name}/
%{_mandir}/man1/*
%{_datadir}/xsessions/%{name}.desktop


%changelog
* Thu Mar 15 2007 Adam Goode <adam at spicenitz.org> - 2.5.21-4
- Don't patch configure, just patch a few files

* Thu Mar  8 2007 Adam Goode <adam at spicenitz.org> - 2.5.21-3
- Rebuild configure with autoconf >= 2.60 (for datarootdir)
- Filter out local Perl libraries from provides and requires

* Wed Feb 28 2007 Adam Goode <adam at spicenitz.org> - 2.5.21-2
- Shorten description
- Enable auto-generate menus in the Setup Form config generator
- Use htmlview instead of netscape
- Use mimeopen instead of EDITOR
- Add more Requires

* Sun Jan 21 2007 Adam Goode <adam at spicenitz.org> - 2.5.21-1
- New specfile for Fedora


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/fvwm/FC-5/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	21 Mar 2007 02:20:18 -0000	1.1
+++ sources	21 Mar 2007 03:43:55 -0000	1.2
@@ -0,0 +1 @@
+c11efef91420e686d54f772e7162e879  fvwm-2.5.21.tar.bz2




More information about the fedora-extras-commits mailing list