Project

General

Profile

Installing Wt on Opensuse » History » Version 3

Pieter Libin, 10/29/2009 02:02 PM

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