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