Commit | Line | Data |
---|---|---|
80156cdf TJ |
1 | %bcond_with Intra2net |
2 | %bcond_with xmllib | |
652f47a7 | 3 | %bcond_with imap_utf7_support |
80156cdf TJ |
4 | |
5 | # Detect Intra2net build environment | |
6 | %if %{with Intra2net} | |
7 | %define with_xmllib 1 | |
652f47a7 | 8 | %define with_imap_utf7_support 1 |
80156cdf TJ |
9 | %endif |
10 | ||
e93545dd GE |
11 | Summary: library with functions common in Intra2net programs |
12 | Name: libi2ncommon | |
13 | Version: ##VERSION## | |
b599d4b1 | 14 | Release: 1 |
0e23f538 | 15 | License: GPLv2 + linking exception |
f9f14e9c | 16 | Group: Development/Libraries |
e93545dd GE |
17 | Vendor: Intra2net AG |
18 | Source: %{name}-%{version}.tar.gz | |
5ff2acd9 | 19 | Requires: libi2ncommon-utils = %{version} |
e93545dd | 20 | BuildPrereq: libtool |
5ff2acd9 | 21 | BuildRequires: boost-devel >= 1.32.0 |
bb5b934a | 22 | Obsoletes: libgettext |
16c2256f | 23 | |
e93545dd GE |
24 | |
25 | %description | |
26 | library with functions common in Intra2net programs | |
27 | ||
28 | %package devel | |
29 | Summary: library with functions common in Intra2net programs | |
30 | Group: Intranator/Development | |
5ff2acd9 | 31 | Requires: libi2ncommon = %{version} |
16c2256f RP |
32 | Requires: boost-devel >= 1.32.0 |
33 | ||
e93545dd GE |
34 | |
35 | %description devel | |
36 | library with functions common in Intra2net programs | |
37 | ||
23d53eb1 RP |
38 | |
39 | %package config | |
40 | Summary: library with a config module | |
41 | Group: Intranator | |
42 | Requires: libi2ncommon = %{version} | |
43 | ||
44 | %description config | |
45 | library with a config module. | |
46 | The config module provides a global configuration system with decentralized | |
47 | declaration of the config variables. | |
48 | ||
80156cdf | 49 | %if %{with xmllib} |
ce6792dd TJ |
50 | %package xml |
51 | Summary: library with a xml module | |
52 | Group: Intranator | |
53 | Requires: libi2ncommon = %{version} | |
54 | ||
55 | %description xml | |
56 | The xml module provides common xml functions. | |
80156cdf | 57 | %endif |
23d53eb1 | 58 | |
f3311b30 TJ |
59 | %package utils |
60 | Summary: library with open source utility modules | |
61 | Group: Intranator | |
62 | License: GPL version 2 + linking exception | |
63 | ||
64 | %description utils | |
65 | Library with open source utility modules. | |
66 | ||
e93545dd GE |
67 | %prep |
68 | %setup -q | |
69 | ||
70 | %build | |
71 | export PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/intranator/lib/pkgconfig | |
e93545dd | 72 | |
263b5807 TJ |
73 | mkdir build |
74 | cd build | |
75 | ||
76 | export CFLAGS="$RPM_OPT_FLAGS" | |
77 | export CXXFLAGS="$RPM_OPT_FLAGS" | |
80156cdf TJ |
78 | |
79 | CMAKE_OPTS="" | |
80 | %if %{with xmllib} | |
81 | CMAKE_OPTS="$CMAKE_OPTS -DBUILD_XMLLIB=ON" | |
82 | %endif | |
652f47a7 TJ |
83 | %if %{with imap_utf7_support} |
84 | CMAKE_OPTS="$CMAKE_OPTS -DIMAP_UTF7_SUPPORT=ON" | |
85 | %endif | |
80156cdf TJ |
86 | |
87 | cmake -DCMAKE_INSTALL_PREFIX="%{prefix}" $CMAKE_OPTS ../ | |
263b5807 TJ |
88 | |
89 | make %{?_smp_mflags} VERBOSE=1 | |
90 | ||
91 | %check | |
92 | cd build | |
93 | make check | |
e93545dd GE |
94 | |
95 | %install | |
263b5807 TJ |
96 | |
97 | cd build | |
e93545dd GE |
98 | make DESTDIR=$RPM_BUILD_ROOT install |
99 | ||
100 | %clean | |
101 | rm -fr $RPM_BUILD_ROOT | |
102 | ||
103 | %post | |
104 | /sbin/ldconfig | |
105 | ||
106 | %files | |
107 | %defattr(-,root,root) | |
0e23f538 | 108 | %doc COPYING.GPL |
f9f14e9c | 109 | %{_libdir}/libi2ncommon.so* |
e93545dd GE |
110 | |
111 | %files devel | |
112 | %defattr(-,root,root) | |
263b5807 TJ |
113 | # No static library for now |
114 | #%{prefix}/lib/*.*a* | |
f9f14e9c GE |
115 | %{_libdir}/libi2ncommon.so |
116 | %{_libdir}/pkgconfig/*.pc | |
e93545dd | 117 | %{prefix}/include/ |
23d53eb1 RP |
118 | |
119 | %files config | |
120 | %defattr(-,root,root) | |
0e23f538 | 121 | %doc COPYING.GPL |
f9f14e9c | 122 | %{_libdir}/libi2ncommon_config.so* |
23d53eb1 | 123 | |
80156cdf | 124 | %if %{with xmllib} |
ce6792dd TJ |
125 | %files xml |
126 | %defattr(-,root,root) | |
0e23f538 | 127 | %doc COPYING.GPL |
f9f14e9c | 128 | %{_libdir}/libi2ncommon_xml.so* |
80156cdf | 129 | %endif |
f3311b30 TJ |
130 | |
131 | %files utils | |
132 | %defattr(-,root,root) | |
0e23f538 | 133 | %doc COPYING.GPL |
f9f14e9c | 134 | %{_libdir}/libi2ncommon_utils.so* |