Project

General

Profile

Installing Wt on Opensuse » History » Revision 4

Revision 3 (Pieter Libin, 10/29/2009 02:02 PM) → Revision 4/6 (Pieter Libin, 10/29/2009 02:03 PM)

h1. Installing Wt on Opensuse 

 {{toc}} 

 *This page needs to be updated for Wt 2.x.x. The dependency for Xerces has been dropped, and instead Mini-XML is used now. Also, Wt 2.x.x comes with a built-in httpd which can be used as an alternative for FastCGI based deployment.* 

 * you need a couple of libraries - most stuff is already on CDs 
  <pre> 
  yast --install cmake Xerces-c-devel boost-devel 
  </pre> 
 * FastCGI is in the factory at repos.opensuse.org 
  <pre> wget http://repos.opensuse.org:/devel:/libraries:/c_c++/SUSE_Linux_10.1/i586/FastCGI-2.4.0-3.1.i586.rpm 
  wget http://repos.opensuse.org:/devel:/libraries:/c_c++/SUSE_Linux_10.1/i586/FastCGI-devel-2.4.0-3.1.i586.rpm 
  sudo rpm -i FastCGI-2.4.0-3.1.i586.rpm FastCGI-devel-2.4.0-3.1.i586.rpm </pre> 
 * Don't install anything directly - do always use an rpm spec script. Here is one, just put the *.tar.gz into /your/own/rpm/SOURCES and call 
  <pre> rpmbuild -ba wt-library.spec </pre> 
 * sudo rpm -i /your/own/rpm/RPMS/i586/wt-library-1.99.2.i586.rpm 
  <pre> 
 %define nam wt 
 %define version 1.99.2 
 %define majorversion 1 
 %define release 0.1 

 Summary: WT Library 
 Name: %{nam}-library 
 Version: %{version} 
 Release: %{release} 
 Source0: %{nam}-%{version}.tar.gz 
 License: GPL 
 Group: Development/Libraries 
 URL: http://witty.sourceforge.net 
 BuildRoot: %{_tmppath}/%{nam}-buildroot 
 Prefix: %{_prefix} 
 BuildRequires: gcc-c++ 
 BuildRequires: FastCGI-devel 
 BuildRequires: Xerces-c-devel 
 BuildRequires: boost-devel 
 BuildRequires: cmake 
 Requires: boost 
 Requires: FastCGI 
 Requires: Xerces-c 

 %package devel 
 Summary: WT Library 
 Group: Development/Libraries 
 Requires: FastCGI-devel 
 Requires: Xerces-c-devel 

 %description 
 WT Library 

 %description devel 
 WT Library 

 %define cmake_install_prefix -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} 
 %define cmake_build_shared_libs -DBUILD_SHARED_LIBS:BOOL=ON 

 %prep 
 %setup -q -n %nam-%version 
 mkdir build 
 cd build && cmake ../ %{?cmake_install_prefix} %{?cmake_build_shared_libs} 

 %build 
 cd build && make 

 %install 
 rm -rf $RPM_BUILD_ROOT 
 cd build && make install DESTDIR=%buildroot 
 cd %buildroot%_libdir && { for lib in lib%{nam}*.so; do mv $lib $lib.%{version} ; ln -s $lib.%{version} $lib.%{majorversion} ; ln -s $lib.%{majorversion} $lib ; done; } 

 %clean 
 rm -rf $RPM_BUILD_ROOT 

 %files 
 %defattr(-,root,root) 
   %_libdir/* 

 %files devel 
 %defattr(-,root,root) 
   %_includedir/* 

 %changelog 

 # end of file 
  </pre>