57dedb98e030c0a427e3d714ab21d412a46d8601
[libasyncio] / libasyncio.spec.in
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
7
8 Summary:   library with asynchronous io functionality
9 Name:      libasyncio
10 Version:   @VERSION@
11 Release:   1
12 License:   GPL version 2 + linking exception
13 Group:     Intranator
14 Vendor:    Intra2net AG
15 Source:    %{name}-%{version}.tar.gz
16 # Buildroot: /tmp/%{name}-%{version}-root
17 Prefix:    /usr
18 Requires:  libi2ncommon >= 1.0
19 Requires:   boost >= 1.32.0
20 Requires:  libasyncio-utils = %{version}
21 # BuildRequires: libtool
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
31 Group:     Intranator/Development
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
43 Group:     Intranator
44 %if %{with libi2ncommon}
45 Requires:  libi2ncommon >= 1.0
46 %endif
47 Requires: boost >= 1.32.0
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
56 Group:     Intranator/Development
57 Requires:  boost-devel >= 1.32.0
58
59 %description utils-devel
60 development files for asyncio utils.
61
62
63 %if %{with libt2n}
64 %package t2n
65 Summary:    glue library for using t2n with libasyncio
66 Group:      Intranator
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
77 Group:      Intranator/Development
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
91 # autoreconf --force -i
92 # ./configure $RPM_BUILD_WITH_OPTIMIZE --prefix=%{prefix}
93
94 mkdir build
95 cd build
96
97 # Temporarily disabled...
98 # export CFLAGS="$RPM_OPT_FLAGS"
99 # export CXXFLAGS="$RPM_OPT_FLAGS"
100
101 CMAKE_OPTS=""
102 %if %{with libi2ncommon}
103     CMAKE_OPTS="$CMAKE_OPTS -DWITH_LIBI2NCOMMON=ON"
104 %endif
105 %if %{with libt2n}
106     CMAKE_OPTS="$CMAKE_OPTS -DWITH_LIBT2N=ON"
107 %endif
108
109 cmake -DCMAKE_INSTALL_PREFIX="%{prefix}" $CMAKE_OPTS ../
110
111 dmake %{?_smp_mflags}
112
113 export BOOST_TEST_LOG_LEVEL=test_suite
114 dmake check
115
116 %install
117 cd build
118 make DESTDIR=$RPM_BUILD_ROOT install
119
120 # Remove unpackaged files
121 rm -f $RPM_BUILD_ROOT/usr/lib/libasyncio_utils.a
122 rm -f $RPM_BUILD_ROOT/usr/lib/libasyncio_utils.la
123
124 %clean
125 rm -fr $RPM_BUILD_ROOT
126
127 %post
128 /sbin/ldconfig
129
130 %files
131 %defattr(-,root,root)
132 %doc LICENSE COPYING.GPL
133 %{prefix}/lib/libasyncio.so*
134
135 %files devel -f build/headerlist.asyncio
136 %defattr(-,root,root)
137 %{prefix}/lib/libasyncio.*a*
138 %{prefix}/lib/pkgconfig/libasyncio.pc
139
140
141 %files utils
142 %defattr(-,root,root)
143 %{prefix}/lib/libasyncio_utils.so*
144
145
146 %files utils-devel -f build/headerlist.utils
147 %defattr(-,root,root)
148 %{prefix}/lib/libasyncio.*a*
149 %{prefix}/lib/pkgconfig/libasyncio_utils.pc
150
151 %if %{with libt2n}
152 %files t2n
153 %defattr(-,root,root)
154 %doc LICENSE
155 %{prefix}/lib/libasyncio_t2n.so*
156
157 %files t2n-devel
158 %defattr(-,root,root)
159 %{prefix}/lib/libasyncio_t2n.*a*
160 %{prefix}/lib/pkgconfig/libasyncio_t2n.pc
161 %{prefix}/include/asyncio_t2n*.hpp
162 %endif