Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-release-src > by-pkgid > 83a6602d1cb3d625e814dda6e351db7a > files > 9

allegro-4.4.2-6.mga5.src.rpm

%define alt_version 4.4.2
%define beta	0
%if %{beta}
%define	release	%mkrel 1.beta%{beta}.%{rel}
%else
%define	release	%mkrel %{rel}
%endif

%define libname		%mklibname %{name} %{major}
%define	develname	%mklibname %{name} -d
%define	testlib		%mklibname allegro-testing %{major}
%define major		4.4

Name:		allegro
Version:	4.4.2
Release:	%mkrel 6
Summary:	Game programming library
%if %{beta}
Source0:	http://downloads.sourceforge.net/alleg/allegro/%{name}-%{version}-beta%{beta}.tar.gz
%else
Source0:	http://downloads.sourceforge.net/alleg/allegro/%{name}-%{version}.tar.gz
%endif
Patch1:         allegro-4.0.3-cfg.patch
Patch2:         allegro-4.0.3-libdir.patch
Patch3:		allegro-4.4.2-format_not_a_string_literal_and_no_format_arguments.patch
Patch4:         allegro-4.4.2-dynamic-addons.patch
Patch5:         allegro-4.4.2-doc-install.patch
Patch6:         allegro-4.4.2-buildsys-fix.patch
Patch7:         allegro-4.4.2-mageia-build_against_mesa_10.patch
License:	Public Domain
Group:		System/Libraries
URL:		http://alleg.sourceforge.net/
BuildRequires:	audiofile-devel
BuildRequires:	libx11-devel
BuildRequires:	libxcursor-devel
BuildRequires:	libxext-devel
BuildRequires:	libxpm-devel
BuildRequires:	libxxf86vm-devel
BuildRequires:	libxxf86dga-devel
BuildRequires:	jackit-devel
BuildRequires:	libpng-devel 
BuildRequires:	libjpeg-devel
BuildRequires:	libvorbis-devel
BuildRequires:	mesaglu-devel
BuildRequires:	texinfo
BuildRequires:	cmake
BuildRequires:	pkgconfig(alsa)
%ifarch %ix86
BuildRequires:	svgalib-devel
%endif
Obsoletes:	allegro-testing
Provides:	allegro-testing = %{version}-%{release}
Obsoletes:	allegro-arts-plugin

%description
Allegro is a library of functions for use in computer games

%package -n	%{libname}
Summary:	Game programming library
Group:		System/Libraries
Provides:	lib%{name} = %{version}-%{release}
Provides:	%{testlib} = %{version}-%{release}
Obsoletes:	%{testlib}
Recommends:	%{name} >= %{version}

%description -n	%{libname}
Allegro is a library of functions for use in computer games

%package -n	%{develname}
Summary:	Game programming library
Group:		Development/C++
Requires:	%{libname} = %{version}
Provides:	lib%{name}-devel = %{version}-%{release}
Provides:	%{name}-devel = %{version}-%{release}
Provides:	%{testlib}-devel = %{version}-%{release}
Obsoletes:	allegro-devel %{testlib}-devel
Obsoletes:	%{mklibname allegro 4.2 -d}

%description -n	%{develname}
Allegro is a library of functions for use in computer games.
This package contains files needed to build programs using Allegro.

%package jack-plugin
Summary:        Allegro JACK (Jack Audio Connection Kit) plugin
Group:          System/Libraries
Requires:       %{name} = %{version}-%{release}

%description jack-plugin
This package contains a plugin for Allegro which enables Allegro to playback
sound through JACK (Jack Audio Connection Kit).

%prep
%setup -q
%apply_patches

iconv -f iso-8859-1 -t utf-8 docs/src/allegro._tx > docs/src/allegro._tx.tmp
mv docs/src/allegro._tx.tmp docs/src/allegro._tx

%build
%define _disable_ld_no_undefined 1
%ifnarch ix86
export CFLAGS="%{optflags} -fPIC"
%endif

%cmake
%make
find demos examples setup -type f -perm +111 -print | xargs rm -rf

%install
%make_install -C build
# (from fedora) installation of these is broken, because they use a cmake GLOB, but
# that gets "resolved" when runnning cmake, and at that time the files
# to install aren't generated yet ...
install -d -m 755 %{buildroot}%{_mandir}/man3
install -D -m 644 build/docs/man/*3* %{buildroot}%{_mandir}/man3
install -d -m 755 %{buildroot}%{_infodir}
install -D -m 644 allegro.cfg %{buildroot}%{_sysconfdir}/allegrorc
install -d -m 755 %{buildroot}%{_datadir}/allegro
install -D -m 644 keyboard.dat language.dat %{buildroot}%{_datadir}/allegro

rm -rf %{buildroot}/usr/doc

%post -n %{develname}
%_install_info %{name}.info

%preun -n %{develname}
%_remove_install_info %{name}.info

%files
%doc %{_docdir}/%{name}-%{version}/*
%{_bindir}/colormap
%{_bindir}/dat
%{_bindir}/dat2c
%{_bindir}/dat2s
%{_bindir}/exedat
%{_bindir}/grabber
%{_bindir}/pack
%{_bindir}/pat2dat
%{_bindir}/rgbmap
%{_bindir}/textconv
%{_datadir}/allegro
%{_libdir}/%{name}
##%exclude %{_libdir}/allegro/%{alt_version}/alleg-esddigi.so
%exclude %{_libdir}/allegro/%{alt_version}/alleg-jack.so
%config(noreplace) %{_sysconfdir}/allegrorc

%files -n %{libname}
%{_libdir}/*.so.%{major}*

%files -n %{develname}
%doc *.txt AUTHORS CHANGES THANKS
%doc docs/txt/abi.txt docs/txt/ahack.txt docs/txt/allegro.txt
%doc docs/txt/const.txt docs/txt/faq.txt docs/txt/help.txt
%doc docs/html
%doc demos examples setup
%{_bindir}/%{name}-config
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%{_includedir}/*.h
%{_includedir}/allegro/*
%{_includedir}/allegrogl/*
%{_mandir}/man3/*3*
%{_infodir}/allegro.info*

%files jack-plugin
%{_libdir}/%{name}/%{alt_version}/alleg-jack.so


%changelog
* Wed Nov 12 2014 akien <akien> 4.4.2-6.mga5
+ Revision: 796582
- Build alsa module

* Sat Sep 27 2014 tv <tv> 4.4.2-5.mga5
+ Revision: 725936
- rebuild for missing pythoneggs deps

* Mon Sep 15 2014 tv <tv> 4.4.2-4.mga5
+ Revision: 675553
- s/uggests:/Recommends:/

* Tue Dec 10 2013 zezinho <zezinho> 4.4.2-4.mga4
+ Revision: 556200
- fix build against mesa 10

  + dams <dams>
    - clean specfile

* Wed Jul 24 2013 zezinho <zezinho> 4.4.2-3.mga4
+ Revision: 457825
- patches synced with fedora to enable loabpng, logg, jpgalleg libs #10616

* Fri Jan 11 2013 umeabot <umeabot> 4.4.2-2.mga3
+ Revision: 345511
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Wed Aug 17 2011 fwang <fwang> 4.4.2-1.mga2
+ Revision: 134222
- new version 4.4.2

* Sat Feb 26 2011 alien <alien> 4.4.1.1-4.mga1
+ Revision: 61036
- Remove BuildRoot
- Remove old macros
- imported package allegro