]> git.pld-linux.org Git - packages/allegro.git/blobdiff - allegro.spec
- svga is no more - bcond disabled
[packages/allegro.git] / allegro.spec
index e5d83fe2ca4b94ba2f2fa85a9efcbbe3fc7eee08..191d86b5d573500b87d6b1ae0f1406f3935b966c 100644 (file)
@@ -1,16 +1,15 @@
 #
-# TODO: - check (and update if required) allegro-frame-pointer.patch
-#      - force install man pages (sometimes it just doesn't work)
-#      - check allegro-vga and allegro-svga packages if they should contains any files
-#      - unpackaged files
-#
 # Conditional build:
 %bcond_without alsa    # without ALSA modules
 %bcond_without dga2    # without DGA2 module
 %bcond_without jack    # without JACK module
-%bcond_without svga    # without svgalib module
-%bcond_without vga     # without vga module
+%bcond_with    svga    # without svgalib module
+%bcond_without vga     # without vga module (x86-only)
 #
+%ifnarch %{ix86}
+# x86_64 too?
+%undefine      with_vga
+%endif
 Summary:       A game programming library
 Summary(de.UTF-8):     Eine Bibliothek zur Programmierung von Spielen
 Summary(es.UTF-8):     Una biblioteca de programación de juegos
@@ -19,17 +18,26 @@ Summary(it.UTF-8):  Una libreria per la programmazione di videogiochi
 Summary(pl.UTF-8):     Biblioteka do programowania gier
 Name:          allegro
 Version:       4.4.1.1
-Release:       0.1
+Release:       2
 License:       Giftware
 Group:         Libraries
 Source0:       http://downloads.sourceforge.net/alleg/%{name}-%{version}.tar.gz
 # Source0-md5: 0f1cfff8f2cf88e5c91a667d9fd386ec
 Patch0:                %{name}-info.patch
-#Patch1: %{name}-frame-pointer.patch
-Patch2:                %{name}-config.patch
+Patch1:                %{name}-config.patch
 URL:           http://alleg.sourceforge.net/
+BuildRequires: OpenGL-GLU-devel
+BuildRequires: OpenGL-devel
 %{?with_alsa:BuildRequires:    alsa-lib-devel}
 BuildRequires: cmake >= 2.6
+BuildRequires: jack-audio-connection-kit-devel
+BuildRequires: libogg-devel
+BuildRequires: libpng-devel
+BuildRequires: libstdc++-devel
+BuildRequires: libvorbis-devel
+BuildRequires: pkgconfig
+BuildRequires: rpmbuild(macros) >= 1.577
+BuildRequires: sed >= 4.0
 %{?with_svga:BuildRequires:    svgalib-devel}
 BuildRequires: texinfo
 BuildRequires: xorg-lib-libX11-devel
@@ -70,6 +78,12 @@ Summary(es.UTF-8):   Archivos de inclusión
 Summary(pl.UTF-8):     Biblioteka do programowania gier - pliki nagłówkowe
 Group:         Development/Libraries
 Requires:      %{name} = %{version}-%{release}
+Requires:      xorg-lib-libX11-devel
+Requires:      xorg-lib-libXcursor-devel
+Requires:      xorg-lib-libXext-devel
+Requires:      xorg-lib-libXpm-devel
+Requires:      xorg-lib-libXxf86vm-devel
+Obsoletes:     allegro-static
 
 %description devel
 Allegro is a cross-platform library intended for use in computer games
@@ -106,66 +120,59 @@ grach komputerowych i innych rodzajach oprogramowania multimedialnego.
 Ten pakiet zawiera pliki nagłówkowe niezbędne do kompilowania
 aplikacji wykorzystujących bibliotekę allegro.
 
-%package static
-Summary:       A game programming library - static libraries
-Summary(pl.UTF-8):     Biblioteka do programowania gier - biblioteki statyczne
-Group:         Development/Libraries
-Requires:      %{name}-devel = %{version}-%{release}
-Requires:      xorg-lib-libX11-devel
-Requires:      xorg-lib-libXcursor-devel
-Requires:      xorg-lib-libXext-devel
-Requires:      xorg-lib-libXpm-devel
-Requires:      xorg-lib-libXxf86vm-devel
+%package dga2
+Summary:       A game programming library - DGA2 module
+Summary(pl.UTF-8):     Biblioteka do programowania gier - moduł dla DGA2
+Group:         Libraries
+Requires:      %{name} = %{version}-%{release}
 
-%description static
+%description dga2
 Allegro is a cross-platform library intended for use in computer games
 and other types of multimedia programming.
 
-This package contains static libraries for linking with allegro
-applications.
+This package contains module for use with DGA.
 
-%description static -l pl.UTF-8
+%description dga2 -l pl.UTF-8
 Allegro jest przenośną biblioteką przeznaczoną do wykorzystania w
 grach komputerowych i innych rodzajach oprogramowania multimedialnego.
 
-Ten pakiet zawiera biblioteki statyczne do konsolidacji z aplikacjami
-wykorzystującymi allegro.
+Ten pakiet zawiera moduł do wykorzystania z DGA.
 
-%package svgalib
-Summary:       A game programming library - svgalib module
-Summary(pl.UTF-8):     Biblioteka do programowania gier - moduł dla svgalib
+%package fbcon
+Summary:       A game programming library - FrameBuffer module
+Summary(pl.UTF-8):     Biblioteka do programowania gier - moduł dla FrameBuffera
 Group:         Libraries
 Requires:      %{name} = %{version}-%{release}
 
-%description svgalib
+%description fbcon
 Allegro is a cross-platform library intended for use in computer games
 and other types of multimedia programming.
 
-This package contains module for use with allegro and svgalib.
+This package contains module for use with Linux FrameBuffer.
 
-%description svgalib -l pl.UTF-8
+%description fbcon -l pl.UTF-8
 Allegro jest przenośną biblioteką przeznaczoną do wykorzystania w
 grach komputerowych i innych rodzajach oprogramowania multimedialnego.
 
-Ten pakiet zawiera moduł do wykorzystania allegro z svgalibem.
+Ten pakiet zawiera moduł do wykorzystania z linuksowym FrameBufferem.
 
-%package dga2
-Summary:       A game programming library - DGA2 module
-Summary(pl.UTF-8):     Biblioteka do programowania gier - moduł dla DGA2
+%package svgalib
+Summary:       A game programming library - svgalib module
+Summary(pl.UTF-8):     Biblioteka do programowania gier - moduł dla svgalib
 Group:         Libraries
 Requires:      %{name} = %{version}-%{release}
 
-%description dga2
+%description svgalib
 Allegro is a cross-platform library intended for use in computer games
 and other types of multimedia programming.
 
-This package contains module for use with DGA.
+This package contains module for use with allegro and svgalib.
 
-%description dga2 -l pl.UTF-8
+%description svgalib -l pl.UTF-8
 Allegro jest przenośną biblioteką przeznaczoną do wykorzystania w
 grach komputerowych i innych rodzajach oprogramowania multimedialnego.
 
-Ten pakiet zawiera moduł do wykorzystania z DGA.
+Ten pakiet zawiera moduł do wykorzystania allegro z svgalibem.
 
 %package vga
 Summary:       A game programming library - vga module
@@ -223,6 +230,39 @@ grach komputerowych i innych rodzajach oprogramowania multimedialnego.
 
 Ten pakiet zawiera moduł do wykorzystania z biblioteką dźwiękową JACK.
 
+%package addons
+Summary:       Allegro addon libraries
+Summary(pl.UTF-8):     Dodatkowe biblioteki Allegro
+Group:         Libraries
+Requires:      %{name} = %{version}-%{release}
+Obsoletes:     allegro-gl
+
+%description addons
+Allegro addon libraries: AllegroGL, JPGAlleg, loadpng, logg.
+
+%description addons -l pl.UTF-8
+Dodatkowe biblioteki Allegro: AllegroGL, JPGAlleg, loadpng, logg.
+
+%package addons-devel
+Summary:       Header files for Allegro addon libraries
+Summary(pl.UTF-8):     Pliki nagłówkowe dodatkowych bibliotek Allegro
+Group:         Development/Libraries
+Requires:      %{name}-addons = %{version}-%{release}
+Requires:      %{name}-devel = %{version}-%{release}
+Requires:      OpenGL-GLU-devel
+Requires:      OpenGL-devel
+Requires:      libpng-devel
+Requires:      libvorbis-devel
+Obsoletes:     allegro-gl-devel
+
+%description addons-devel
+Header files for Allegro addon libraries: AllegroGL, JPGAlleg,
+loadpng, logg.
+
+%description addons-devel -l pl.UTF-8
+Pliki nagłówkowe dodatkowych bibliotek Allegro: AllegroGL, JPGAlleg,
+loadpng, logg.
+
 %package tools
 Summary:       A game programming library - tools
 Summary(de.UTF-8):     Zusätzliche Hilfprogramme für die Allegro Bibliothek
@@ -298,27 +338,25 @@ biblioteki allegro.
 %prep
 %setup -q
 %patch0 -p1
-#%%patch1 -p1
-%patch2 -p1
+%patch1 -p1
+
+sed -i -e 's/ADDON_LINKAGE STATIC/ADDON_LINKAGE SHARED/' CMakeLists.txt
 
 %build
 install -d build
 cd build
 %cmake .. \
-       -DCMAKE_BUILD_TYPE=%{!?debug:Release}%{?debug:Debug} \
-       -DCMAKE_INSTALL_PREFIX=%{_prefix} \
-       -DMANDIR=%{_mandir} \
        -DINFODIR=%{_infodir} \
+       -DPLATFORM_LIBS=-ldl \
+       -DWANT_LINUX_CONSOLE=1 \
        %{!?with_vga:-DWANT_LINUX_VGA=off} \
-       %{!?with_svga:-DWANT_LINUX_SVGALIB=off} \
-%if "%{_lib}" == "lib64"
-       -DLIB_SUFFIX=64
-%endif
+       %{!?with_svga:-DWANT_LINUX_SVGALIB=off}
 
 %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{_mandir}/man3
 
 %{__make} -C build install \
        DESTDIR=$RPM_BUILD_ROOT
@@ -326,27 +364,37 @@ rm -rf $RPM_BUILD_ROOT
 install modules.lst $RPM_BUILD_ROOT%{_libdir}/allegro/%{version}
 
 # install examples and tests
-find build/examples -perm 755 -maxdepth 1 -name "ex*" -exec install {} $RPM_BUILD_ROOT%{_bindir} \;
-find build/tests -perm 755 -maxdepth 1 ! -name CMakeFiles -exec install {} $RPM_BUILD_ROOT%{_bindir} \;
+find build/examples -maxdepth 1 -perm 755 -name "ex*" -exec install {} $RPM_BUILD_ROOT%{_bindir} \;
+find build/tests -maxdepth 1 -perm 755 ! -name CMakeFiles -exec install {} $RPM_BUILD_ROOT%{_bindir} \;
+
+# force install man pages
+cp build/docs/man/* $RPM_BUILD_ROOT%{_mandir}/man3
 
 mv $RPM_BUILD_ROOT%{_bindir}/play{,-allegro}
 mv $RPM_BUILD_ROOT%{_bindir}/test{,-allegro}
 
+%{__rm} -r $RPM_BUILD_ROOT%{_prefix}/doc/allegro-4.4.1
+
 %clean
+rm -rf $RPM_BUILD_ROOT
+
 %post  -p /sbin/ldconfig
 %postun        -p /sbin/ldconfig
 
-%post devel    -p      /sbin/postshell
+%post  devel -p /sbin/postshell
 -/usr/sbin/fix-info-dir -c %{_infodir}
 
-%postun devel  -p      /sbin/postshell
+%postun        devel -p /sbin/postshell
 -/usr/sbin/fix-info-dir -c %{_infodir}
 
+%post  addons -p /sbin/ldconfig
+%postun        addons -p /sbin/ldconfig
+
 %files
 %defattr(644,root,root,755)
 %doc AUTHORS CHANGES THANKS readme.txt todo.txt
 %attr(755,root,root) %{_libdir}/liballeg.so.*.*.*
-%attr(755,root,root) %{_libdir}/liballeg.so
+%attr(755,root,root) %ghost %{_libdir}/liballeg.so.4.4
 %dir %{_libdir}/allegro
 %dir %{_libdir}/allegro/4.4.1
 %{_libdir}/allegro/4.4.1/modules.lst
@@ -354,15 +402,15 @@ mv $RPM_BUILD_ROOT%{_bindir}/test{,-allegro}
 %files devel
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/allegro-config
-%{_includedir}/*
-#%%{_mandir}/man3/*
-%{_infodir}/*.info*
-
-%if %{with svga}
-%files svgalib
-%defattr(644,root,root,755)
-#%%attr(755,root,root) %{_libdir}/allegro/%{version}/alleg-svgalib.so
-%endif
+%attr(755,root,root) %{_libdir}/liballeg.so
+%{_includedir}/allegro
+%{_includedir}/allegro.h
+%{_includedir}/linalleg.h
+%{_includedir}/xalleg.h
+# XXX: aren't some names too generic?
+%{_mandir}/man3/*.3*
+%{_infodir}/allegro.info*
+%{_pkgconfigdir}/allegro.pc
 
 %if %{with dga2}
 %files dga2
@@ -370,12 +418,20 @@ mv $RPM_BUILD_ROOT%{_bindir}/test{,-allegro}
 %attr(755,root,root) %{_libdir}/allegro/4.4.1/alleg-dga2.so
 %endif
 
-%ifarch %{ix86}
+%files fbcon
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/allegro/4.4.1/alleg-fbcon.so
+
+%if %{with svga}
+%files svgalib
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/allegro/4.4.1/alleg-svgalib.so
+%endif
+
 %if %{with vga}
 %files vga
 %defattr(644,root,root,755)
-#%%attr(755,root,root) %{_libdir}/allegro/%{version}/alleg-vga.so
-%endif
+%attr(755,root,root) %{_libdir}/allegro/4.4.1/alleg-vga.so
 %endif
 
 %if %{with alsa}
@@ -391,6 +447,33 @@ mv $RPM_BUILD_ROOT%{_bindir}/test{,-allegro}
 %attr(755,root,root) %{_libdir}/allegro/4.4.1/alleg-jack.so
 %endif
 
+%files addons
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/liballeggl.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/liballeggl.so.4.4
+%attr(755,root,root) %{_libdir}/libjpgalleg.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libjpgalleg.so.4.4
+%attr(755,root,root) %{_libdir}/libloadpng.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libloadpng.so.4.4
+%attr(755,root,root) %{_libdir}/liblogg.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/liblogg.so.4.4
+
+%files addons-devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/liballeggl.so
+%attr(755,root,root) %{_libdir}/libjpgalleg.so
+%attr(755,root,root) %{_libdir}/libloadpng.so
+%attr(755,root,root) %{_libdir}/liblogg.so
+%{_includedir}/allegrogl
+%{_includedir}/alleggl.h
+%{_includedir}/jpgalleg.h
+%{_includedir}/loadpng.h
+%{_includedir}/logg.h
+%{_pkgconfigdir}/allegrogl.pc
+%{_pkgconfigdir}/jpgalleg.pc
+%{_pkgconfigdir}/loadpng.pc
+%{_pkgconfigdir}/logg.pc
+
 %files tools
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/colormap
This page took 0.100354 seconds and 4 git commands to generate.