File fvwm-themes.spec of Package fvwm-themes

#
# spec file for package fvwm-themes
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

Name:           fvwm-themes
BuildRequires:  automake
BuildRequires:  fvwm2
BuildRequires:  xorg-x11-devel
License:        GPL-2.0+
Group:          System/GUI/Other
Version:        0.7.0
Release:        1.1
PreReq:         /usr/bin/perl /usr/bin/mkfifo
Requires:       fvwm2 >= 2.5.8, perl >= 5.002
Summary:        FVWM Configuration Framework
Url:            http://fvwm-themes.sourceforge.net/
Source0:        fvwm-themes-0.7.0.tar.bz2
#Patch0:         fvwm-themes-0.4.2-icon-names.patch
#Patch1:         fvwm-themes-0.4.2-menustyle-fontset.patch
#Patch2:         fvwm-themes-windowlook-fontset.patch
#Patch3:         fvwm-themes-modules-fontset.patch
#Patch5:         acdivert.patch
Patch1:         %{name}-head.patch
Patch2:         %{name}-configure.patch
Patch3:         %{name}-destdir.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%description
FVWM Themes is a powerful configuration framework for FVWM, designed to
be easily extendable and configurable.	It includes several prebuilt
themes and a pack of images and sounds.

%prep
%setup -q -n fvwm-themes-0.7.0
%patch1 -p1 -b .head
%patch2 -p1 -b .configure
%patch3 -p1

%build
autoreconf --force --install
export CFLAGS="$RPM_OPT_FLAGS"
./configure --prefix=%{_prefix} \
            --mandir=%{_mandir} \
            --disable-build-menus \
	    --without-gnome
make

%install
make DESTDIR=$RPM_BUILD_ROOT install
for i in %{_prefix}/share/fvwm/themes/current/theme.cfg \
	 %{_prefix}/share/fvwm/themes-rc \
	 %{_prefix}/share/fvwm/themes-rc-2 \
 	 %{_prefix}/share/fvwm/themes-rc-3 ; do
sed -e "s@$RPM_BUILD_ROOT@@g" < $RPM_BUILD_ROOT/$i > xxtmp
mv xxtmp $RPM_BUILD_ROOT/$i
done

%post
[ -x usr/X11R6/bin/fvwm-themes-menuapp ] && usr/X11R6/bin/fvwm-themes-menuapp --site --build-menus --remove-popup || true

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc AUTHORS COPYING INSTALL NEWS README TODO
%doc doc/FAQ doc/README.1st doc/colorsets doc/fvwm-themes.lsm
%{_prefix}/bin/*
%{_prefix}/share/fvwm/*
%{_mandir}/man?/*

%changelog
* Thu Dec  1 2011 coolo@suse.com
- add automake as buildrequire to avoid implicit dependency
* Mon Nov  8 2010 coolo@novell.com
- remove support for pre-9.1
* Tue Nov  3 2009 coolo@novell.com
- updated patches to apply with fuzz=0
* Thu Aug 21 2008 lmichnovic@suse.cz
- update to version 0.7.0
  * new themes
  * if xmessage is'n found invoke other dialog tools using FvwmPerl
  - requires fvwm > 2.5.8
- obsoleted patches: *icon-names.patch, *menustyle-fontset.patch,
  * windowlook-fontset.patch, *modules-fontset.patch, acdivert.patch
* Mon Aug 14 2006 mfabian@suse.de
- fix build in STABLE (move to X11R7).
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Mon Feb 23 2004 hmacht@suse.de
- building as non-root
* Mon Aug 25 2003 mfabian@suse.de
- update to 0.6.2.
* Tue Jul  1 2003 ro@suse.de
- remove traces of buildroot from installed files
* Fri Jun 13 2003 mfabian@suse.de
- fix "directory not owned by any package".
* Wed Apr  9 2003 ro@suse.de
- fix deprecated head calling syntax (-1)
- fix deprecated sort calling syntax in configure.in
* Fri Aug 16 2002 mfabian@suse.de
- add Prereq:       /usr/bin/perl /usr/bin/mkfifo
- xf86 -> x-devel-packages in # neededforbuild
* Thu Apr 26 2001 mfabian@suse.de
- correct icon names
- patch fonts to work with Japanese
* Tue Apr 24 2001 mfabian@suse.de
- new package: fvwm-themes, version 0.4.2