Name: AllegroOGG
Version: 1.0.3
Release: 6%{?dist}
Summary: Ogg library for use with the Allegro game library
Group: System Environment/Libraries
License: BSD
URL: http://nekros.freeshell.org/delirium/alogg.html
Source0: http://www.hero6.com/filereviver/alogg.zip
Source1: AllegroOGG.pc.in
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: allegro-devel libvorbis-devel
%description
%{name} is an Allegro wrapper for the Ogg Vorbis decoder from the Xiph.org
foundation. This lib lets you play OGGs and convert OGGs to Allegro SAMPLEs
amongst a lot of other capabilites.
%package devel
Summary: Developmental libraries and include files for AllegroOgg
Group: Development/Libraries
Requires: %{name} = %{version}
Requires: allegro-devel pkgconfig
%description devel
Development libraries and include files for developing applications using
the %{name} library.
%prep
%setup -q -c
%{__sed} -i 's/\r//' docs/A*.txt
%{__sed} -e "s#@prefix@#%{_prefix}#g" -e "s#@libdir@#%{_libdir}#g" \
-e "s#@includedir@#%{_includedir}#g" -e "s#@version@#%{version}#g" \
-e "s#@name@#%{name}#" %{SOURCE1} > %{name}.pc
%build
# makefile doesn't support creating an .so, and wants to use its own version
# of libogg and libvorbis and there is only one source file so lets DIY
gcc $RPM_OPT_FLAGS -fPIC -DPIC -Iinclude -c src/alogg.c -o src/alogg.o
gcc -g -shared -Wl,-soname=lib%{name}.so.0 -o lib%{name}.so.0 \
src/alogg.o -logg -lvorbis -lvorbisfile \
`allegro-config --libs | sed 's/-lalleg_unsharable//'`
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_libdir}/pkgconfig
install -m 755 lib%{name}.so.0 $RPM_BUILD_ROOT%{_libdir}
ln -s lib%{name}.so.0 $RPM_BUILD_ROOT%{_libdir}/lib%{name}.so
install -m 644 %{name}.pc $RPM_BUILD_ROOT%{_libdir}/pkgconfig
mkdir -p $RPM_BUILD_ROOT%{_includedir}/%{name}
install -m 644 include/* $RPM_BUILD_ROOT%{_includedir}/%{name}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc docs/*.txt
%{_libdir}/*.so.*
%files devel
%{_includedir}/%{name}
%{_libdir}/*.so
%{_libdir}/pkgconfig/%{name}.pc
%changelog
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.3-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.3-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.0.3-4
- Autorebuild for GCC 4.3
* Mon Aug 28 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 1.0.3-3
- FE6 Rebuild
* Sat Apr 20 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 1.0.3-2
- Rename .so file from liballog.so(.0) to libAllegroOGG.so(.0) and put the
headers in /usr/include/AllegroOGG to avoid any future conflicts with the
(unpackaged) alogg library which unsurprisingly installs libalogg.so too.
- Add a pkgconfig file to allow apps to get the proper CFLAGS and LIBS for
this change. (bz 188625)
* Tue Apr 11 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 1.0.3-1
- Initial spec file