Author: cassmodiah
Update of /cvs/pkgs/rpms/fife/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv22077
Modified Files:
fife.spec
Added Files:
fife-0.3.0-optflags.patch fife-0.3.0-soname.patch
Log Message:
* Sun Jan 31 2010 Simon Wesp <cassmodiah(a)fedoraproject.org> - 1:0.3.0-2
- Split devel package and add a static subpackage
- Generate doxygen docs and add a doc subpackage
- Correct epoch usage
- Create and use soname
- Honor CFLAGS
- Correct leaf
- Cleanup
fife-0.3.0-optflags.patch:
SConstruct | 28 ++++++++++++++++++++++++++--
1 file changed, 26 insertions(+), 2 deletions(-)
--- NEW FILE fife-0.3.0-optflags.patch ---
diff -Naur fife-0.3.0.orig/SConstruct fife-0.3.0/SConstruct
--- fife-0.3.0.orig/SConstruct 2010-01-12 21:17:01.000000000 +0100
+++ fife-0.3.0/SConstruct 2010-01-31 12:34:31.181647000 +0100
@@ -1,3 +1,26 @@
+# -*- coding: utf-8 -*-
+
+# ####################################################################
+# Copyright (C) 2005-2009 by the FIFE team
+#
http://www.fifengine.de
+# This file is part of FIFE.
+#
+# FIFE is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+# ####################################################################
+
import os, sys
import utils.scons.scons_utils as utils
from distutils.sysconfig import get_python_lib
@@ -13,6 +36,7 @@
'Destination directory (prepended to prefix)',
None,
PathVariable.PathAccept ))
+#vars.Add('CXXFLAGS', "")
#propagate the invoking users complete external environment
env = Environment(variables = vars,
@@ -224,7 +248,7 @@
if debug:
if haveusercxxflags:
- env.AppendUnique(usercxxflags)
+ env.AppendUnique(CXXFLAGS=usercxxflags)
else:
env.AppendUnique(CXXFLAGS=['-O0', '-Wall', '-Wno-unused'])
@@ -234,7 +258,7 @@
print "Building DEBUG binaries..."
else:
if haveusercxxflags:
- env.AppendUnique(usercxxflags)
+ env.AppendUnique(CXXFLAGS=usercxxflags)
else:
env.AppendUnique(CXXFLAGS=['-O2', '-Wall', '-Wno-unused'])
fife-0.3.0-soname.patch:
SConscript | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- NEW FILE fife-0.3.0-soname.patch ---
diff -Naur fife-0.3.0.orig/engine/SConscript fife-0.3.0/engine/SConscript
--- fife-0.3.0.orig/engine/SConscript 2010-01-20 06:56:18.000000000 +0100
+++ fife-0.3.0/engine/SConscript 2010-01-30 22:41:49.755659099 +0100
@@ -92,7 +92,7 @@
else:
sharedlib = env.SharedLibrary(target = 'fife',
source = compilefiles,
- LINKFLAGS=['-Wl'])
+ LINKFLAGS=['-Wl,-soname,libfife.so.SONAME'])
#**************************************************************************
#python library target
Index: fife.spec
===================================================================
RCS file: /cvs/pkgs/rpms/fife/devel/fife.spec,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -p -r1.9 -r1.10
--- fife.spec 27 Jan 2010 20:42:19 -0000 1.9
+++ fife.spec 31 Jan 2010 19:26:34 -0000 1.10
@@ -1,11 +1,12 @@
-%global pyver %(python -c 'import sys ; print sys.version[:3]')
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from
distutils.sysconfig import get_python_lib; print get_python_lib()")}
-%define debug_package %{nil}
+%global soname 0
+# fife-debuginfo.ppc: E: debuginfo-without-sources <- yek yek yek
+# fife.ppc: W: devel-file-in-non-devel-package /usr/lib/libfife.so <- just a symlink,
shouldn't be in -devel. It's used by the client(s)
Name: fife
Epoch: 1
Version: 0.3.0
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Cross platform game creation framework
Group: Amusements/Games
@@ -16,9 +17,11 @@ URL:
http://www.fifengine.de
# removed tests/ - removed for legal issues
# removed tools/ - removed for legal issues
Source0: %{name}-%{version}.tar.gz
-
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Patch0: %{name}-0.3.0-soname.patch
+Patch1: %{name}-0.3.0-optflags.patch
+
BuildRequires: scons
BuildRequires: SDL-devel
BuildRequires: boost-devel
@@ -34,6 +37,9 @@ BuildRequires: guichan-devel
BuildRequires: libpng-devel
BuildRequires: graphviz
BuildRequires: libXcursor-devel
+BuildRequires: chrpath
+
+Provides: %{name}-python = %{epoch}:%{version}-%{release}
%description
@@ -41,30 +47,57 @@ This package of Fife comes with game-eng
Unknown horizons is one of the clients that will use this engine.
-%package devel
-Summary: Development package for %{name}
-Group: Development/Libraries
-Requires: %{name} = %{version}-%{release}
+%package devel
+Summary: Development package for %{name}
+Group: Development/Libraries
+Requires: %{name} = %{epoch}:%{version}-%{release}
+
%description devel
Files for development with %{name}.
+%package static
+Summary: Static library for %{name} development
+Group: Development/Libraries
+Requires: %{name} = %{epoch}:%{version}-%{release}
+
+
+%description static
+The %{name}-static package includes static library needed to develop programs
+that use the %{name} library.
+
+
+%package doc
+Summary: Documentation for %{name}
+Group: Documentation
+BuildRequires: doxygen
+BuildArch: noarch
+Requires: %{name} = %{epoch}:%{version}-%{release}
+
+
+%description doc
+Doxygen generated documentation for %{name}.
+
+
%prep
%setup -q
-sed -i.rpath -e "/-rpath/s|LINKFLAGS=\[.*\]|LINKFLAGS=\[''\]|" \
- engine/SConscript
+# Honor optflags // diff generated from svn
+%patch1 -p1
+# remove usage of ./ext/ (see line 16 for further informations)
+# very dirrty, but it works
sed -i '21d' \
build/linux2-config.py
-for l in ./engine/SConscript ./setup.py ./build/linux2-config.py
+# use libdir instead of lib (for 64bit systems)
+for l in ./engine/SConscript ./build/linux2-config.py
do
sed -i "s|'lib'|'%{_lib}'|g" $l
done
-
+# be utf-8 clean, dudes!
for f in ./AUTHORS ./CHANGES ./COPYING ./README
do
iconv -f iso-8859-1 -t utf-8 $f |sed 's|\r||g' > $f.utf8
@@ -72,15 +105,28 @@ do
mv $f.utf8 $f
done
+# correction of leaf
+sed -i 's|i->leaf()|i->path().leaf()|g' \
+ engine/core/vfs/vfsdirectory.cpp
+
+# no soname? You can not be serious!
+%patch0 -p1
+sed -i "s|SONAME|%{soname}|g" \
+ engine/SConscript
+
%build
- CXXFLAGS="%{optflags}" \
scons . \
+ CXXFLAGS='%{optflags}' \
%{?jobs:-j%{jobs}} \
- prefix=%{_prefix} \
- opengl=1 \
- docs=1 \
- fife-shared fife-python fife-swig
+ --enable-debug \
+ --enable-rend-grid \
+ --enable-rend-camzone \
+ fife-shared fife-static fife-python fife-swig
+
+# Doxygen generated docs
+doxygen ./doc/doxygen/doxyfile
+rm -f ./doc/doxygen/html/installdox
%install
@@ -89,11 +135,32 @@ rm -rf %{buildroot}
scons . \
install-all \
install-dev \
- --prefix=%{buildroot}%{_prefix} \
- --python-prefix=%{buildroot}%{python_sitelib}
-
-chmod -x %{buildroot}/%{_libdir}/lib%{name}.so
-chmod -x %{buildroot}/%{python_sitelib}/%{name}/_%{name}.so
+ DESTDIR=%{buildroot} \
+ --prefix=%{_prefix} \
+ --python-prefix=%{python_sitelib}
+
+# rpath is evil, evil, evil
+chrpath --delete %{buildroot}%{_libdir}/lib%{name}.so
+chrpath --delete %{buildroot}%{python_sitelib}/%{name}/_%{name}.so
+
+# playing a little bit with soname
+mv %{buildroot}/%{_libdir}/lib%{name}.so %{buildroot}/%{_libdir}/lib%{name}.so.%{soname}
+pushd %{buildroot}%{_libdir}
+ln -s lib%{name}.so.%{soname} lib%{name}.so.%{version}
+ln -s lib%{name}.so.%{soname} lib%{name}.so
+popd
+
+mkdir -p %{buildroot}/%{_bindir}/
+cat > %{buildroot}/%{_bindir}/%{name}-documentation << EOF
+#!/bin/sh
+xdg-open file://%{_docdir}/%{name}-doc-%{version}/index.html
+EOF
+chmod +x %{buildroot}/%{_bindir}/%{name}-documentation
+
+# fife.ppc: E: non-standard-executable-perm /usr/lib/libfife.so.0 0775
+chmod 755 %{buildroot}/%{_libdir}/lib%{name}.so.%{soname}
+# fife.ppc: E: non-standard-executable-perm
/usr/lib/python2.6/site-packages/fife/_fife.so 0775
+chmod 755 %{buildroot}/%{python_sitelib}/%{name}/_%{name}.so
%post -p /sbin/ldconfig
@@ -110,8 +177,9 @@ rm -rf %{buildroot}
%defattr(-,root,root,-)
%doc AUTHORS CHANGES COPYING README
%{_libdir}/lib%{name}.so
+%{_libdir}/lib%{name}.so.%{soname}
+%{_libdir}/lib%{name}.so.%{version}
%{python_sitelib}/%{name}/
-%{_libdir}/lib%{name}.a
%files devel
@@ -119,8 +187,27 @@ rm -rf %{buildroot}
%{_includedir}/%{name}/
+%files static
+%defattr(-,root,root,-)
+%{_libdir}/lib%{name}.a
+
+
+%files doc
+%defattr(-,root,root,-)
+%doc ./doc/doxygen/html/*
+%{_bindir}/%{name}-documentation
+
%changelog
+* Sun Jan 31 2010 Simon Wesp <cassmodiah(a)fedoraproject.org> - 1:0.3.0-2
+- Split devel package and add a static subpackage
+- Generate doxygen docs and add a doc subpackage
+- Correct epoch usage
+- Create and use soname
+- Honor CFLAGS
+- Correct leaf
+- Cleanup
+
* Wed Jan 27 2010 Simon Wesp <cassmodiah(a)fedoraproject.org> - 1:0.3.0-1
- update to 0.3.0