Installing Wt on Opensuse » History » Version 2
Pieter Libin, 10/29/2009 02:01 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 | 2 | Pieter Libin | <pre>yast --install cmake Xerces-c-devel boost-devel</pre> |
9 | 1 | Pieter Libin | * FastCGI is in the factory at repos.opensuse.org |
10 | 2 | 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 | 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 | 1 | Pieter Libin | * 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 | 2 | 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 | 2 | 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 | <pre> |
||
75 | %_libdir/* |
||
76 | </pre> |
||
77 | |||
78 | %files devel |
||
79 | %defattr(-,root,root) |
||
80 | <pre> |
||
81 | %_includedir/* |
||
82 | </pre> |
||
83 | |||
84 | %changelog |
||
85 | |||
86 | # end of file |
||
87 | 2 | Pieter Libin | </pre> |