- based on a package by Toni Graffy

OBS-URL: https://build.opensuse.org/package/show/games/MyGUI?expand=0&rev=2
This commit is contained in:
Pavol Rusnak 2011-04-20 13:41:53 +00:00 committed by Git OBS Bridge
parent ecc7522afa
commit 0e74b6a9e1
4 changed files with 94 additions and 114 deletions

View File

@ -11,4 +11,4 @@ addFilter("static-library-without-debuginfo .*/libMyGUI.OgrePlatform.a")
addFilter("devel-package-with-non-devel-group Documentation/HTML") addFilter("devel-package-with-non-devel-group Documentation/HTML")
# MyGUI-demo # MyGUI-demo
setBadness('shlib-policy-name-error', 0) setBadness('shlib-policy-name-error', 0)

5
MyGUI.changes Normal file
View File

@ -0,0 +1,5 @@
-------------------------------------------------------------------
Wed Apr 20 13:35:58 UTC 2011 - prusnak@opensuse.org
- based on a package by Toni Graffy

View File

@ -1,46 +1,41 @@
# Copyright (c) 2009-2010 oc2pus
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
# #
# Please submit bugfixes or comments to toni@links2linux.de # Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild %define capname MYGUI
%define prefix /usr
%define _name2 MYGUI
%define _major 3.0 %define _major 3.0
%define _minor 1 %define _minor 1
%define _SO_nr 3 %define _sover 3
Summary: A GUI library for Ogre Rendering Engine Name: MyGUI
Name: MyGUI Version: %{_major}.%{_minor}
Version: %{_major}.%{_minor} Release: 1
Release: 1 License: LGPLv3
License: LGPL Summary: A GUI library for Ogre Rendering Engine
Group: Development/Tools/GUI Builders Url: http://my-gui.sourceforge.net/
Source: %{name}_%{version}_source.zip Group: Development/Tools/GUI Builders
Source1: %{name}.png Source: %{name}_%{version}_source.zip
Source90: %{name}-rpmlintrc Source1: %{name}.png
Patch0: LIB_SUFFIX.patch Source90: %{name}-rpmlintrc
URL: http://my-gui.sourceforge.net/ Patch0: %{name}-lib_suffix.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: Cg
BuildRequires: cmake BuildRequires: Cg-devel
BuildRequires: dejavu BuildRequires: cmake
BuildRequires: dos2unix BuildRequires: dejavu
BuildRequires: doxygen BuildRequires: dos2unix
BuildRequires: fdupes BuildRequires: doxygen
BuildRequires: freetype2-devel BuildRequires: fdupes
BuildRequires: gcc-c++ BuildRequires: freetype2-devel
BuildRequires: graphviz BuildRequires: gcc-c++
BuildRequires: libOIS-devel BuildRequires: graphviz
BuildRequires: libuuid-devel BuildRequires: libOIS-devel
BuildRequires: libOgreMain-devel BuildRequires: libOgreMain-devel
BuildRequires: pkgconfig BuildRequires: libuuid-devel
BuildRequires: unzip BuildRequires: pkgconfig
BuildRequires: update-desktop-files BuildRequires: unzip
Requires: dejavu BuildRequires: update-desktop-files
Requires: dejavu
BuildRequires: Cg-devel Cg BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description %description
MyGUI, it is a GUI library for Ogre Rendering Engine. We pursue MyGUI, it is a GUI library for Ogre Rendering Engine. We pursue
@ -71,9 +66,9 @@ Unlimited quantity of widget condition's (for developers).
This package contains ImageSetViewer and LayoutEditor. This package contains ImageSetViewer and LayoutEditor.
%package demo %package demo
Summary: Some demo applications for MyGUI Summary: Some demo applications for MyGUI
Group: Development/Tools/GUI Builders Group: Development/Tools/GUI Builders
Requires: %{name} = %{version} Requires: %{name} = %{version}
%description demo %description demo
MyGUI, it is a GUI library for Ogre Rendering Engine. We pursue MyGUI, it is a GUI library for Ogre Rendering Engine. We pursue
@ -81,26 +76,26 @@ next targets: GUI have to be fast, flexible and simple in using.
This package contains some demo applications for package MyGUI. This package contains some demo applications for package MyGUI.
%package -n libMyGUIEngine%{_SO_nr} %package -n libMyGUIEngine%{_sover}
Summary: Shared library for MyGUI Summary: Shared library for MyGUI
Group: System/Libraries Group: System/Libraries
Provides: libmygui0 = 2.2.3 Provides: libmygui0 = 2.2.3
Obsoletes: libmygui0 < 2.2.3 Obsoletes: libmygui0 < 2.2.3
%description -n libMyGUIEngine%{_SO_nr} %description -n libMyGUIEngine%{_sover}
MyGUI, it is a GUI library for Ogre Rendering Engine. We pursue MyGUI, it is a GUI library for Ogre Rendering Engine. We pursue
next targets: GUI have to be fast, flexible and simple in using. next targets: GUI have to be fast, flexible and simple in using.
This package contains the shared library for package MyGUI. This package contains the shared library for package MyGUI.
%package devel %package devel
Summary: Include Files and Libraries mandatory for Development Summary: Include Files and Libraries mandatory for Development
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
Requires: freetype2-devel Requires: freetype2-devel
Requires: libMyGUIEngine%{_SO_nr} = %{version} Requires: libMyGUIEngine%{_sover} = %{version}
Requires: libuuid-devel Requires: libOIS-devel
Requires: libOIS-devel Requires: libOgreMain-devel
Requires: libOgreMain-devel Requires: libuuid-devel
%description devel %description devel
MyGUI, it is a GUI library for Ogre Rendering Engine. We pursue MyGUI, it is a GUI library for Ogre Rendering Engine. We pursue
@ -110,8 +105,8 @@ Include Files and Libraries mandatory for Development with
MyGUI. MyGUI.
%package devel-doc %package devel-doc
Summary: Development documentation for MyGUI Summary: Development documentation for MyGUI
Group: Documentation/HTML Group: Documentation/HTML
%description devel-doc %description devel-doc
MyGUI, it is a GUI library for Ogre Rendering Engine. We pursue MyGUI, it is a GUI library for Ogre Rendering Engine. We pursue
@ -126,10 +121,10 @@ Development documentation for package MyGUI.
%patch0 %patch0
dos2unix *.txt COPYING.LESSER dos2unix *.txt COPYING.LESSER
%__chmod 644 *.txt COPYING.LESSER chmod 644 *.txt COPYING.LESSER
%build %build
%__install -dm 755 build install -dm 755 build
pushd build pushd build
cmake \ cmake \
-DCMAKE_INSTALL_PREFIX=%{_prefix} \ -DCMAKE_INSTALL_PREFIX=%{_prefix} \
@ -152,11 +147,7 @@ pushd build
-DMYGUI_FULL_RPATH=FALSE \ -DMYGUI_FULL_RPATH=FALSE \
.. ..
%if %suse_version <= 1100 make %{?_smp_mflags}
find . -name flags.make | xargs %__sed -i -e 's|-I/usr/include/OGRE|`pkg-config --cflags OGRE`|g'
%endif
%__make %{?jobs:-j%{jobs}}
popd popd
pushd Docs pushd Docs
@ -166,29 +157,26 @@ popd
%install %install
pushd build pushd build
%makeinstall %make_install
popd popd
# rename demos to avoid duplicate names with other packages # rename demos to avoid duplicate names with other packages
pushd %{buildroot}%{_bindir} pushd %{buildroot}%{_bindir}
demos=`ls -1 Demo_*` demos=`ls -1 Demo_*`
for i in $demos; do for i in $demos; do
%__mv $i %{name}-$i mv $i %{name}-$i
done done
popd popd
# move those files to /usr/share/MYGUI # move those files to /usr/share/MYGUI
%__mv %{buildroot}%{_bindir}/plugins.cfg \ mv %{buildroot}%{_bindir}/plugins.cfg %{buildroot}%{_datadir}/%{capname}
%{buildroot}%{_datadir}/%{_name2} mv %{buildroot}%{_bindir}/resources.xml %{buildroot}%{_datadir}/%{capname}
%__mv %{buildroot}%{_bindir}/resources.xml \
%{buildroot}%{_datadir}/%{_name2}
# adjust OGRE path # adjust OGRE path
%__sed -i -e 's|PluginFolder=/usr/local/lib/OGRE|%{_libdir}/OGRE|g' \ sed -i -e 's|PluginFolder=/usr/local/lib/OGRE|%{_libdir}/OGRE|g' %{buildroot}%{_datadir}/%{capname}/plugins.cfg
%{buildroot}%{_datadir}/%{_name2}/plugins.cfg
# wrapper-script for binaries # wrapper-script for binaries
%__cat > %{name}.sh <<EOF cat > %{name}.sh <<EOF
#! /bin/bash #! /bin/bash
if [ -z "\$1" ]; then if [ -z "\$1" ]; then
echo "missing parameter..." echo "missing parameter..."
@ -209,37 +197,37 @@ mkdir -p \$HOME/.%{name}
# link the resources to local dir # link the resources to local dir
# just in case some new files appear (update) # just in case some new files appear (update)
ln -sf %{_datadir}/%{_name2}/Media \$HOME/.%{name} ln -sf %{_datadir}/%{capname}/Media \$HOME/.%{name}
if [ ! -f \$HOME/.%{name}/plugins.cfg ]; then if [ ! -f \$HOME/.%{name}/plugins.cfg ]; then
# config should be user writeable # config should be user writeable
%__cp %{_datadir}/%{_name2}/plugins.cfg \$HOME/.%{name} cp %{_datadir}/%{capname}/plugins.cfg \$HOME/.%{name}
fi fi
if [ ! -f \$HOME/.%{name}/resources.xml ]; then if [ ! -f \$HOME/.%{name}/resources.xml ]; then
%__cp %{_datadir}/%{_name2}/resources.xml \$HOME/.%{name} cp %{_datadir}/%{capname}/resources.xml \$HOME/.%{name}
fi fi
# call binary from local working-directory # call binary from local working-directory
cd \$HOME/.%{name} cd \$HOME/.%{name}
%{_bindir}/\$1 %{_bindir}/\$1
EOF EOF
%__install -m 755 %{name}.sh \ install -m 755 %{name}.sh \
%{buildroot}%{_bindir} %{buildroot}%{_bindir}
# use system fonts # use system fonts
pushd %{buildroot}%{_datadir}/%{_name2}/Media/MyGUI_Media pushd %{buildroot}%{_datadir}/%{capname}/Media/MyGUI_Media
ln -sf %{_datadir}/fonts/truetype/DejaVuSans.ttf . ln -sf %{_datadir}/fonts/truetype/DejaVuSans.ttf .
ln -sf %{_datadir}/fonts/truetype/DejaVuSans-ExtraLight.ttf . ln -sf %{_datadir}/fonts/truetype/DejaVuSans-ExtraLight.ttf .
popd popd
# icon # icon
%__install -dm 755 %{buildroot}%{_datadir}/pixmaps install -dm 755 %{buildroot}%{_datadir}/pixmaps
%__install -m 644 %{SOURCE1} \ install -m 644 %{SOURCE1} \
%{buildroot}%{_datadir}/pixmaps %{buildroot}%{_datadir}/pixmaps
# menu-entries # menu-entries
for i in LayoutEditor ImageSetViewer FontViewer; do for i in LayoutEditor ImageSetViewer FontViewer; do
%__cat > $i.desktop << EOF cat > $i.desktop << EOF
[Desktop Entry] [Desktop Entry]
Name=MyGUI $i Name=MyGUI $i
GenericName=MyGUI $i GenericName=MyGUI $i
@ -253,18 +241,18 @@ EOF
done done
# remove unwanted files # remove unwanted files
%__rm -r %{buildroot}%{_datadir}/%{_name2}/Media/UnitTests rm -r %{buildroot}%{_datadir}/%{capname}/Media/UnitTests
%__rm -r %{buildroot}%{_datadir}/%{_name2}/Media/Wrapper/WrapperBaseApp rm -r %{buildroot}%{_datadir}/%{capname}/Media/Wrapper/WrapperBaseApp
%__rm Docs/html/installdox rm Docs/html/installdox
%fdupes -s %{buildroot} %fdupes -s %{buildroot}
%clean %clean
[ -d "%{buildroot}" -a "%{buildroot}" != "" ] && %__rm -rf "%{buildroot}" rm -rf %{buildroot}
%post -n libMyGUIEngine%{_SO_nr} -p /sbin/ldconfig %post -n libMyGUIEngine%{_sover} -p /sbin/ldconfig
%postun -n libMyGUIEngine%{_SO_nr} -p /sbin/ldconfig %postun -n libMyGUIEngine%{_sover} -p /sbin/ldconfig
%files %files
%defattr(-,root,root) %defattr(-,root,root)
@ -273,16 +261,13 @@ done
%{_bindir}/FontViewer %{_bindir}/FontViewer
%{_bindir}/ImageSetViewer %{_bindir}/ImageSetViewer
%{_bindir}/LayoutEditor %{_bindir}/LayoutEditor
%dir %{_datadir}/%{_name2} %dir %{_datadir}/%{capname}
%{_datadir}/%{_name2}/*.cfg %{_datadir}/%{capname}/*.cfg
%{_datadir}/%{_name2}/*.xml %{_datadir}/%{capname}/*.xml
%dir %{_datadir}/%{_name2}/Media %dir %{_datadir}/%{capname}/Media
%dir %{_datadir}/%{_name2}/Media/Common %{_datadir}/%{capname}/Media/Common/
%{_datadir}/%{_name2}/Media/Common/* %{_datadir}/%{capname}/Media/MyGUI_Media/
%dir %{_datadir}/%{_name2}/Media/MyGUI_Media %{_datadir}/%{capname}/Media/Tools/
%{_datadir}/%{_name2}/Media/MyGUI_Media/*
%dir %{_datadir}/%{_name2}/Media/Tools
%{_datadir}/%{_name2}/Media/Tools/*
%{_datadir}/applications/FontViewer.desktop %{_datadir}/applications/FontViewer.desktop
%{_datadir}/applications/ImageSetViewer.desktop %{_datadir}/applications/ImageSetViewer.desktop
%{_datadir}/applications/LayoutEditor.desktop %{_datadir}/applications/LayoutEditor.desktop
@ -290,8 +275,8 @@ done
%files devel %files devel
%defattr(-,root,root) %defattr(-,root,root)
%dir %{_includedir}/%{_name2} %dir %{_includedir}/%{capname}
%{_includedir}/%{_name2}/*.h %{_includedir}/%{capname}/*.h
%{_libdir}/libMyGUIEngine.so %{_libdir}/libMyGUIEngine.so
%{_libdir}/libMyGUI.OgrePlatform.a %{_libdir}/libMyGUI.OgrePlatform.a
%{_libdir}/pkgconfig/*.pc %{_libdir}/pkgconfig/*.pc
@ -300,7 +285,7 @@ done
%defattr(-,root,root) %defattr(-,root,root)
%doc Docs/html/* %doc Docs/html/*
%files -n libMyGUIEngine%{_SO_nr} %files -n libMyGUIEngine%{_sover}
%defattr(-,root,root) %defattr(-,root,root)
%{_libdir}/libMyGUIEngine.so.* %{_libdir}/libMyGUIEngine.so.*
@ -308,18 +293,8 @@ done
%defattr(-,root,root) %defattr(-,root,root)
%{_bindir}/%{name}-Demo_* %{_bindir}/%{name}-Demo_*
%{_libdir}/libPlugin_StrangeButton.so %{_libdir}/libPlugin_StrangeButton.so
#%dir %{_datadir}/%{_name2} #%dir %{_datadir}/%{capname}
#%dir %{_datadir}/%{_name2}/Media #%dir %{_datadir}/%{capname}/Media
%dir %{_datadir}/%{_name2}/Media/Demos %{_datadir}/%{capname}/Media/Demos/
%{_datadir}/%{_name2}/Media/Demos/*
%changelog %changelog
* Fri Feb 12 2010 Toni Graffy <toni@links2linux.de> - 3.0.1-0.pm.1
- update to 3.0.1
- renamed libmygui0 ==> libMyGUIEngine3
* Fri Oct 30 2009 Toni Graffy <toni@links2linux.de> - 2.2.3-0.pm.1
- update to 2.2.3
* Mon Apr 13 2009 Toni Graffy <toni@links2linux.de> - 2.2.2-0.pm.2
- rebuild with ogre-1.6.2
* Fri Mar 27 2009 Toni Graffy <toni@links2linux.de> - 2.2.2-0.pm.1
- initial build 2.2.2