]> Creatis software - bbtk.git/blobdiff - kernel/install/linux/rpmbuild/bbtk.spec.in
#3063 BBTK Feature New Normal - New box VectorFilterDouble in std package
[bbtk.git] / kernel / install / linux / rpmbuild / bbtk.spec.in
index 830ead23881325d915ea0d5cd3f1f168ac5d6140..8900044518d06daf2fe5c8cf146d0626dfb85061 100644 (file)
@@ -1,20 +1,46 @@
+ # ---------------------------------------------------------------------
+ #
+ # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
+ #                        pour la SantÈ)
+ # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+ # Previous Authors : Laurent Guigues, Jean-Pierre Roux
+ # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+ #
+ #  This software is governed by the CeCILL-B license under French law and
+ #  abiding by the rules of distribution of free software. You can  use,
+ #  modify and/ or redistribute the software under the terms of the CeCILL-B
+ #  license as circulated by CEA, CNRS and INRIA at the following URL
+ #  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+ #  or in the file LICENSE.txt.
+ #
+ #  As a counterpart to the access to the source code and  rights to copy,
+ #  modify and redistribute granted by the license, users are provided only
+ #  with a limited warranty  and the software's author,  the holder of the
+ #  economic rights,  and the successive licensors  have only  limited
+ #  liability.
+ #
+ #  The fact that you are presently reading this means that you have had
+ #  knowledge of the CeCILL-B license and that you accept its terms.
+ # ------------------------------------------------------------------------ */
+
+
 # Note that this is NOT a relocatable package
 %define prefix /usr
 Summary: BBTK
 Name: BBTK
-Version: @BBTK_VERSION@
+Version: 1.0.0
 Release: 1.0.0
-# @BBTK_VERSION@.@BBTK_DATE@
+# 1.0.0.
 License: CeCILL-B
 Group: Development/Libraries
-Source: bbtk.tar.gz
+Source: bbtk.tgz
 BuildRoot: /tmp/bbtk-%{version}-root
 Prereq: /sbin/install-info
 Docdir: %{prefix}/doc
 #Requires: vtk = 4.5.0-0.cvs.2.fc4
 #Requires: vtk-python = 4.5.0-0.cvs.2.fc4
 #BuildPrereq: vtk-devel = 4.5.0-0.cvs.2.fc4
-BuildRequires: cmake >= 2.4.6
+#BuildRequires: cmake >= 2
 
 
 %description
@@ -25,14 +51,39 @@ The Black Box ToolKit
 - initial packaging with cmake
 
 %prep
-%setup -q -n BBTK
+%setup -q -n bbtk
 
 export CC='gcc'
 export CXX='g++'
 export MAKE='make %{?_smp_mflags}'
 export CFLAGS="$RPM_OPT_FLAGS"
 export CXXFLAGS="$RPM_OPT_FLAGS -Wno-deprecated"
-cmake . \
+cd ..
+if [ -d bbtkbin ]
+then
+ rm -rf bbtkbin
+fi
+mkdir bbtkbin
+cd bbtkbin
+cmake ../bbtk \
+       -DCMAKE_INSTALL_PREFIX:STRING="%{_prefix}" \
+        -DCMAKE_SKIP_RPATH:BOOL=ON \
+        -DCMAKE_CXX_COMPILER:FILEPATH=$CXX \
+        -DCMAKE_C_COMPILER:FILEPATH=$CC \
+       -D--BUILD_ALL=ON
+cmake ../bbtk \
+       -DCMAKE_INSTALL_PREFIX:STRING="%{_prefix}" \
+        -DCMAKE_SKIP_RPATH:BOOL=ON \
+        -DCMAKE_CXX_COMPILER:FILEPATH=$CXX \
+        -DCMAKE_C_COMPILER:FILEPATH=$CC \
+       -D--BUILD_ALL=ON
+cmake ../bbtk \
+       -DCMAKE_INSTALL_PREFIX:STRING="%{_prefix}" \
+        -DCMAKE_SKIP_RPATH:BOOL=ON \
+        -DCMAKE_CXX_COMPILER:FILEPATH=$CXX \
+        -DCMAKE_C_COMPILER:FILEPATH=$CC \
+       -D--BUILD_ALL=ON
+cmake ../bbtk \
        -DCMAKE_INSTALL_PREFIX:STRING="%{_prefix}" \
         -DCMAKE_SKIP_RPATH:BOOL=ON \
         -DCMAKE_CXX_COMPILER:FILEPATH=$CXX \
@@ -40,16 +91,24 @@ cmake . \
        -D--BUILD_ALL=ON
 
 %build
-make
+cd ../bbtkbin
+export DISPLAY=:0.0
+make 
+# TO USE MULTIPLE PROCESSORS :
+# %{?_smp_mflags}
 
 %install
+cd ../bbtkbin
 rm -rf $RPM_BUILD_ROOT
+export DISPLAY=:0.0
 make DESTDIR=$RPM_BUILD_ROOT install
+# %{?_smp_mflags} 
 
-# creating file BBTK.conf in /etc/ld.so.conf.d 
+# creating file bbtk.conf in /etc/ld.so.conf.d 
 # which contains the path to BBTK dynamic libs 
-install -d $RPM_BUILD_ROOT/%{_sysconfdir}/ld.so.conf.d
-echo "%{_libdir}/BBTK" > $RPM_BUILD_ROOT/%{_sysconfdir}/ld.so.conf.d/BBTK.conf
+#install -d $RPM_BUILD_ROOT/%{_sysconfdir}/ld.so.conf.d
+#echo "%{_libdir}/bbtk" > $RPM_BUILD_ROOT/%{_sysconfdir}/ld.so.conf.d/bbtk.conf
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -61,10 +120,10 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(-, root, root)
 
 #%doc AUTHORS ChangeLog README TODO DEVELOPPER INSTALL PACKAGER
-%doc ChangeLog README TODO 
-%doc Doc
+#%doc ChangeLog README TODO 
+#%doc Doc
 %{_libdir}/*
 %{_includedir}/*
 %{_datadir}/*
 %{_bindir}/*
-%{_sysconfdir}/ld.so.conf.d/BBTK.conf
+#%{_sysconfdir}/ld.so.conf.d/BBTK.conf