File wt.spec of Package wt

#
# spec file for package wt (Version 2.1.5)
#
# Copyright (c) 2008 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/
#

# norootforbuild


Name:           wt
Url:            http://www.webtoolkit.eu/wt/
License:        GPL v2 only
Group:          Development/Libraries/C and C++
AutoReqProv:    on
Version:        2.1.5
Release:        36
Summary:        Web Toolkit
Source0:        %{name}-%{version}.tar.bz2
Patch1:         %{name}-%{version}-cmake_config.patch
Patch2:         fix-include-condition-hpp.patch
Requires:       FastCGI openssl Xerces-c
Requires:       mxml >= 2.3
BuildRequires:  gcc-c++
BuildRequires:  FastCGI-devel Xerces-c-devel openssl-devel
BuildRequires:  boost-devel >= 1.34.1
BuildRequires:  mxml-devel >= 2.3
BuildRequires:  cmake pkgconfig
BuildRequires:  fdupes
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Wt is a C++ library and application server for developping and
deploying web applications. The widget-centric API is inspired by
existing C++ GUI APIs.	It offers complete abstraction of any
web-specific implementation details.  Most imporantly, the entire
application is written in only one compiled language (C++), from which
the library generates the necessary HTML, Javascript, CGI, and AJAX
code.



Authors:
--------
    Koen Deforche (koen.deforche@gmail.com)
    Abdiel Janulgue (xynopsis@yahoo.com)
    Wim Dumon (wim.dumon@gmail.com)

%package        devel
License:        GPL v2 only
Summary:        Web Toolkit
Group:          Development/Libraries/C and C++
Requires:       FastCGI-devel openssl-devel Xerces-c-devel
Requires:       boost-devel >= 1.34.1
Requires:       mxml-devel >= 2.3
Requires:       %{name} = %{version}

%description devel
Wt is a C++ library and application server for developping and
deploying web applications. The widget-centric API is inspired by
existing C++ GUI APIs.	It offers complete abstraction of any
web-specific implementation details.  Most imporantly, the entire
application is written in only one compiled language (C++), from which
the library generates the necessary HTML, Javascript, CGI, and AJAX
code.



Authors:
--------
    Koen Deforche (koen.deforche@gmail.com)
    Abdiel Janulgue (xynopsis@yahoo.com)
    Wim Dumon (wim.dumon@gmail.com)

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

%build
%define WTSRVDIR /srv/wt
# path to runtime session data
%define WTRUNDIR %{WTSRVDIR}/run 
# webserve user and group
%define WTRUNUSER wwwrun 
%define WTRUNGROUP www 
mkdir wt-build
cd wt-build
CFLAGS=$RPM_OPT_FLAGS CXXFLAGS="$RPM_OPT_FLAGS" \
cmake .. \
    -DCMAKE_INSTALL_PREFIX="/usr" \
    -DLIB_INSTALL_DIR=%{_lib} \
    -DCONNECTOR_HTTP=OFF \
    -DCONNECTOR_FCGI=ON \
    -DEXAMPLES_CONNECTOR="" \
    -DWEBGROUP="%{WTRUNGROUP}" -DWEBUSER="%{WTRUNUSER}" \
    -DRUNDIR="%{WTRUNDIR}"
make %{?jobs:-j%jobs} VERBOSE=1

%install
cd wt-build
make DESTDIR="%{buildroot}" install
# hack for broken cmake configs on archs with /lib64
%ifarch ppc64 s390x x86_64
mv %{buildroot}/usr/lib/* %{buildroot}/usr/%{_lib} || true
rm -Rf %{buildroot}/usr/lib
%endif
# end hack
mkdir -p %{buildroot}%{_docdir}/%{name}
mkdir -p %{buildroot}%{WTSRVDIR}
mkdir -p %{buildroot}%{WTRUNDIR}
sed "s /usr/wt/run %{WTRUNDIR} " < ../wt_config.xml > ../wt_config.xml.example
mkdir %{buildroot}%{_docdir}/%{name}-devel/
cp -rv ../doc/* %{buildroot}%{_docdir}/%{name}-devel/
mv -v %{buildroot}%{_datadir}/Wt %{buildroot}%{_datadir}/wt
%fdupes %{buildroot}%{_docdir}

%clean
# ODKOMENTOVAT !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# rm -rf "%{buildroot}"

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root)
%{_libdir}/*.so.%{version}
%doc AUTHORS BUGS Changelog INSTALL LICENSE
%doc wt_config.xml.example
%dir %{WTSRVDIR}
%dir /etc/wt
%{_datadir}/wt
%config /etc/wt/wt_config.xml
%attr(-,%{WTRUNUSER},%{WTRUNGROUP}) %{WTRUNDIR}

%files devel
%defattr(-,root,root)
%{_includedir}/*
%exclude %{_libdir}/*.so.%{version}
%{_libdir}/*.so.*
%{_libdir}/*.so
%doc %{_docdir}/%{name}-devel
%{_datadir}/cmake/Modules/*

%changelog
* Sun Nov 30 2008 coolo@suse.de
- there is no boost anymore and the requires should be over
  shared libs anyway (bnc#450287)
* Wed Oct 29 2008 puzel@suse.cz
- fix-include-condition-hpp.patch - fix build
* Sat Jul 26 2008 puzel@suse.cz
- update to 2.1.5
  * rich-text editor (WTextEdit) added
  * API for interactive areas on WImage and WPaintedWidget
  * configurable logging
  * bug fixes
- do not use interactive cp (cp -i) in specfile
* Mon Jul 07 2008 puzel@suse.cz
- updated to 2.1.4
  * layout managers for plain Wt container widgets
  * a new API for controlling the embedded web server (WServer)
  * Wt applications now validate using the W3C (X)HTML validator
  * preliminary support for AJAX on old IE Mobile browser
  * support for integrating Wt in Qt-based applications
  * bug fixes
  * new configuration file: /etc/wt/wt_config.xml
* Mon Jun 30 2008 puzel@suse.cz
- update to 2.1.3
  - adds a new charting library
- removed wt-2.1.2-missing_includes.patch (fixed in upstream)
- LIB_INSTALL_DIR is now a relative path
* Fri Apr 18 2008 pcerny@suse.cz
- update to 2.1.2 (details in package Changelog)
  * wt-2.1.2-cmake_config.patch - fixes broken cmake config files
- removed -fpermissive (building against boost 1.34.1 works now)
* Fri Feb 01 2008 pcerny@suse.cz
- upgrade to 2.0.6
  * removed patches included in upstream
  (wt-2.0.3-libinstdir.patch, wt-2.0.3-rundir.patch)
  * added missing includes (wt-2.0.6-missing_includes.patch)
  * temporary fix to build against boost 1.33 with gcc 4.3
  (-fpermissive)
* Mon Sep 03 2007 schwab@suse.de
- Use $RPM_OPT_FLAGS.
* Mon Jul 09 2007 pcerny@suse.cz
- initial package created v2.0.3
openSUSE Build Service is sponsored by