Name: wmakerconf
Version: 2.12
Release: 2%{?_dist_release}
Summary: Configuration tool for Window Maker
Summary(ja): Window Maker の設定ツール

License: GPL
Group: User Interface/Desktops
Icon: wmakerconf.xpm
Source: http://downloads.sf.net/%{name}/wmakerconf_%{version}.tar.gz
Source1: wmakerconf-2.12-ja.po
Source2: wmakerconf-2.11.data.ja.po

Patch0:        %{name}-2.9.dif
Patch1:        %{name}-fix-bad-po.patch
Patch3:        %{name}-2.9-destdir.patch
Patch4:        %{name}-2.9-config.patch
Patch5:        %{name}-no-imlib.patch
Patch7:        %{name}-2.9-varargs.diff
Patch9:        %{name}-datarootdir.patch
Patch10:       %{name}-2.12-wmaker-0.95_support.patch
# PATCH - Fix SUSE: implicit-pointer-decl
Patch11:       %{name}-implicit-pointer-decl.patch

Buildroot:     %{_tmppath}/%{name}-%{version}-root
BuildRequires: WindowMaker
BuildRequires: WindowMaker-devel >= 0.92.0
BuildRequires: bison
BuildRequires: gettext
BuildRequires: gtk2-devel >= 2.4.0
BuildRequires: perl-libwww-perl
BuildRequires: xdg-utils
BuildRequires: tar gzip bzip2
Requires:      WindowMaker
Requires:      xdg-utils
Obsoletes:     wmakerconf-data

Vendor:        Project Vine
Distribution:  Vine Linux

%description
wmakerconf is a GTK+ based configuration tool for the window manager
Window Maker. All attributes (including the application menu) can be
configured by wmakerconf, making it an alternative (or add-on) for the
built in Window Maker configuration tool WPrefs. Moreover, an easy
theme installation via WWW is available: a simple drag and drop
operation from your favorite browser to your wmakerconf themes
interface will do the job.

%description -l ja
wmakerconf は, Window Maker の各種設定を行う GTK+ ベースの ツールです.
フォント設定ブラウザ, pixmapブラウザ, 色選択ダイアログ, ショートカット
ダイアログ, ファイル選択ダイアログ等を搭載し, Window Makerの全ての属性
に関して, 容易に設定を行えます. WWW 経由で簡単に新しいテーマのインスト
ールもできます。好みのブラウザから、ドラッグ・アンド・ドロップでテーマ
のインストールをしてみてください。


%prep
%setup -q
%patch0 -p0
#patch1 -p0
#patch3 -p0
#patch4 -p0
#patch5 -p0
%patch7 -p0
%patch9 -p0
%patch10 -p0
%patch11 -p0

cp %{SOURCE1} po/ja.po
cp %{SOURCE2} data/po/ja.po

# instead of patch4
sed -i -e 's|libwww\.pl|scripts\/libwww\.pl|g' configure

%build
CFLAGS="$RPM_OPT_FLAGS `pkg-config --cflags gtk+-2.0`"
CPPFLAGS="$RPM_OPT_FLAGS `pkg-config --cflags gtk+-2.0`"
NLSDIR=%{_localedir}
LINGUAS="de es fr it ja"
GNUSTEP_LOCAL_ROOT='%{_prefix}/lib/GNUstep'
CPP_PATH=/lib/cpp
export CFLAGS CPPFLAGS NLSDIR LINGUAS GNUSTEP_LOCAL_ROOT CPP_PATH
./configure \
	--prefix=%{_prefix} \
	--includedir=%{_includedir} \
	--disable-imlibtest \
	--disable-upgrade \
	--with-webbrowser=xdg-open \
	--with-wmakerdataprefix=%{_datadir} \
	--with-wmakeretcprefix=%{_sysconfdir}/X11

make %{?_smp_mflags} LDFLAGS="-L%{_libdir}"


%install
rm -rf %{buildroot}
make \
	prefix=%{buildroot}%{_prefix} \
	bindir=%{buildroot}%{_bindir} \
	mandir=%{buildroot}%{_mandir} \
	GNOMEDIR=%{buildroot}%{_datadir}/gnome/apps/Setting \
	install

rm -f %{buildroot}/%{_datadir}/%{name}/{ABOUT-NLS,AUTHORS,COPYING}
rm -f %{buildroot}/%{_datadir}/%{name}/{ChangeLog,NEWS,NLS-TEAM?,README}


%clean
rm -rf %{buildroot}


%files
%defattr(-,root,root)
%doc ABOUT-NLS AUTHORS COPYING ChangeLog MANUAL NEWS NLS-TEAM* README TODO
%{_bindir}/*
%{_datadir}/%{name}/WMWmakerconf
%{_datadir}/%{name}/wmaker-version
%{_datadir}/%{name}/MANUAL
%{_datadir}/%{name}/*.sh
%{_datadir}/%{name}/*.pl
%{_datadir}/%{name}/*.xpm
%{_localedir}/*/LC_MESSAGES/%{name}-data.*
%{_localedir}/*/LC_MESSAGES/%{name}.*
%{_datadir}/applications/%{name}.desktop
%{_mandir}/man1/* 


%changelog
* Wed Feb 11 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 2.12-2
- added BR: xdg-utils, R: xdg-utils
- removed BR: libXpm-devel. libjpeg-devel, libtiff-devel, libwebp-devel

* Mon Feb  9 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 2.12-1
- updated to 2.12
- added Patch0, 7, 9, 10 and 11 from OpenSuSE
- removed BR: imlib-devel
- added BR: WindowMaker, WindowMaker-devel, libXpm-devel, libjpeg-devel,
  libtiff-devel, libwebp-devel and perl-libwww-perl

* Mon Feb 22 2010 Shu KONNO <owa@bg.wakwak.com> 2.11-2
- rebuilt with new toolchain

* Tue Jun 03 2008 Shu KONNO <owa@bg.wakwak.com> 2.11-1vl5
- applied new versioning policy and utf-8
- added BuildRequires: xorg-x11-devel

* Tue Nov 27 2007 Shu KONNO <owa@bg.wakwak.com> wmakerconf-2.11-0vl3
- changed automake14 to automake19 in %%build section
- added make script at end of %%build section
- updated wmakerconf-2.11.data.ja.po

* Sat Feb 25 2006 Shu KONNO <owa@bg.wakwak.com> wmakerconf-2.11-0vl2
- rebuilt for VineSeed

* Sun Nov 13 2005 Shu KONNO <owa@bg.wakwak.com> wmakerconf-2.11-0vl1
- updated wmakerconf to 2.11
- rebuilt with WindowMaker-0.12.0

* Wed Jul 17 2002 Jun Nishii <jun@vinelinux.org>
- 2.9-0vl1
- ver.up
- update ja.po

* Wed Aug 22 2001 Toru Sagami <sagami@vinelinux.org>
- 2.8.1-0vl1: source is now including Nishii's ja.po
- move /usr/X11R6 stuff to /usr except /usr/X11R6/bin

* Thu Aug 17 2000 Jun Nishii <jun@vinelinux.org>
- 2.6.2-0vl1
- update ja.po

* Fri Jul 21 2000 Yasuyuki Furukawa <furukawa@vinelinux.org>
- added w3m patch

* Wed Apr  5 2000 Jun Nishii <jun@vinelinux.org>
- updated to 2.6.1

* Mon Apr  3 2000 Yasuyuki Furukawa <furukawa@vinelinux.org>
- updated to 2.6
- modified ja.po files.
- removed patches merged.

* Wed Mar 15 2000 Yasuyuki Furukawa <furukawa@vinelinux.org>
- modified data-ja.po

* Wed Jan  5 2000 Jun Nishii <jun@vinelinux.org>
- change group

* Wed Dec 22 1999 Jun Nishii <jun@vinelinux.org>
- build for Vine Linux 2.0

* Sun Dec 5 1999 Ullrich Hafner <hafner@bigfoot.de>
- upgraded to wmakerconf 2.4
- make the data package part of wmakerconf 

* Mon Oct 18 1999 Steve Hamlin <steve@hamlinx.com>
- upgraded to wmakerconf 2.3
- applied preview crash patch (and fixed location mistake)
- added data package back, but now built separately 
- removed libPropList package
- relocated to /usr/X11R6 from /usr

* Sun Mar 14 1999 Ullrich Hafner <hafner@bigfoot.de>
- upgraded to wmakerconf 1.8
- removed data package
- new NLS structure

* Fri Feb 12 1999 Ullrich Hafner <hafner@bigfoot.de>
- upgraded to wmakerconf 1.7

* Wed Jan 20 1999 Ullrich Hafner <hafner@bigfoot.de>
- upgraded to wmakerconf 1.6

* Tue Dec 22 1998 Ullrich Hafner <hafner@bigfoot.de>
- upgraded to wmakerconf 1.5
- added prefix

* Thu Nov 19 1998 Ullrich Hafner <hafner@bigfoot.de>
- upgraded to wmakerconf 1.3
- updated data files for windowmaker 0.20.2 and above
- split into wmakerconf and wmakerconf-data package

* Sat Oct 10 1998 Cristian Gafton <gafton@redhat.com>
- strip binaries
- updated data files for windowmaker 0.20 and above

* Fri Sep 18 1998 Cristian Gafton <gafton@redhat.com>
- packaged for 5.2 to be used with WindowMaker
