Installing Wt on Opensuse

Version 6 (Wim Dumon, 05/18/2011 11:36 pm)

1 1
h1. Installing Wt on Opensuse
2 1
3 1
*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.*
4 1
5 1
* you need a couple of libraries - most stuff is already on CDs
6 3 Pieter Libin
 <pre>
7 3 Pieter Libin
 yast --install cmake Xerces-c-devel boost-devel
8 3 Pieter Libin
 </pre>
9 1
* FastCGI is in the factory at repos.opensuse.org
10 3 Pieter Libin
 <pre> wget http://repos.opensuse.org:/devel:/libraries:/c_c++/SUSE_Linux_10.1/i586/FastCGI-2.4.0-3.1.i586.rpm
11 1
 wget http://repos.opensuse.org:/devel:/libraries:/c_c++/SUSE_Linux_10.1/i586/FastCGI-devel-2.4.0-3.1.i586.rpm
12 1
 sudo rpm -i FastCGI-2.4.0-3.1.i586.rpm FastCGI-devel-2.4.0-3.1.i586.rpm </pre>
13 1
* 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
14 3 Pieter Libin
 <pre> rpmbuild -ba wt-library.spec </pre>
15 1
* sudo rpm -i /your/own/rpm/RPMS/i586/wt-library-1.99.2.i586.rpm
16 3 Pieter Libin
 <pre>
17 1
%define nam wt
18 1
%define version 1.99.2
19 1
%define majorversion 1
20 1
%define release 0.1
21 1
22 1
Summary: WT Library
23 1
Name: %{nam}-library
24 1
Version: %{version}
25 1
Release: %{release}
26 1
Source0: %{nam}-%{version}.tar.gz
27 1
License: GPL
28 1
Group: Development/Libraries
29 1
URL: http://witty.sourceforge.net
30 1
BuildRoot: %{_tmppath}/%{nam}-buildroot
31 1
Prefix: %{_prefix}
32 1
BuildRequires: gcc-c++
33 1
BuildRequires: FastCGI-devel
34 1
BuildRequires: Xerces-c-devel
35 1
BuildRequires: boost-devel
36 1
BuildRequires: cmake
37 1
Requires: boost
38 1
Requires: FastCGI
39 1
Requires: Xerces-c
40 1
41 1
%package devel
42 1
Summary: WT Library
43 1
Group: Development/Libraries
44 1
Requires: FastCGI-devel
45 1
Requires: Xerces-c-devel
46 1
47 1
%description
48 1
WT Library
49 1
50 1
%description devel
51 1
WT Library
52 1
53 1
%define cmake_install_prefix -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix}
54 1
%define cmake_build_shared_libs -DBUILD_SHARED_LIBS:BOOL=ON
55 1
56 1
%prep
57 1
%setup -q -n %nam-%version
58 1
mkdir build
59 1
cd build && cmake ../ %{?cmake_install_prefix} %{?cmake_build_shared_libs}
60 1
61 1
%build
62 1
cd build && make
63 1
64 1
%install
65 1
rm -rf $RPM_BUILD_ROOT
66 1
cd build && make install DESTDIR=%buildroot
67 1
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; }
68 1
69 1
%clean
70 1
rm -rf $RPM_BUILD_ROOT
71 1
72 1
%files
73 1
%defattr(-,root,root)
74 1
  %_libdir/*
75 1
76 1
%files devel
77 1
%defattr(-,root,root)
78 1
  %_includedir/*
79 1
80 1
%changelog
81 1
82 1
# end of file
83 3 Pieter Libin
 </pre>