%define extrafile WindowMaker-extra-0.1
%define vdata WindowMaker-VineDatas

Summary: Picutrers for WindowMaker
Summary(ja): WindowMaker で用いるアイコンや背景等の画像集
Name: WindowMaker-Icons
Version: 2.0
Release: 4%{?_dist_release}
Group: User Interface/Desktops
License: distributable for non-commercial use
Source0: ftp://windowmaker.org/pub/%{extrafile}.tar.gz
Source1: %{vdata}.tar.bz2
Buildarch: noarch
Buildroot: %{_tmppath}/%{name}-%{version}-root
Vendor: Project Vine
Distribution: Vine Linux

%description
Many icons, tiles, background for WindowMaker.

%description -l ja
WindowMaker でアイコンや背景, タイル等として用いる画像データ集です. 

%prep
%setup -q -a 1 -c -n WindowMaker-Datas

%build
# make extras
(cd %{extrafile}
./configure --prefix=%{_prefix}
)


%install
# install extras
(cd %{extrafile}
make DESTDIR=$RPM_BUILD_ROOT install
cd $RPM_BUILD_ROOT%{_datadir}/WindowMaker/Icons
mv xv.xpm  xv2.xpm 
)

# install pics in WindowMaker-DataVine
mkdir -p $RPM_BUILD_ROOT%{_datadir}/pixmaps
mkdir -p $RPM_BUILD_ROOT%{_datadir}/WindowMaker/{Backgrounds,Pixmaps,Icons,Themes}
(cd %{vdata}
install -m 644 Icons/*.xpm $RPM_BUILD_ROOT%{_datadir}/pixmaps
install -m 644 Tiles/*.xpm $RPM_BUILD_ROOT%{_datadir}/WindowMaker/Pixmaps
install -m 644 Vine/Icons/* $RPM_BUILD_ROOT%{_datadir}/WindowMaker/Icons
install -m 644 Vine/Tiles/* $RPM_BUILD_ROOT%{_datadir}/WindowMaker/Pixmaps
cp -r Vine/Themes/* $RPM_BUILD_ROOT%{_datadir}/WindowMaker/Themes/
)

# prepare docs
mkdir -p docs/WindowMaker-extra
cp %{extrafile}/{README,AUTHORS,COPYING,ChangeLog,INSTALL,NEWS} docs/WindowMaker-extra

mkdir -p docs/VineDatas
cp %{vdata}/README* docs/VineDatas
mkdir -p docs/VineDatas/Tiles
cp %{vdata}/Tiles/{COPYRIGHT,README} docs/VineDatas/Tiles
mkdir -p docs/VineDatas/Vine
cp %{vdata}/Vine/Themes/Vine-Themes/Vine-penguin/*.lsm docs/VineDatas/Vine
cp %{vdata}/Vine/Themes/Vine-Themes/Vine-can.themed/*.lsm docs/VineDatas/Vine

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc  docs/*
%{_datadir}/WindowMaker/Backgrounds/
%{_datadir}/WindowMaker/Pixmaps/*
%{_datadir}/WindowMaker/Icons/*
%{_datadir}/WindowMaker/Themes/*
%{_datadir}/pixmaps/*

%changelog
* Wed Jan  7 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 2.0-4
- rebuilt on current VineSeed

* Sat Apr 23 2011 Shu KONNO <owa@bg.wakwak.com> 2.0-3
- rebuilt with rpm-4.8.1-3

* Sun Feb 21 2010 Shu KONNO <owa@bg.wakwak.com> 2.0-2
- rebuilt with new toolchain

* Tue Jun 03 2008 Shu KONNO <owa@bg.wakwak.com> 2.0-1vl5
- applied new versioning policy and utf-8

* Sun Jul 13 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.0-0vl4
- use rpm macros %{_datadir}
- s/Copyright/License/

* Sat Jul 14 2001 <sagami@vinelinux.org>
- 2.1-0vl3: clean RPM_BUILD_ROOT at %%clean, not %%setup

* Sun Oct  1 2000 Jun Nishii <jun@vinelinux.org>
- 2.1-0vl2
- rename Vine3.themed as Vine-can.themed
- added lsm in Vine-penguin

* Thu Aug 31 2000 Jun Nishii <jun@vinelinux.org>
- 2.1-0vl1
- move background data to vine-backgrounds

* Sun Sep 26 1999 Jun Nishii <jun@flatout.org>
- new vine-themes
- new WiNGBlue

* Tue Jul 20 1999 Jun Nishii <jun@flatout.org>
- build for Vine-1.9

* Tue Apr 6 1999 Jun Nishii <jun@flatout.org>
- includes WindowMaker-extras for WindowMaker-0.52.0

* Tue Mar 16 1999 Jun Nishii <jun@flatout.org>
- updated WingBlue.style

* Sat Mar 13 1999 Jun Nishii <jun@flatout.org>
- updated Vine3.themed (thanks Mr. Takuya Fukuda)

* Sat Feb 27 1999 Jun Nishii <jun@flatout.org>
- added MonoTone.style

* Sat Feb 2 1999 Jun Nishii <jun@flatout.org>
- merge Themes for Vine which was in WindowMaker
- change WingBlue

* Tue Jan 2 1999 Jun Nishii <jun@flatout.org>
- added more icons and themes

* Sat Jan 2 1999 Jun Nishii <jun@flatout.org>
- a bit of diet

* Sun Dec 20 1998 Jun Nishii <jun@flatout.org>
- added more icons
