Cmake helper: Fix configure_file invocation
[libt2n] / libt2n.spec.in
index 2ee3df0..745b591 100644 (file)
@@ -3,13 +3,12 @@ Name:      libt2n
 Version:   @VERSION@
 Release:   1
 License:   GPL version 2 + linking exception
-Group:     Intranator
+Group:     Intra2net
 Vendor:    Intra2net AG
-Source:    http://www.intra2net.com/en/developer/libt2n/download/%{name}-%{version}.tar.gz
+Source:    http://www.intra2net.com/en/developer/libt2n/download/%{name}-%{version}.tar.bz2
 Buildroot: /tmp/%{name}-%{version}-root
 Prefix:    /usr
-Requires:  boost >= 1.33
-BuildPrereq: libtool cppunit-devel
+BuildPrereq: libtool
 URL:       http://www.intra2net.com/en/developer/libt2n
 
 %description 
@@ -17,8 +16,8 @@ C++ IPC library
 
 %package   devel
 Summary:   talk2neighbor - C++ IPC library
-Group:     Intranator/Development
-Requires:  libt2n = %{version} libgettext gccxml libxml++
+Group:     Intra2net/Development
+Requires:  libt2n = %{version} gccxml libxml++ boost-devel
 BuildPrereq: boost-devel
 
 %description devel
@@ -28,13 +27,27 @@ C++ IPC library devel files
 %setup -q
 
 %build
-autoreconf --force --install
-./configure $RPM_BUILD_WITH_OPTIMIZE --prefix=%{prefix}
-%__make %{?_smp_mflags}
+# autoreconf --force --install
+# ./configure $RPM_BUILD_WITH_OPTIMIZE --prefix=%{prefix}
+# %__make %{?_smp_mflags}
 
-make check
+export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
+
+mkdir build
+cd build
+
+export CFLAGS="$RPM_OPT_FLAGS"
+export CXXFLAGS="$RPM_OPT_FLAGS"
+
+cmake -DCMAKE_INSTALL_PREFIX="%{prefix}" ../
+
+dmake %{?_smp_mflags}
+
+export BOOST_TEST_LOG_LEVEL=test_suite
+dmake check || /bin/true
 
 %install
+cd build
 make DESTDIR=$RPM_BUILD_ROOT install
 
 %clean
@@ -56,5 +69,6 @@ rm -fr $RPM_BUILD_ROOT
 %{prefix}/lib/*.*a*
 %{prefix}/lib/pkgconfig/*.pc
 %{prefix}/include/
-%{prefix}/share/aclocal
+# %{prefix}/share/aclocal
 %{prefix}/share/libt2n
+%{prefix}/share/cmake/Modules/Libt2n.cmake