File xclass.spec of Package xclass

#
# spec file for package xclass
#
# 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:           xclass
BuildRequires:  autoconf
BuildRequires:  gcc-c++
BuildRequires:  xorg-x11-devel
Version:        0.9.2
Release:        0
Summary:        Library for Uniform Presentation of fvwm95 Programs
License:        GPL-2.0+ ; LGPL-2.1+
Group:          System/Libraries
Url:            http://xclass.sourceforge.net/
Source:         %{name}-%{version}.tar.bz2
Patch0:         %{name}-%{version}-configs.patch
Patch1:         %{name}-%{version}-gcc-3.1.patch
Patch2:         %{name}-%{version}-gcc-4.0.patch
Patch3:         %{name}-%{version}-gcc-4.1.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
This package contains a library for uniform presentation of fvwm95
programs.

%package devel
Summary:        Library for Uniform Presentation of fvwm95 Programs - development files
License:        LGPL-2.1+
Requires:       %{name} = %{version}

%description devel
This package contains development files for xclass library.

%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2
%patch3

%build
autoconf
CXXFLAGS="$RPM_OPT_FLAGS" \
./configure --prefix=%{_prefix} \
	--libdir=%{_libdir} \
        --sysconfdir=/etc \
        --enable-debug=no
make shared
make all

%install
rm -rf $RPM_BUILD_ROOT
mv lib/libxclass/icons/*.xpm icons/
make DESTDIR=$RPM_BUILD_ROOT install 
make DESTDIR=$RPM_BUILD_ROOT install_shared
install -m 644 include/xclass/XCconfig.h $RPM_BUILD_ROOT%{_prefix}/include/XCconfig.h

%clean
rm -rf $RPM_BUILD_ROOT

%post
%run_ldconfig

%postun
%run_ldconfig

%files
%defattr(-,root,root)
%doc %{_defaultdocdir}/%{name}/
%config /etc/xclassrc
%{_datadir}/xclass/
%{_libdir}/libxclass.so.*

%files devel
%defattr(-,root,root)
%{_prefix}/bin/xc-config
%{_prefix}/include/XCconfig.h
%{_prefix}/include/xclass/
%{_libdir}/libxclass.a
%{_libdir}/libxclass.so

%changelog
openSUSE Build Service is sponsored by