Initial commit of the cmake conversion of the libasyncio project. The test testsimple...
[libasyncio] / libasyncio.spec.bak
similarity index 79%
rename from libasyncio.spec
rename to libasyncio.spec.bak
index 0f17acf..ef43b31 100644 (file)
@@ -6,11 +6,11 @@ License:   GPL version 2 + linking exception
 Group:     Intranator
 Vendor:    Intra2net AG
 Source:    %{name}-%{version}.tar.gz
-Buildroot: /tmp/%{name}-%{version}-root
+# Buildroot: /tmp/%{name}-%{version}-root
 Prefix:    /usr
 Requires:  libi2ncommon >= 1.0
 Requires:   boost >= 1.32.0
-BuildPrereq: libtool
+# BuildPrereq: libtool
 BuildRequires: boost-devel >= 1.32.0
 Obsoletes: libsimpleio
 
@@ -43,7 +43,7 @@ are also usable for other purposes, too.
 %package utils-devel
 Summary:   library with asynchronous io functionality
 Group:     Intranator/Development
-Requires: boost-devel >= 1.32.0
+Requires:  boost-devel >= 1.32.0
 
 %description utils-devel
 development files for asyncio utils.
@@ -75,17 +75,36 @@ development files for glue lib for using t2n with simpleio.
 
 %build
 export PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/intranator/lib/pkgconfig
-autoreconf --force -i
-./configure $RPM_BUILD_WITH_OPTIMIZE --prefix=%{prefix}
-make
+# autoreconf --force -i
+# ./configure $RPM_BUILD_WITH_OPTIMIZE --prefix=%{prefix}
+
+mkdir build
+cd build
+
+export CFLAGS="$RPM_OPT_FLAGS"
+export CXXFLAGS="$RPM_OPT_FLAGS"
+
+CMAKE_OPTS=""
+%if %{with libi2ncommon}
+    CMAKE_OPTS="$CMAKE_OPTS -DWITH_LIBI2NCOMMON=ON"
+%endif
+%if %{with libt2n}
+    CMAKE_OPTS="$CMAKE_OPTS -DWITH_LIBT2N=ON"
+%endif
+
+cmake -DCMAKE_INSTALL_PREFIX="%{prefix}" $CMAKE_OPTS ../
+
+dmake %{?_smp_mflags}
 
-for dir in utils asyncio; do
-    make -C $dir headerlist
-done
+# for dir in utils asyncio; do
+#     make -C $dir headerlist
+# done
 
-make check
+export BOOST_TEST_LOG_LEVEL=test_suite
+dmake check
 
 %install
+cd build
 make DESTDIR=$RPM_BUILD_ROOT install
 
 # Remove unpackaged files