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