diff --git a/.cvsignore b/.cvsignore index e69de29..f2b5052 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +fvwm-2.5.21.tar.bz2 diff --git a/fvwm-2.5.21-htmlview.patch b/fvwm-2.5.21-htmlview.patch new file mode 100644 index 0000000..f6185e6 --- /dev/null +++ b/fvwm-2.5.21-htmlview.patch @@ -0,0 +1,12 @@ +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 = ''; diff --git a/fvwm-2.5.21-menu-generate.patch b/fvwm-2.5.21-menu-generate.patch new file mode 100644 index 0000000..7e5da2d --- /dev/null +++ b/fvwm-2.5.21-menu-generate.patch @@ -0,0 +1,31 @@ +--- 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 diff --git a/fvwm-2.5.21-mimeopen.patch b/fvwm-2.5.21-mimeopen.patch new file mode 100644 index 0000000..9532687 --- /dev/null +++ b/fvwm-2.5.21-mimeopen.patch @@ -0,0 +1,12 @@ +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; diff --git a/fvwm-xdg-menu.py b/fvwm-xdg-menu.py new file mode 100644 index 0000000..bfd189b --- /dev/null +++ b/fvwm-xdg-menu.py @@ -0,0 +1,134 @@ +#!/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) + diff --git a/fvwm.desktop b/fvwm.desktop new file mode 100644 index 0000000..8210cd7 --- /dev/null +++ b/fvwm.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=FVWM +Comment=ICCCM-compliant multiple virtual desktop window manager +Exec=fvwm +Terminal=False + +[Window Manager] +SessionManaged=true diff --git a/fvwm.spec b/fvwm.spec new file mode 100644 index 0000000..78be02c --- /dev/null +++ b/fvwm.spec @@ -0,0 +1,134 @@ +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 - 2.5.21-4 +- Don't patch configure, just patch a few files + +* Thu Mar 8 2007 Adam Goode - 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 - 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 - 2.5.21-1 +- New specfile for Fedora diff --git a/sources b/sources index e69de29..5bd5255 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +c11efef91420e686d54f772e7162e879 fvwm-2.5.21.tar.bz2