Summary: A configuration tool for X window managers.
Summary(ja): ウィンドウ・マネージャ設定ツール
Name: wmconfig
%define version 0.9.8
Version: %{version}
Release: 1vl5
License: GPL
Group: User Interface/Desktops
Vendor: Project Vine
Distribution: Vine Linux
Packager: Yasuyuki Furukawa <furukawa@vinelinux.org>

Source: ftp://ftp.redhat.com/home/gafton/wmconfig/wmconfig-%{version}.tar.gz

# Patches for Vine
Patch100: wmconfig-0.9.8-noneed_libgnome.patch
Patch101: wmconfig-0.9.8-gnome_i18n_dir.patch
Patch102: wmconfig-0.9.8-gnome_terminal.patch
Patch103: wmconfig-0.9.8-short_lang.patch
Patch104: wmconfig-0.9.8-kde_i18n.patch
Patch105: wmconfig-0.9.8-ignorecase.patch
Patch106: wmconfig-0.9.8-vine.patch

BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires:  autoconf213, automake14

%description
The wmconfig program is a helper program which provides output for use
in configuring window managers.  Wmconfig will produce a list of menu
definitions for a specified X window manager (currently, FVWM2,
FVWM95, AfterStep, MWM, IceWM and KDE are supported).  Wmconfig's
output can be placed into your .rc file or you can use the output for
other configuration purposes.

%description -l ja
Wmconfigプログラムはウィンドウマネージャの設定のための出力を吐き出す、
補助プログラムです。Wmconfigは指定のXウィンドウマネージャ用のメニュー
定義の一覧を出力します。現在, Fvwm2, Fvwm95, AfterStep, MWM, IceWM,
KDEをサポートしています。
Wmconfig の出力は 自分の .rc ファイルへ置いたり、あるいは別の設定目的
で出力を利用することができます。

%prep
%setup -q
%patch100 -p1 -b .noneed_libgnome
%patch101 -p1 -b .gnome_i18n_dir
%patch102 -p1 -b .gnome_terminal
%patch103 -p1 -b .short_lang
%patch104 -p1 -b .kde_i18n
%patch105 -p1 -b .ignore_case
# If the vine patch is used, please modify the menus of fvwm2, too.
#%patch106 -p1 -b .vine

%build
# Workaround for legacy auto* tools
[ -x /usr/bin/autoconf-2.13 ] && ln -s /usr/bin/autoconf-2.13 autoconf
[ -x /usr/bin/autoheader-2.13 ] && ln -s /usr/bin/autoheader-2.13 autoheader
[ -x /usr/bin/aclocal-1.4 ] && ln -s /usr/bin/aclocal-1.4 aclocal
[ -x /usr/bin/automake-1.4 ] && ln -s /usr/bin/automake-1.4 automake
export PATH=`pwd`:$PATH
# End workaround

automake
autoconf
CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr/X11R6 \
	--enable-gnome
make

%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install-strip
mkdir -p $RPM_BUILD_ROOT/etc/X11/wmconfig

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
/usr/X11R6/bin/wmconfig
%dir /etc/X11/wmconfig
/usr/X11R6/man/man1/wmconfig.1*
%doc COPYING

%changelog
* Sat Jul 19 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.9.8-1vl5
- rebuilt with new toolchains
- add BuildRequires: autoconf213, automake14
- fixed BuildRoot to use rpmmacro
- s/Copyright/License/

* Fri Sep 08 2000 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rhythmaning.org>
- 0.9.8-1vl4
- modified %files section to handle compressed man page(s)

* Wed Mar 13 2000 Yasuyuki Furukawa <furukawa@vinelinux.org>
- modified gnome_dir_i18n and kde_i1n patches for KDE users

* Tue Feb 29 2000 Yasuyuki Furukawa <furukawa@vinelinux.org>
- added a ignorecase patch.

* Sun Feb 26 2000 Yasuyuki Furukawa <furukawa@vinelinux.org>
- updated 0.9.8
- added noneed_libgnome patch for nodepend to gnome libraries.
- added gnome_i18n_dir, gnome_terminal patch
- added vine(but not used) patch
- added short_lang and kde_i18n patch.
- enable gnome again

* Wed Jan 26 2000 Jun Nishii <jun@vinelinux.org>
- disable gnome

* Sat Oct 23 1999 Jun Nishii <jun@flatout.org>
- added %defattr in %files
