%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
- 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 \
-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
%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