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