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