File liballeg4_4.spec of Package allegro
Name: liballeg4_4
Version: 4.4.1.1
%define _version 4.4.1
Release: 1
Summary: A game programming library
Summary(es): Una librería de programación de juegos
Summary(fr): Une librairie de programmation de jeux
Summary(it): Una libreria per la programmazione di videogiochi
Summary(cs): Knihovna pro programování her
Group: System Environment/Libraries
License: Giftware
URL: http://alleg.sourceforge.net/
# http://downloads.sourceforge.net/alleg/allegro-%{version}.tar.gz
Source0: allegro-%{version}.tar.bz2
Source1: baselibs.conf
# PATCH-FIX-OPENSUSE %{name}-shared_plugins.patch cmorve69@yahoo.es -- Compile plugins as shared libs
Patch0: liballeg4_4-shared_plugins.patch
# PATCH-FIX-OPENSUSE %{name}-pkgconfig.patch cmorve69@yahoo.es -- Correct pkg-config files to reflect shared_plugins patch
Patch1: liballeg4_4-pkgconfig.patch
# PATCH-FIX-UPSTREAM %{name}-aliasing.patch sf#2977961 cmorve69@yahoo.es -- Fixes strict aliasing
Patch2: liballeg4_4-aliasing.patch
# PATCH-FIX-OPENSUSE %{name}-alsa_default.patch cmorve69@yahoo.es -- Make ALSA the default audio output instead of OSS
Patch3: liballeg4_4-alsa_default.patch
# PATCH-FEATURE-OPENSUSE %{name}-modules.patch cmorve69@yahoo.es -- Avoid allegro searching for modules that don't exist
Patch4: liballeg4_4-modules.patch
# PATCH-FIX-OPENSUSE %{name}-agl_no_dlopen.patch http://www.allegro.cc/forums/thread/600657 cmorve69@yahoo.es -- Link directly to libGL instead of dlopening, upstream doesn't likes it
Patch5: liballeg4_4-agl_no_dlopen.patch
# PATCH-FIX-UPSTREAM %{name}-missing_libs.patch sf#2977960 cmorve69@yahoo.es -- Add missing DT_NEEDED entries
Patch6: liballeg4_4-missing_libs.patch
BuildRequires: texinfo perl glib2-devel xorg-x11-devel xorg-x11-proto-devel
BuildRequires: xorg-x11-libX11-devel xorg-x11-libXext-devel
BuildRequires: xorg-x11-libXt-devel xorg-x11-libXpm-devel libjack-devel
BuildRequires: libogg-devel libvorbis-devel Mesa-devel libpng-devel alsa-devel
BuildRequires: cmake gcc-c++ pkg-config fdupes
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Provides: allegro = %{version}
Obsoletes: allegro < %{version}
%description
Allegro is a cross-platform library intended for use in computer games
and other types of multimedia programming.
%description -l es
Allegro es una librería multi-plataforma creada para ser usada en la
programación de juegos u otro tipo de programación multimedia.
%description -l fr
Allegro est une librairie multi-plateforme destinée à être utilisée
dans les jeux vidéo ou d'autres types de programmation multimédia.
%description -l it
Allegro è una libreria multipiattaforma dedicata all'uso nei
videogiochi ed in altri tipi di programmazione multimediale.
%description -l cs
Allegro je multiplatformní knihovna pro počítačové hry a jiné
typy multimediálního programování.
%package -n liballeg-devel
Summary: A game programming library
Summary(es): Una librería de programación de juegos
Summary(fr): Une librairie de programmation de jeux
Summary(it): Una libreria per la programmazione di videogiochi
Summary(cs): Knihovna pro programování her
Group: Development/Libraries
Requires: %{name} = %{version}
PreReq: %install_info_prereq
Provides: allegro-devel = %{version}
Obsoletes: allegro-devel < %{version}
%description -n liballeg-devel
Allegro is a cross-platform library intended for use in computer games
and other types of multimedia programming. This package is needed to
build programs written with Allegro.
%description -n liballeg-devel -l es
Allegro es una librería multi-plataforma creada para ser usada en la
programación de juegos u otro tipo de programación multimedia. Este
paquete es necesario para compilar los programas que usen Allegro.
%description -n liballeg-devel -l fr
Allegro est une librairie multi-plateforme destinée à être utilisée
dans les jeux vidéo ou d'autres types de programmation multimédia. Ce
package est nécessaire pour compiler les programmes utilisant Allegro.
%description -n liballeg-devel -l it
Allegro è una libreria multipiattaforma dedicata all'uso nei
videogiochi ed in altri tipi di programmazione multimediale. Questo
pacchetto è necessario per compilare programmi scritti con Allegro.
%description -n liballeg-devel -l cs
Allegro je multiplatformní knihovna pro počítačové hry a jiné
typy multimediálního programování. Tento balíček je je potřebný
k sestavení programů napsaných v Allegru.
%package -n allegro-tools
Summary: Extra tools for the Allegro programming library
Summary(es): Herramientas adicionales para la librería de programación Allegro
Summary(fr): Outils supplémentaires pour la librairie de programmation Allegro
Summary(it): Programmi di utilità aggiuntivi per la libreria Allegro
Summary(cs): Přídavné nástroje pro programovou knihovnu Allegro
Group: Development/Tools
%description -n allegro-tools
Allegro is a cross-platform library intended for use in computer games
and other types of multimedia programming. This package contains extra
tools which are useful for developing Allegro programs.
%description -n allegro-tools -l es
Allegro es una librería multi-plataforma creada para ser usada en la
programación de juegos u otro tipo de programación multimedia. Este
paquete contiene herramientas adicionales que son útiles para
desarrollar programas que usen Allegro.
%description -n allegro-tools -l fr
Allegro est une librairie multi-plateforme destinée à être utilisée
dans les jeux vidéo ou d'autres types de programmation multimédia. Ce
package contient des outils supplémentaires qui sont utiles pour le
développement de programmes avec Allegro.
%description -n allegro-tools -l it
Allegro è una libreria multipiattaforma dedicata all'uso nei
videogiochi ed in altri tipi di programmazione multimediale. Questo
pacchetto contiene programmi di utilità aggiuntivi utili allo sviluppo
di programmi con Allegro.
%description -n allegro-tools -l cs
Allegro je multiplatformní knihovna pro počítačové hry a jiné
typy multimediálního programování. Tento balíček obsahuje přídavné nástroje,
které jsou užitečné pro vývoj Allegro programů.
%package jack-plugin
Summary: Allegro JACK (Jack Audio Connection Kit) plugin
Group: System Environment/Libraries
Requires: %{name} = %{version}
%description jack-plugin
This package contains a plugin for Allegro which enables Allegro to playback
sound through JACK (Jack Audio Connection Kit).
%package oss-plugin
Summary: Allegro OSS (Open Sound System) plugin
Group: System Environment/Libraries
Requires: %{name} = %{version}
%description oss-plugin
This package contains a plugin for Allegro which enables Allegro to playback
sound through OSS (Open Sound System).
%package dga2-plugin
Summary: Allegro DGA2 (Direct Graphics Access) plugin
Group: System Environment/Libraries
Requires: %{name} = %{version}
%description dga2-plugin
This package contains a DGA2 (Direct Graphics Access) driver for Allegro.
%package -n liballeggl4_4
Summary: Allegro OpenGL bindings
Group: System Environment/Libraries
%description -n liballeggl4_4
This library allows to use OpenGL from Allegro.
%package -n liballeggl-devel
Summary: Development files for AllegroGL
Group: Development/Libraries
Requires: liballeggl4_4 = %{version}
%description -n liballeggl-devel
This package is needed to build programs that use AllegroGL.
%package -n libjpgalleg4_4
Summary: JPEG support library for Allegro
Group: System Environment/Libraries
%description -n libjpgalleg4_4
This library allows to load/save JPG images using standard Allegro image
handling functions.
%package -n libjpgalleg-devel
Summary: Development files for JPGAlleg
Group: Development/Libraries
Requires: libjpgalleg4_4 = %{version}
%description -n libjpgalleg-devel
This package is needed to build programs that use JPGAlleg.
%package -n libloadpng4_4
Summary: PNG support library for Allegro
Group: System Environment/Libraries
%description -n libloadpng4_4
This library allows to load/save PNG images using standard Allegro image
handling functions.
%package -n libloadpng-devel
Summary: Development files for Allegro's loadpng
Group: Development/Libraries
Requires: libloadpng4_4 = %{version}
%description -n libloadpng-devel
This package is needed to build programs that use Allegro's loadpng.
%package -n liblogg4_4
Summary: Ogg Vorbis support library for Allegro
Group: System Environment/Libraries
%description -n liblogg4_4
This library allows to use Ogg Vorbis sound files from Allegro.
%package -n liblogg-devel
Summary: Development files for Allegro's logg
Group: Development/Libraries
Requires: liblogg4_4 = %{version}
%description -n liblogg-devel
This package is needed to build programs that use Allegro's logg.
%prep
%setup -q -n allegro-%{version}
%patch0
%patch1
%patch2
%patch3
%patch4
%patch5
%patch6
%build
mkdir build
cd build
export CFLAGS='%{optflags}'
export CXXFLAGS='%{optflags}'
cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DLIB_SUFFIX=$(echo %{_lib} | cut -b4-) \
-DDOCDIR=%{_docdir} \
-DMANDIR=%{_mandir} \
-DINFODIR=%{_infodir} \
-DWANT_EXAMPLES=no \
-DWANT_TESTS=no \
..
%{__make} %{?jobs:-j%{jobs}} VERBOSE=1
%install
cd build
%{__make} DESTDIR=%{buildroot} install
%{__install} -pm 0755 docs/makedoc %{buildroot}%{_bindir}/allegro-makedoc
%{__rm} -f %{buildroot}%{_includedir}/alleggl_config.h
# Since the CMakeLists.txt file is wrong install them manually
%{__install} -dm 0755 %{buildroot}%{_mandir}/man3
%{__install} -pm 0644 docs/man/*.3 %{buildroot}%{_mandir}/man3
%fdupes -s %{buildroot}%{_mandir}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%post -n liballeggl4_4 -p /sbin/ldconfig
%postun -n liballeggl4_4 -p /sbin/ldconfig
%post -n libjpgalleg4_4 -p /sbin/ldconfig
%postun -n libjpgalleg4_4 -p /sbin/ldconfig
%post -n libloadpng4_4 -p /sbin/ldconfig
%postun -n libloadpng4_4 -p /sbin/ldconfig
%post -n liblogg4_4 -p /sbin/ldconfig
%postun -n liblogg4_4 -p /sbin/ldconfig
%post -n liballeg-devel
%install_info --info-dir=%{_infodir} %{_infodir}/allegro.info%{ext_info}
%postun -n liballeg-devel
%install_info_delete --info-dir=%{_infodir} %{_infodir}/allegro.info%{ext_info}
%files
%defattr(0644,root,root,0755)
%{_libdir}/liballeg.so.*
%{_libdir}/allegro
%exclude %{_libdir}/allegro/%{_version}/alleg-jack.so
%exclude %{_libdir}/allegro/%{_version}/alleg-ossdigi.so
%exclude %{_libdir}/allegro/%{_version}/alleg-ossmidi.so
%exclude %{_libdir}/allegro/%{_version}/alleg-dga2.so
%files -n liballeg-devel
%defattr(-,root,root,0755)
%{_docdir}/allegro-%{_version}
%{_bindir}/allegro-config
%{_bindir}/allegro-makedoc
%{_libdir}/liballeg.so
%{_includedir}/allegro.h
%{_includedir}/xalleg.h
%{_includedir}/allegro
%{_libdir}/pkgconfig/allegro.pc
%{_infodir}/allegro.info%{ext_info}
%{_mandir}/man3/*
%files -n allegro-tools
%defattr(-,root,root,-)
%{_bindir}/colormap
%{_bindir}/dat
%{_bindir}/dat2c
%{_bindir}/dat2s
%{_bindir}/exedat
%{_bindir}/grabber
%{_bindir}/pack
%{_bindir}/pat2dat
%{_bindir}/rgbmap
%{_bindir}/textconv
%files jack-plugin
%defattr(0644,root,root,0755)
%{_libdir}/allegro/%{_version}/alleg-jack.so
%files oss-plugin
%defattr(0644,root,root,0755)
%{_libdir}/allegro/%{_version}/alleg-ossdigi.so
%{_libdir}/allegro/%{_version}/alleg-ossmidi.so
%files dga2-plugin
%defattr(0644,root,root,0755)
%{_libdir}/allegro/%{_version}/alleg-dga2.so
%files -n liballeggl4_4
%defattr(0644,root,root,0755)
%{_libdir}/liballeggl.so.*
%files -n liballeggl-devel
%defattr(0644,root,root,0755)
%{_libdir}/liballeggl.so
%{_includedir}/alleggl.h
%{_includedir}/allegrogl
%{_libdir}/pkgconfig/allegrogl.pc
%files -n libjpgalleg4_4
%defattr(0644,root,root,0755)
%{_libdir}/libjpgalleg.so.*
%files -n libjpgalleg-devel
%defattr(0644,root,root,0755)
%{_libdir}/libjpgalleg.so
%{_includedir}/jpgalleg.h
%{_libdir}/pkgconfig/jpgalleg.pc
%files -n libloadpng4_4
%defattr(0644,root,root,0755)
%{_libdir}/libloadpng.so.*
%files -n libloadpng-devel
%defattr(0644,root,root,0755)
%{_libdir}/libloadpng.so
%{_includedir}/loadpng.h
%{_libdir}/pkgconfig/loadpng.pc
%files -n liblogg4_4
%defattr(0644,root,root,0755)
%{_libdir}/liblogg.so.*
%files -n liblogg-devel
%defattr(0644.root,root,0755)
%{_libdir}/liblogg.so
%{_includedir}/logg.h
%{_libdir}/pkgconfig/logg.pc