Commit | Line | Data |
---|---|---|
6cb16c21 KK |
1 | # @HAVE_LIBI2NCOMMON_TRUE@%define with_libi2ncommon 1 |
2 | # @HAVE_LIBI2NCOMMON_FALSE@%define with_libi2ncommon 0 | |
3 | # @HAVE_LIBT2N_TRUE@%define with_libt2n 1 | |
4 | # @HAVE_LIBT2N_FALSE@%define with_libt2n 0 | |
5 | %define with_libi2ncommon 1 | |
6 | %define with_libt2n 1 | |
9ce4fe3f RP |
7 | |
8 | Summary: library with asynchronous io functionality | |
9 | Name: libasyncio | |
10 | Version: @VERSION@ | |
11 | Release: 1 | |
12 | License: GPL version 2 + linking exception | |
d3ca0315 | 13 | Group: Intra2net |
9ce4fe3f RP |
14 | Vendor: Intra2net AG |
15 | Source: %{name}-%{version}.tar.gz | |
6cb16c21 | 16 | # Buildroot: /tmp/%{name}-%{version}-root |
9ce4fe3f RP |
17 | Prefix: /usr |
18 | Requires: libi2ncommon >= 1.0 | |
6cb16c21 | 19 | Requires: boost >= 1.32.0 |
623f402c | 20 | Requires: libasyncio-utils = %{version} |
6cb16c21 | 21 | # BuildRequires: libtool |
9ce4fe3f RP |
22 | BuildRequires: boost-devel >= 1.32.0 |
23 | Obsoletes: libsimpleio | |
24 | ||
25 | %description | |
26 | library with asynchronous io functionality | |
27 | ||
28 | ||
29 | %package devel | |
30 | Summary: library with asynchronous io functionality | |
d3ca0315 | 31 | Group: Intra2net/Development |
9ce4fe3f RP |
32 | Requires: libi2ncommon-devel |
33 | Requires: boost-devel >= 1.32.0 | |
34 | Obsoletes: libsimpleio-devel | |
35 | ||
36 | ||
37 | %description devel | |
38 | development files for library with asynchronous io functionality | |
39 | ||
40 | ||
41 | %package utils | |
42 | Summary: library with asynchronous io functionality | |
d3ca0315 | 43 | Group: Intra2net |
6cb16c21 | 44 | %if %{with libi2ncommon} |
9ce4fe3f RP |
45 | Requires: libi2ncommon >= 1.0 |
46 | %endif | |
6cb16c21 | 47 | Requires: boost >= 1.32.0 |
9ce4fe3f RP |
48 | |
49 | %description utils | |
50 | A collection of util function and classes used within asyncio, but | |
51 | are also usable for other purposes, too. | |
52 | ||
53 | ||
54 | %package utils-devel | |
55 | Summary: library with asynchronous io functionality | |
d3ca0315 | 56 | Group: Intra2net/Development |
f430a825 | 57 | Requires: boost-devel >= 1.32.0 |
9ce4fe3f RP |
58 | |
59 | %description utils-devel | |
60 | development files for asyncio utils. | |
61 | ||
62 | ||
6cb16c21 | 63 | %if %{with libt2n} |
9ce4fe3f RP |
64 | %package t2n |
65 | Summary: glue library for using t2n with libasyncio | |
d3ca0315 | 66 | Group: Intra2net |
9ce4fe3f RP |
67 | BuildRequires: libt2n-devel >= 0.4 |
68 | Requires: libt2n >= 0.4 | |
69 | Obsoletes: libsimpleio-t2n | |
70 | ||
71 | %description t2n | |
72 | glue lib for using t2n with simpleio. | |
73 | ||
74 | ||
75 | %package t2n-devel | |
76 | Summary: glue library for using t2n with libasyncio | |
d3ca0315 | 77 | Group: Intra2net/Development |
9ce4fe3f RP |
78 | Requires: libt2n-devel >= 0.4 |
79 | ||
80 | %description t2n-devel | |
81 | development files for glue lib for using t2n with simpleio. | |
82 | %endif | |
83 | ||
84 | ||
85 | ||
86 | %prep | |
87 | %setup -q | |
88 | ||
89 | %build | |
90 | export PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/intranator/lib/pkgconfig | |
6cb16c21 KK |
91 | # autoreconf --force -i |
92 | # ./configure $RPM_BUILD_WITH_OPTIMIZE --prefix=%{prefix} | |
9ce4fe3f | 93 | |
6cb16c21 KK |
94 | mkdir build |
95 | cd build | |
96 | ||
96ac2685 KK |
97 | export CFLAGS="$RPM_OPT_FLAGS" |
98 | export CXXFLAGS="$RPM_OPT_FLAGS" | |
6cb16c21 KK |
99 | |
100 | CMAKE_OPTS="" | |
101 | %if %{with libi2ncommon} | |
102 | CMAKE_OPTS="$CMAKE_OPTS -DWITH_LIBI2NCOMMON=ON" | |
103 | %endif | |
104 | %if %{with libt2n} | |
105 | CMAKE_OPTS="$CMAKE_OPTS -DWITH_LIBT2N=ON" | |
106 | %endif | |
107 | ||
108 | cmake -DCMAKE_INSTALL_PREFIX="%{prefix}" $CMAKE_OPTS ../ | |
109 | ||
110 | dmake %{?_smp_mflags} | |
111 | ||
436fb144 | 112 | export BOOST_TEST_LOG_LEVEL=test_suite |
6cb16c21 | 113 | dmake check |
9ce4fe3f RP |
114 | |
115 | %install | |
6cb16c21 | 116 | cd build |
9ce4fe3f RP |
117 | make DESTDIR=$RPM_BUILD_ROOT install |
118 | ||
9a820dfd TJ |
119 | # Remove unpackaged files |
120 | rm -f $RPM_BUILD_ROOT/usr/lib/libasyncio_utils.a | |
121 | rm -f $RPM_BUILD_ROOT/usr/lib/libasyncio_utils.la | |
122 | ||
9ce4fe3f RP |
123 | %clean |
124 | rm -fr $RPM_BUILD_ROOT | |
125 | ||
126 | %post | |
127 | /sbin/ldconfig | |
128 | ||
129 | %files | |
130 | %defattr(-,root,root) | |
131 | %doc LICENSE COPYING.GPL | |
132 | %{prefix}/lib/libasyncio.so* | |
133 | ||
623f402c | 134 | %files devel -f build/headerlist.asyncio |
9ce4fe3f RP |
135 | %defattr(-,root,root) |
136 | %{prefix}/lib/libasyncio.*a* | |
137 | %{prefix}/lib/pkgconfig/libasyncio.pc | |
138 | ||
139 | ||
140 | %files utils | |
141 | %defattr(-,root,root) | |
142 | %{prefix}/lib/libasyncio_utils.so* | |
143 | ||
144 | ||
623f402c | 145 | %files utils-devel -f build/headerlist.utils |
9ce4fe3f RP |
146 | %defattr(-,root,root) |
147 | %{prefix}/lib/libasyncio.*a* | |
148 | %{prefix}/lib/pkgconfig/libasyncio_utils.pc | |
149 | ||
6cb16c21 | 150 | %if %{with libt2n} |
9ce4fe3f RP |
151 | %files t2n |
152 | %defattr(-,root,root) | |
153 | %doc LICENSE | |
154 | %{prefix}/lib/libasyncio_t2n.so* | |
155 | ||
156 | %files t2n-devel | |
157 | %defattr(-,root,root) | |
158 | %{prefix}/lib/libasyncio_t2n.*a* | |
159 | %{prefix}/lib/pkgconfig/libasyncio_t2n.pc | |
160 | %{prefix}/include/asyncio_t2n*.hpp | |
161 | %endif |