a8840b6
Name:           alfont
a8840b6
Version:        2.0.6
8c929d5
Release:        8%{?dist}
a8840b6
Summary:        Font rendering library for the Allegro game library
a8840b6
Group:          System Environment/Libraries
19a3011
License:        FTL
a8840b6
URL:            http://chernsha.sitesled.com/
a8840b6
# this is http://chernsha.sitesled.com/AlFont206.rar repackaged in .tgz format
a8840b6
Source0:        %{name}-%{version}.tar.gz
a8840b6
Patch0:         alfont-2.0.6-linux.patch
a8840b6
BuildRequires:  allegro-devel freetype-devel
a8840b6
a8840b6
%description
a8840b6
alfont also known as AllegroFont or AlFont is a wrapper around the freetype2
a8840b6
library for use with the Allegro game library. Thus allowing the display of
a8840b6
text using freetype fonts on Allegro bitmaps.
a8840b6
a8840b6
a8840b6
%package        devel
a8840b6
Summary:        Development files for %{name}
a8840b6
Group:          Development/Libraries
a8840b6
Requires:       %{name} = %{version}-%{release}
a8840b6
Requires:       allegro-devel
a8840b6
a8840b6
%description    devel
a8840b6
The %{name}-devel package contains libraries and header files for
a8840b6
developing applications that use %{name}.
a8840b6
a8840b6
a8840b6
%prep
a8840b6
%setup -q
a8840b6
%patch0 -p1 -z .linux
a8840b6
sed -i s'/\r//g' freetype/docs/FTL.TXT
a8840b6
a8840b6
a8840b6
%build
a8840b6
# Upstreams makefile uses its own private copy of freetype, since all
a8840b6
# we want is the wrapper and since the wrapper is only one file we
a8840b6
# do a manual compile here
a8840b6
gcc -fPIC -DPIC $RPM_OPT_FLAGS -Iinclude `freetype-config --cflags` \
a8840b6
  -o src/alfont.o -c src/alfont.c
a8840b6
gcc -shared -Wl,-soname,lib%{name}.so.2 -o lib%{name}.so.%{version} \
0e6795f
  src/alfont.o $(freetype-config --libs) $(allegro-config --libs)
a8840b6
a8840b6
a8840b6
%install
a8840b6
mkdir -p $RPM_BUILD_ROOT%{_libdir}
a8840b6
mkdir -p $RPM_BUILD_ROOT%{_includedir}
a8840b6
install -m 755 lib%{name}.so.%{version} $RPM_BUILD_ROOT%{_libdir}
a8840b6
ln -s lib%{name}.so.%{version} $RPM_BUILD_ROOT%{_libdir}/lib%{name}.so.2
a8840b6
ln -s lib%{name}.so.%{version} $RPM_BUILD_ROOT%{_libdir}/lib%{name}.so
a8840b6
install -m 644 include/%{name}*.h $RPM_BUILD_ROOT%{_includedir}
a8840b6
a8840b6
a8840b6
%post -p /sbin/ldconfig
a8840b6
%postun -p /sbin/ldconfig
a8840b6
a8840b6
a8840b6
%files
a8840b6
%defattr(-,root,root,-)
a8840b6
%doc CHANGES.txt README.txt freetype/docs/FTL.TXT
a8840b6
%{_libdir}/lib%{name}.so.*
a8840b6
a8840b6
%files devel
a8840b6
%defattr(-,root,root,-)
a8840b6
%{_includedir}/%{name}*.h
a8840b6
%{_libdir}/lib%{name}.so
a8840b6
a8840b6
a8840b6
%changelog
8c929d5
* Fri Jul 15 2011 Hans de Goede <hdegoede@redhat.com> - 2.0.6-8
8c929d5
- Rebuild for new allegro-4.4
8c929d5
f290150
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.6-7
f290150
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
f290150
8678def
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.6-6
8678def
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
8678def
af7128b
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.6-5
af7128b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
af7128b
17c7e1d
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 2.0.6-4
17c7e1d
- Autorebuild for GCC 4.3
17c7e1d
19a3011
* Wed Sep  5 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 2.0.6-3
19a3011
- Update license tag
19a3011
a8840b6
* Sun Dec  3 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 2.0.6-2
a8840b6
- Link the .so file with allegro (bz 217998)
a8840b6
- Add "Requires: allegro-devel" to the -devel subpackage
a8840b6
a8840b6
* Thu Nov 30 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 2.0.6-1
a8840b6
- Initial FE package