]> Creatis software - bbtk.git/blob - kernel/install/linux/rpmbuild/bbtk.spec.in
Feature #1774
[bbtk.git] / kernel / install / linux / rpmbuild / bbtk.spec.in
1  # ---------------------------------------------------------------------
2  #
3  # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
4  #                        pour la SantÈ)
5  # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
6  # Previous Authors : Laurent Guigues, Jean-Pierre Roux
7  # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
8  #
9  #  This software is governed by the CeCILL-B license under French law and
10  #  abiding by the rules of distribution of free software. You can  use,
11  #  modify and/ or redistribute the software under the terms of the CeCILL-B
12  #  license as circulated by CEA, CNRS and INRIA at the following URL
13  #  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
14  #  or in the file LICENSE.txt.
15  #
16  #  As a counterpart to the access to the source code and  rights to copy,
17  #  modify and redistribute granted by the license, users are provided only
18  #  with a limited warranty  and the software's author,  the holder of the
19  #  economic rights,  and the successive licensors  have only  limited
20  #  liability.
21  #
22  #  The fact that you are presently reading this means that you have had
23  #  knowledge of the CeCILL-B license and that you accept its terms.
24  # ------------------------------------------------------------------------ */
25
26
27 # Note that this is NOT a relocatable package
28 %define prefix /usr
29 Summary: BBTK
30 Name: BBTK
31 Version: 1.0.0
32 Release: 1.0.0
33 # 1.0.0.
34 License: CeCILL-B
35 Group: Development/Libraries
36 Source: bbtk.tgz
37 BuildRoot: /tmp/bbtk-%{version}-root
38 Prereq: /sbin/install-info
39 Docdir: %{prefix}/doc
40 #Requires: vtk = 4.5.0-0.cvs.2.fc4
41 #Requires: vtk-python = 4.5.0-0.cvs.2.fc4
42 #BuildPrereq: vtk-devel = 4.5.0-0.cvs.2.fc4
43 #BuildRequires: cmake >= 2
44
45
46 %description
47 The Black Box ToolKit
48
49 %changelog
50 * Wed Jul 23 2008 Laurent Guigues <Laurent.Guigues@creatis.insa-lyon.fr> 1.0.0
51 - initial packaging with cmake
52
53 %prep
54 %setup -q -n bbtk
55
56 export CC='gcc'
57 export CXX='g++'
58 export MAKE='make %{?_smp_mflags}'
59 export CFLAGS="$RPM_OPT_FLAGS"
60 export CXXFLAGS="$RPM_OPT_FLAGS -Wno-deprecated"
61 cd ..
62 if [ -d bbtkbin ]
63 then
64  rm -rf bbtkbin
65 fi
66 mkdir bbtkbin
67 cd bbtkbin
68 cmake ../bbtk \
69         -DCMAKE_INSTALL_PREFIX:STRING="%{_prefix}" \
70         -DCMAKE_SKIP_RPATH:BOOL=ON \
71         -DCMAKE_CXX_COMPILER:FILEPATH=$CXX \
72         -DCMAKE_C_COMPILER:FILEPATH=$CC \
73         -D--BUILD_ALL=ON
74 cmake ../bbtk \
75         -DCMAKE_INSTALL_PREFIX:STRING="%{_prefix}" \
76         -DCMAKE_SKIP_RPATH:BOOL=ON \
77         -DCMAKE_CXX_COMPILER:FILEPATH=$CXX \
78         -DCMAKE_C_COMPILER:FILEPATH=$CC \
79         -D--BUILD_ALL=ON
80 cmake ../bbtk \
81         -DCMAKE_INSTALL_PREFIX:STRING="%{_prefix}" \
82         -DCMAKE_SKIP_RPATH:BOOL=ON \
83         -DCMAKE_CXX_COMPILER:FILEPATH=$CXX \
84         -DCMAKE_C_COMPILER:FILEPATH=$CC \
85         -D--BUILD_ALL=ON
86 cmake ../bbtk \
87         -DCMAKE_INSTALL_PREFIX:STRING="%{_prefix}" \
88         -DCMAKE_SKIP_RPATH:BOOL=ON \
89         -DCMAKE_CXX_COMPILER:FILEPATH=$CXX \
90         -DCMAKE_C_COMPILER:FILEPATH=$CC \
91         -D--BUILD_ALL=ON
92
93 %build
94 cd ../bbtkbin
95 export DISPLAY=:0.0
96 make 
97 # TO USE MULTIPLE PROCESSORS :
98 # %{?_smp_mflags}
99
100 %install
101 cd ../bbtkbin
102 rm -rf $RPM_BUILD_ROOT
103 export DISPLAY=:0.0
104 make DESTDIR=$RPM_BUILD_ROOT install
105 # %{?_smp_mflags} 
106
107 # creating file bbtk.conf in /etc/ld.so.conf.d 
108 # which contains the path to BBTK dynamic libs 
109 #install -d $RPM_BUILD_ROOT/%{_sysconfdir}/ld.so.conf.d
110 #echo "%{_libdir}/bbtk" > $RPM_BUILD_ROOT/%{_sysconfdir}/ld.so.conf.d/bbtk.conf
111
112 %clean
113 rm -rf $RPM_BUILD_ROOT
114
115 %post -p /sbin/ldconfig
116
117 %postun -p /sbin/ldconfig
118
119 %files
120 %defattr(-, root, root)
121
122 #%doc AUTHORS ChangeLog README TODO DEVELOPPER INSTALL PACKAGER
123 #%doc ChangeLog README TODO 
124 #%doc Doc
125 %{_libdir}/*
126 %{_includedir}/*
127 %{_datadir}/*
128 %{_bindir}/*
129 #%{_sysconfdir}/ld.so.conf.d/BBTK.conf