]> Creatis software - bbtk.git/blob - kernel/install/linux/rpmbuild/bbtk.spec.in
*** empty log message ***
[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: 1.0.0
6 Release: 1.0.0
7 # 1.0.0.
8 License: CeCILL-B
9 Group: Development/Libraries
10 Source: bbtk.tgz
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
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 cd ..
36 if [ -d bbtkbin ]
37 then
38  rm -rf bbtkbin
39 fi
40 mkdir bbtkbin
41 cd bbtkbin
42 cmake ../bbtk \
43         -DCMAKE_INSTALL_PREFIX:STRING="%{_prefix}" \
44         -DCMAKE_SKIP_RPATH:BOOL=ON \
45         -DCMAKE_CXX_COMPILER:FILEPATH=$CXX \
46         -DCMAKE_C_COMPILER:FILEPATH=$CC \
47         -D--BUILD_ALL=ON
48 cmake ../bbtk \
49         -DCMAKE_INSTALL_PREFIX:STRING="%{_prefix}" \
50         -DCMAKE_SKIP_RPATH:BOOL=ON \
51         -DCMAKE_CXX_COMPILER:FILEPATH=$CXX \
52         -DCMAKE_C_COMPILER:FILEPATH=$CC \
53         -D--BUILD_ALL=ON
54 cmake ../bbtk \
55         -DCMAKE_INSTALL_PREFIX:STRING="%{_prefix}" \
56         -DCMAKE_SKIP_RPATH:BOOL=ON \
57         -DCMAKE_CXX_COMPILER:FILEPATH=$CXX \
58         -DCMAKE_C_COMPILER:FILEPATH=$CC \
59         -D--BUILD_ALL=ON
60 cmake ../bbtk \
61         -DCMAKE_INSTALL_PREFIX:STRING="%{_prefix}" \
62         -DCMAKE_SKIP_RPATH:BOOL=ON \
63         -DCMAKE_CXX_COMPILER:FILEPATH=$CXX \
64         -DCMAKE_C_COMPILER:FILEPATH=$CC \
65         -D--BUILD_ALL=ON
66
67 %build
68 cd ../bbtkbin
69 export DISPLAY=:0.0
70 make 
71 # TO USE MULTIPLE PROCESSORS :
72 # %{?_smp_mflags}
73
74 %install
75 cd ../bbtkbin
76 rm -rf $RPM_BUILD_ROOT
77 export DISPLAY=:0.0
78 make DESTDIR=$RPM_BUILD_ROOT install
79 # %{?_smp_mflags} 
80
81 # creating file bbtk.conf in /etc/ld.so.conf.d 
82 # which contains the path to BBTK dynamic libs 
83 #install -d $RPM_BUILD_ROOT/%{_sysconfdir}/ld.so.conf.d
84 #echo "%{_libdir}/bbtk" > $RPM_BUILD_ROOT/%{_sysconfdir}/ld.so.conf.d/bbtk.conf
85
86 %clean
87 rm -rf $RPM_BUILD_ROOT
88
89 %post -p /sbin/ldconfig
90
91 %postun -p /sbin/ldconfig
92
93 %files
94 %defattr(-, root, root)
95
96 #%doc AUTHORS ChangeLog README TODO DEVELOPPER INSTALL PACKAGER
97 #%doc ChangeLog README TODO 
98 #%doc Doc
99 %{_libdir}/*
100 %{_includedir}/*
101 %{_datadir}/*
102 %{_bindir}/*
103 #%{_sysconfdir}/ld.so.conf.d/BBTK.conf