Summary: An improved version of the FVWM window manager for X.
Summary(ja): fvwm2 (F(?) Virtual Window Manager version 2) の日本語対応版
Name: fvwm2
Version: 2.7.0
Release: 2%{?_dist_release}
License: GPLv2
Group: User Interface/Desktops
Url: http://www.fvwm.org
Source0: ftp://ftp.fvwm.org/pub/fvwm/version-2/fvwm-%{version}.tar.bz2
Source1: fvwm-2.0.46.icons.tar.gz
##Source2: compat-icons.tar.gz
Source3: fvwm2rc.vine
Source4: fvwm2rc.vine.ja
Source10: start_fvwm2
Source11: fvwm.desktop
Source12: fvwm-setwallpaper
Source13: fvwm-resetwallpaper
Source20: fvwm.ja.po
Source21: FvwmTaskBar.ja.po
Source22: FvwmScript.ja.po
Source30: Blue-Vine-theme.tar.bz2
Source31: fvwm2-backgrounds.tar.bz2
Source32: fvwm-system-styles.tar.bz2
Source40: Exit.png
Source41: fvwm-start.png
Source42: mlterm.png
##Patch0: fvwm-2.2.5-I18N_mb-2.1.patch
##Patch1: fvwm-2.2.2-vine.patch
##Patch2: fvwm-2.2.2-adhoc.patch
Patch10: fvwm2-config.patch
Patch11: fvwm-form-setup.patch
Patch12: fvwm-script-setup95.patch

BuildRequires: glibc-devel xorg-x11-proto-devel  libXpm-devel readline-devel
BuildRequires: ncurses-devel perl gtk+-devel imlib-devel libXft-devel
##BuildRequires: fribidi-devel libpng-devel librsvg2-devel libSM-devel
BuildRequires: libpng-devel librsvg2-devel libSM-devel
BuildRequires: libxslt-devel libXrender-devel libXinerama-devel libXt-devel
BuildRequires: libstroke-devel
BuildRequires: gnome-libs-devel audiofile-devel esound-devel alsa-lib-devel
Requires: glibc libXpm readline
Requires: ncurses perl >= 5.004 gtk+ imlib libXft
##Requires: fribidi libpng librsvg2 libSM
Requires: libpng librsvg2 libSM
Requires: libxslt libXrender libXinerama libXt libstroke
Requires: Gtk-Perl zenity xsri ImageMagick w3m
Requires: gnome-libs audiofile esound esound-libs alsa-lib
Buildroot: %{_tmppath}/%{name}-%{version}-root


%description
FVWM2 (the F stands for whatever you want, but the VWM stands for
Virtual Window Manager) is an improved version of the FVWM window
manager for the X Window System and shares the same characteristics as
FVWM.  

Install the fvwm2 package if you'd like to use the FVWM2 window manager.
If you install fvwm2, you'll also need to install fvwm2-icons.

%description -l ja
高機能でカラフルな X 用ウィンドウマネージャ fvwm2 (FVWM version 2) の
日本語版です。ウィンドウマネージャとは、X 上の各クライアントのウィンド
ウを操作(移動・リサイズ等)したり、枠を装飾したりするソフトウェアです。

%prep
%setup -n fvwm-%{version} -q -a 1 -a 30 -a 31 -a 32
##%patch0 -p1 -b .mb
##%patch1 -p1 -b .redhat
##%ifarch ppc
##%patch2 -p1 -b .adhoc
##%endif
%patch10 -p1 
%patch11 -p1 
%patch12 -p1 

cp -p %{SOURCE3} sample.fvwmrc/system.fvwm2rc
cp -p %{SOURCE4} sample.fvwmrc/system.fvwm2rc.ja
#cp -p %{SOURCE10} .
#cp -p %{SOURCE11} .
cp -p %{SOURCE20} %{SOURCE21} %{SOURCE22} po/

%build
%configure --enable-htmldoc --disable-bidi --disable-rplay

if [ "$SMP" != "" ]; then
  make -j$SMP "MAKE=make -j$SMP"
else
  make
fi

pushd po
make fvwm.ja.gmo
make FvwmScript.ja.gmo
make FvwmTaskBar.ja.gmo
popd

%install
# fvwm2 package
rm -rf %{buildroot}
mkdir -p %{buildroot}/%{_libexecdir}/%{name}/%{version}
%makeinstall
#----- startup script
%__install %{SOURCE10} %{buildroot}/%{_bindir}/
#----- wallpaper utility
%__install %{SOURCE12} %{SOURCE13} %{buildroot}%{_bindir}/
####%__install %{SOURCE13} %{buildroot}/%{_bindir}/
#----- desktop session entry file
%__mkdir -p %{buildroot}%{_datadir}/xsessions/
%__install -m0644 %{SOURCE11} %{buildroot}%{_datadir}/xsessions/
#----- fvwm config files
%__mkdir -p %{buildroot}%{_datadir}/fvwm/Blue-Vine-theme
%__install -m0644 Blue-Vine-theme/.fvwm2rc %{buildroot}%{_datadir}/fvwm/Blue-Vine-theme
%__install -m0644 Blue-Vine-theme/* %{buildroot}%{_datadir}/fvwm/Blue-Vine-theme
#----- wallpaper
%__mkdir -p %{buildroot}%{_datadir}/fvwm/backgrounds
%__install -m0644 fvwm2-backgrounds/* %{buildroot}%{_datadir}/fvwm/backgrounds
#----- mini icons
mkdir -p %{buildroot}%{_datadir}/icons/mini
install -m 644 icons/*.xpm %{buildroot}%{_datadir}/icons/mini/
install -m 644 %{SOURCE40} %{SOURCE41} %{SOURCE42} %{buildroot}%{_datadir}/icons/mini/
#----- modified styles
mkdir %{buildroot}%{_datadir}/fvwm/fvwm-system-styles/
install -m 644 fvwm-system-styles/* %{buildroot}%{_datadir}/fvwm/fvwm-system-styles/

# eliminate executable bit in %doc
#find docs/ -type f -perm +111 | xargs -r chmod -x


%clean
rm -rf %{buildroot}

#-----------------------------------
%files
%defattr(-,root,root)
#%doc AUTHORS COPYING INSTALL INSTALL.fvwm NEWS README
#%doc docs/ANNOUNCE docs/BUGS docs/COMMANDS docs/DEVELOPERS docs/FAQ docs/TODO
#%doc docs/error_codes docs/fvwm.lsm
%{_bindir}/*
%{_datadir}/*
%{_libexecdir}/fvwm/%{version}/*
#%dir %{_libexecdir}/fvwm/%{version}



%changelog
* Sat Jun  4 2011 KATO Masashi <mkato@par.odn.ne.jp> 2.7.0-2
- added BuildRequires: gnome-libs-devel audiofile-devel \
    esound-devel alsa-lib-devel
- added Requires: gnome-libs audiofile esound esound-libs alsa-lib

* Mon May 16 2011 KATO Masashi <mkato@par.odn.ne.jp> 2.7.0-1
- new upstream release
- added configure option "--disable-bidi" 

* Mon Aug 30 2010 KATO Masashi <mkato@par.odn.ne.jp> 2.5.31-1
- new upstream release
- added BUildRequires libstroke-devel, Requires libstroke 
-     (for mouse stroke support)
- update Japanese document
- added some wallpapers

* Wed May 26 2010 KATO Masashi <mkato@par.odn.ne.jp> 2.5.30-1
- new upstream release

* Wed Apr  2 2010 KATO Masashi <mkato@par.odn.ne.jp> 2.5.29-1
- new upstream release

* Fri Feb 19 2010 KATO Masashi <mkato@par.odn.ne.jp> 2.5.28-2
- moved desktop-entry to %{_datadir}/xsessions/

* Sat Oct  3 2009 KATO Masashi <mkato@par.odn.ne.jp> 2.5.28-1
- new upstream release

* Sun Aug 30 2009 KATO Masashi <mkato@par.odn.ne.jp> 2.5.27-2
- update documents(converted text to html)

* Mon Aug 17 2009 KATO Masashi <mkato@par.odn.ne.jp> 2.5.27-1
- new upstream release
- dropped patchs(0-2)
- added patch10(for Japanese translation)
- added patch11,12(prevents garbled characters)
- added po files(fvwm.ja.po,FvwmScript.ja.po,FvwmTaskBar.ja.po).
- added theme files(Blue-Vine)
- added dm-session entry
- added startup script

* Thu Nov 28 2002 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 2.2.5-0vl4
- rebuilt with new toolchain

* Tue Jan 29 2002 Toru Sagami <sagami@vinelinux.org> 2.2.5-0vl3
- eliminate executable bit in %doc (requierment for /bin/sh)

* Thu Jul 12 2001 <sagami@vinelinux.org>
- 2.2.5-0vl2: added COPYING README.mb docs

* Mon Feb 26 2001 Toru Sagami <czs14350@mb.infoweb.ne.jp>
- 2.2.5-0vl1

* Mon Dec 25 2000 Toru Sagami <czs14350@mb.infoweb.ne.jp>
- 2.2.4-0vl4
- fixed fvwm2rc for Vine 2.1+

* Sun Nov 12 2000 MACHINO, Satoshi <machino@vinelinux.org> 2.2.4-0vl2
- build on gcc-2.95.3
- partially used rpmmacros

* Mon Oct 16 2000 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rhythmaning.org>
- 2.2.4-0vl2
- added ad-hoc patch to stop segfaults on ppc
  (va_* in fvwm/{read,misc}.c should be faulty though...)

* Mon Feb  7 2000 Yasuyuki Furukawa <furukawa@vinelinux.org>
- update to 2.2.4

* Mon Nov  8  1999 Yasuyuki Furukawa <furukawa@vinelinux.or>, Vine vl3,vl4
- update fontset_wrapper patch(I18N)
- make default menu NLS (English/Japanese).

* Wed Oct 20 1999 Jun Nishii <jun@flatout.org>
- modify default menu

* Tue Oct 19 1999 Jun Nishii <jun@flatout.org>
- build with jp patch by Mr. Furukawa

* Thu Sep 23 1999 Preston Brown <pbrown@redhat.com>
- added ability to read wmconfig generated menu (# 2665)

* Thu Sep 09 1999 Preston Brown <pbrown@redhat.com>
- removed compatibility icon pak.

* Fri Aug 27 1999 Preston Brown <pbrown@redhat.com>
- 2.2.2 bugfix release

* Fri Apr 09 1999 Preston Brown <pbrown@redhat.com> 
- added some icons from kdebase back to this package for upgrade
- compatibility.

* Wed Mar 24 1999 Bill Nottingham <notting@redhat.com>
- don't require xterm-color

* Mon Mar 22 1999 Preston Brown <pbrown@redhat.com>
- better default system.fvwm2rc

* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> 
- auto rebuild in the new build environment (release 2)

* Fri Feb 26 1999 Cristian Gafton <gafton@redhat.com>
- package is still not finished yet
- upgraded to 2.2, got rid of all the cruft in the spec file

* Thu Sep 24 1998 Cristian Gafton <gafton@redhat.com>
- updated to 2.0.47
- mark config files as %config files

* Mon Jun 29 1998 Michael Maher <mike@redhat.com>
- removed duplicate files found in the package Another level.
- fixes bug: 651 

* Thu May 07 1998 Prospector System <bugs@redhat.com>
- translations modified for de, fr, tr

* Fri May 01 1998 Cristian Gafton <gafton@redhat.com>
- long time no new version released :-(. -> misc patch
- major spec file cleanups

* Mon Nov 03 1997 Cristian Gafton <gafton@redhat.com>
- Fixed more bugs (bugs patch)

* Fri Oct 24 1997 Cristian Gafton <gafton@redhat.com>
- fixed Alpha build

* Thu Oct 16 1997 Cristian Gafton <gafton@redhat.com>
- fixed FvwmTaskBar severe bug (taskbar patch)
- misc fixes

* Mon Oct 13 1997 Cristian Gafton <gafton@redhat.com>
- built against glibc; added -rh and -fixes patches