Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > 79a6ca165f00c0711b34d4223f47918f > files > 8

sdlbasic-2007.07.14-6.mga3.src.rpm

%define __arch_install_post %nil
%define _name sdlBasic
#define _provides_exceptions font\(.*\)\\|font\(:lang=.*\)

Name:		sdlbasic
Version:	2007.07.14
Release:	%mkrel 6
URL:		http://sdlbasic.sourceforge.net/
Source0:	%{_name}-src-%{version}.tgz
License:	LGPL
Group:		Development/Basic
Summary:	A small, efficient and multiplatform basic interpreter
Patch1:         scintilla-makefile-flags.patch
Patch2:         scite-makefile.patch
# fix missing DESTDIR
Patch3:		sdlbasic-makefile-install.patch
Patch4:		sdlbrt-makefile-install.patch
# fix SciteDefaultHome
Patch5:		sdlBasic-properties.patch
Patch6:		sdlbasic-exporters.patch
Patch7:		sdlbasic-link.patch
Patch8:		sdlbrt-drop-fonts.patch
BuildRequires:	gcc-c++
BuildRequires:  gtk2-devel
BuildRequires:  tiff-devel
BuildRequires:  jpeg-devel
BuildRequires:	SDL-devel
BuildRequires:  SDL_mixer-devel
BuildRequires:  SDL_image-devel
BuildRequires:  SDL_ttf-devel
BuildRequires:  SDL_net-devel
BuildRequires:  smpeg-devel
BuildRequires:  desktop-file-utils

Requires:	sdlbrt = %{version}-%{release}

%package -n sdlbrt
Summary:	%{_name} runtime interpreter
Group:		Development/Basic
Requires:	fonts-ttf-dejavu

%description
An easy basic in order to make games in 2d style amos for linux and windows.
The basic it comprises a module runtime, ide examples and games.

%description -n sdlbrt
%{_name} runtime interpreter

%prep
%setup -q -n usr/src/%{_name}
%__sed -i -e 's|/opt/sdlBasic|%{_prefix}|' -e 's|-o root -g root||' src/*/makefile src/*/*/makefile src/sdlBasic/gtk/sdlBasic.desktop 
%__sed -i 's|/opt/sdlBasic|%{_prefix}|' src/sdlBasic/gtk/sdlBasic.desktop 
%__sed -i 's|(guint)data|(unsigned long)data|' src/sdlBasic/gtk/SciTEGTK.cxx
%__sed -i 's|SYSCONF_PATH=$(prefix)/share/sdlBasic|SYSCONF_PATH=%{_sysconfdir}/sdlbasic|' src/sdlBasic/gtk/makefile
# fixes dejavu font dir
%__sed -i -e 's|fonts/ttf|fonts/TTF|' src/*/makefile src/*/*/makefile

%patch1
%patch2
%patch3
%patch4
%patch5
%patch6
%patch7 -p0
%patch8 -p4 -b .dropfonts

# due to patch5
%__sed -i -e 's|@BASEDIR@|%{_prefix}|' -e 's|@SDLBRT_PATH@|%{_bindir}/sdlBrt|' share/sdlBasic/sdlBasic.properties

%__cat > src/sdlBasic/gtk/sdlBasic.desktop << EOF
[Desktop Entry]
Categories=Development;IDE;
Comment=sdlBasic IDE
Comment[it]=IDE per sdlBasic
Encoding=UTF-8
Exec=sdlbasic
GenericName=Editor for sdlBasic language
GenericName[it]=Editor per il linguaggio sdlBasic
Icon=sdlbasic
Name=sdlBasic
Name[it]=sdlBasic
StartupNotify=true
Terminal=false
Type=Application
Version=1.0

EOF

# related to patch8
find . -type f -name "*.ttf" -delete

%build
cd src
./compile.sh
cd ..

%install
%makeinstall_std -C src/sdlBasic/gtk
%makeinstall_std os=linux -C src/sdlBrt
%__cp -r share/* %{buildroot}%{_datadir}
%__ln_s -f %{_name} %{buildroot}%{_bindir}/%{name}
%__ln_s -f sdlBrt %{buildroot}%{_bindir}/sdlbrt

%__install -m 755 -D src/sdlBasic/gtk/sdlBIDE48M.png %{buildroot}%{_iconsdir}/sdlbasic.png


desktop-file-install --vendor="" \
                     --dir="%{buildroot}%{_datadir}/applications" \
                     ./src/sdlBasic/gtk/sdlBasic.desktop

%files
%{_bindir}/%{name}
%{_bindir}/%{_name}
%dir %{_datadir}/doc/%{_name}
%dir %{_datadir}/%{_name}
%dir %{_sysconfdir}/%{name}
%{_datadir}/doc/%{_name}/*
%{_datadir}/%{_name}/*
%exclude %{_datadir}/%{_name}/*.properties
%{_sysconfdir}/%{name}/*
%exclude %{_sysconfdir}/%{name}/*.api
%{_iconsdir}/sdlbasic.png
%{_datadir}/applications/sdlBasic.desktop

%files -n sdlbrt
%{_bindir}/sdlBrt
%{_bindir}/sdlbrt


%changelog

* Wed Apr 10 2013 matteo <matteo> 2007.07.14-6.mga3
+ Revision: 409336
- dropped ttf fonts from the source package at prep time (sdlbrt should not package DejaVuSans*.ttf, mga#9354)
- added new requirement for sdlbrt subpackage (fonts-ttf-dejavu, mga#9354)
- added patch8 (makefile do not install fonts, mga#9354)
- fixed error into the sdlBasic desktop file (Icon)
- fixed missing version-release requirement (sdlbasic)

* Tue Mar 12 2013 lmenut <lmenut> 2007.07.14-5.mga3
+ Revision: 402110
- add exception in order to not provide font(*) & font(:lang=*)
  b/c arch packages shouldn't provide fonts (mga #8820c4)

* Mon Jan 14 2013 umeabot <umeabot> 2007.07.14-4.mga3
+ Revision: 381923
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Sun Oct 21 2012 malo <malo> 2007.07.14-3.mga3
+ Revision: 308988
- spec clean-up
- update RPM group

* Sun Dec 25 2011 fwang <fwang> 2007.07.14-2.mga2
+ Revision: 187460
- fix linkage
- rebuild for new libtiff

* Fri Sep 30 2011 matteo <matteo> 2007.07.14-1.mga2
+ Revision: 150402
- spec file cleaned
- patched Exporters.cxx
- fixed some bugs related to sdlbrt and configurations path
- splitted sdlbasic from sdlbrt (packages)
- imported package sdlbasic