-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSFEBillardGL.spec
85 lines (72 loc) · 1.93 KB
/
SFEBillardGL.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#
# spec file for package SFEBillardGL
#
# includes module(s): BillardGL
#
%include Solaris.inc
%define src_ver 1.75
%define src_name BillardGL
%define src_url http://nchc.dl.sourceforge.net/sourceforge/billardgl
Name: SFEBillardGL
Summary: 3D billard simulation using OpenGL
Version: %{src_ver}
License: GPL
Source: %{src_url}/%{src_name}-%{version}.tar.gz
Patch1: Billards-01-makefile.diff
Patch2: Billards-02-sqrt.diff
Patch3: Billards-03-std.diff
Patch4: Billards-04-Namem.diff
SUNW_BaseDir: %{_basedir}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%include default-depend.inc
Requires: SFEfreeglut
BuildRequires: SFEfreeglut-devel
%description
3D billard simulation using OpenGL.
%prep
%setup -q -n %{src_name}-%version
find . -name \*.cpp -exec dos2unix {} {} \;
find . -name \*.h -exec dos2unix {} {} \;
find . -name Makefile -exec dos2unix {} {} \;
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%build
CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
if test "x$CPUS" = "x" -o $CPUS = 0; then
CPUS=1
fi
cd src
export CXXFLAGS=" -I%_includedir -I%_basedir/X11/include -DPFAD=\\\"%{_datadir}/BillardGL/\\\""
export CFLAGS=" -I%_includedir -I%_basedir/X11/include"
export LDFLAGS=" -R%_libdir -L%_libdir -lX11"
export LD_OPTIONS="-L/usr/X11/lib -R/usr/X11/lib -R%_libdir -L%_libdir"
export PREFIX=%{_prefix}
export BINDIR=%{_bindir}
export DATADIR=%{_datadir}
export DOCDIR=%{_docdir}
make
%install
rm -rf $RPM_BUILD_ROOT
cd src
export BINDIR=%{_bindir}
export DATADIR=%{_datadir}
export DOCDIR=%{_docdir}
make install DESTDIR=$RPM_BUILD_ROOT
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr (-, root, bin)
%{_bindir}
%dir %attr (0755, root, sys) %{_datadir}
%{_datadir}/BillardGL
%dir %attr (0755, root, other) %{_docdir}
%{_docdir}/*
%changelog
* Mars 02 2010 - [email protected]
- add includedir if base is other than /usr
* Sat Oct 13 2007 - [email protected]
- add missing deps
* Wed Aug 15 2007 - [email protected]
- Initial spec