]> Creatis software - bbtk.git/blob - kernel/install/linux/rpmbuild/bbtk.spec.in
830ead23881325d915ea0d5cd3f1f168ac5d6140
[bbtk.git] / kernel / install / linux / rpmbuild / bbtk.spec.in
1 # Note that this is NOT a relocatable package
2 %define prefix /usr
3 Summary: BBTK
4 Name: BBTK
5 Version: @BBTK_VERSION@
6 Release: 1.0.0
7 # @BBTK_VERSION@.@BBTK_DATE@
8 License: CeCILL-B
9 Group: Development/Libraries
10 Source: bbtk.tar.gz
11 BuildRoot: /tmp/bbtk-%{version}-root
12 Prereq: /sbin/install-info
13 Docdir: %{prefix}/doc
14 #Requires: vtk = 4.5.0-0.cvs.2.fc4
15 #Requires: vtk-python = 4.5.0-0.cvs.2.fc4
16 #BuildPrereq: vtk-devel = 4.5.0-0.cvs.2.fc4
17 BuildRequires: cmake >= 2.4.6
18
19
20 %description
21 The Black Box ToolKit
22
23 %changelog
24 * Wed Jul 23 2008 Laurent Guigues <Laurent.Guigues@creatis.insa-lyon.fr> 1.0.0
25 - initial packaging with cmake
26
27 %prep
28 %setup -q -n BBTK
29
30 export CC='gcc'
31 export CXX='g++'
32 export MAKE='make %{?_smp_mflags}'
33 export CFLAGS="$RPM_OPT_FLAGS"
34 export CXXFLAGS="$RPM_OPT_FLAGS -Wno-deprecated"
35 cmake . \
36         -DCMAKE_INSTALL_PREFIX:STRING="%{_prefix}" \
37         -DCMAKE_SKIP_RPATH:BOOL=ON \
38         -DCMAKE_CXX_COMPILER:FILEPATH=$CXX \
39         -DCMAKE_C_COMPILER:FILEPATH=$CC \
40         -D--BUILD_ALL=ON
41
42 %build
43 make
44
45 %install
46 rm -rf $RPM_BUILD_ROOT
47 make DESTDIR=$RPM_BUILD_ROOT install
48
49 # creating file BBTK.conf in /etc/ld.so.conf.d 
50 # which contains the path to BBTK dynamic libs 
51 install -d $RPM_BUILD_ROOT/%{_sysconfdir}/ld.so.conf.d
52 echo "%{_libdir}/BBTK" > $RPM_BUILD_ROOT/%{_sysconfdir}/ld.so.conf.d/BBTK.conf
53 %clean
54 rm -rf $RPM_BUILD_ROOT
55
56 %post -p /sbin/ldconfig
57
58 %postun -p /sbin/ldconfig
59
60 %files
61 %defattr(-, root, root)
62
63 #%doc AUTHORS ChangeLog README TODO DEVELOPPER INSTALL PACKAGER
64 %doc ChangeLog README TODO 
65 %doc Doc
66 %{_libdir}/*
67 %{_includedir}/*
68 %{_datadir}/*
69 %{_bindir}/*
70 %{_sysconfdir}/ld.so.conf.d/BBTK.conf