File nel.spec of Package nel
# svn co --username anonymous --password anonymous http://dev.ryzom.com/svn/trunk/nel
%bcond_with samples
%define ver 0.7.0
%define snap r1076
Summary: Massive multi-user 3D game environments library
Name: libnel0
Version: %{ver}_%{snap}
Release: 1
License: GPL
Group: Development/Libraries/C and C++
URL: http://dev.ryzom.com/projects/show/nel
Source0: nel-%{snap}.tar.bz2
Source1: nel-config.1
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: gcc-c++
BuildRequires: cmake
BuildRequires: Mesa-devel
BuildRequires: freealut-devel
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
BuildRequires: libxml2-devel
BuildRequires: openal-devel
%description
NeL is a software platform for creating and running massively multi-user
entertainment in a 3D environment over the Internet working on Windows,
GNU/Linux and Mac.
The Ryzom MMORPG is based on NeL framework and is the best example of
what you can do with NeL.
%package -n libnel-devel
Summary: Development package for the NeL library
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}-%{release}
Requires: Mesa-devel
Requires: libjpeg-devel
Requires: libpng-devel
Requires: libxml2-devel
%description -n libnel-devel
This package contains all necessary include files and libraries needed
to compile and develop applications that use NeL.
%package -n nel-samples
Summary: Sample programs using NeL library
Group: Development/Libraries/C and C++
%description -n nel-samples
Sample programs using NeL library.
%prep
%setup -q -n nel
%build
mkdir build && cd build
cmake \
-DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \
-DCMAKE_BUILD_TYPE=MinSizeRel \
-DWITH_SAMPLES:BOOL=%{?with_samples:ON}%{?!with_samples:OFF} \
..
make %{_smp_mflags}
%install
cd build
make install DESTDIR=$RPM_BUILD_ROOT
install -D %{SOURCE1} %{buildroot}%{_mandir}/man1/nel-config.1
%ifarch x86_64
mv %{buildroot}{%{_prefix}/lib,%{_libdir}}
sed -i 's#%{_prefix}/lib #%{_libdir} #g' %{buildroot}%{_bindir}/nel-config
%endif
# No -debuginfo
strip -R .comment -R .note -R .note.ABI-tag %{buildroot}%{_libdir}/lib*.so.*
%if %{with samples}
strip -R .comment -R .note -R .note.ABI-tag %{buildroot}%{_bindir}/nl_sample_*
%endif
%post
%run_ldconfig
%postun
%run_ldconfig
%clean
rm -rf %{buildroot} %{_builddir}/%{buildsubdir}
%files
%defattr(644,root,root,755)
%{_libdir}/lib*.so.*
%files -n libnel-devel
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/nel-config
%{_libdir}/lib*.so
%{_includedir}/nel
%{_mandir}/man1/nel-config.*
%if %{with samples}
%files -n nel-samples
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/nl_sample_*
%{_datadir}/nel
%endif
%changelog
* Wed Feb 25 2009 Krzysztof Kotlenga <pocek@users.sf.net> 0.7.0_r1076-1
- up
- truncate changelog