diff --git a/.cvsignore b/.cvsignore index e69de29..2fb86d7 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +alogg.zip diff --git a/AllegroOGG.pc.in b/AllegroOGG.pc.in new file mode 100644 index 0000000..be6033e --- /dev/null +++ b/AllegroOGG.pc.in @@ -0,0 +1,10 @@ +prefix=@prefix@ +exec_prefix=@prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: @name@ +Description: Ogg library for use with the Allegro game library +Version: @version@ +Libs: -l@name@ +Cflags: -I${includedir}/@name@ diff --git a/AllegroOGG.spec b/AllegroOGG.spec new file mode 100644 index 0000000..2cd3342 --- /dev/null +++ b/AllegroOGG.spec @@ -0,0 +1,87 @@ +Name: AllegroOGG +Version: 1.0.3 +Release: 2%{?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 +* Sat Apr 20 2006 Hans de Goede 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 1.0.3-1 +- Initial spec file diff --git a/sources b/sources index e69de29..db9edfb 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +b4e99081acdb4bedb3206bdfb3b4d209 alogg.zip