a8840b6
Name:           alfont
e5179ca
Version:        2.0.9
959f1c6
Release:        3%{?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/
e5179ca
# this is http://chernsha.sitesled.com/AlFont209.rar repackaged in .tgz format
a8840b6
Source0:        %{name}-%{version}.tar.gz
e5179ca
Patch0:         alfont-2.0.9-linux.patch
959f1c6
Patch1:         alfont-2.0.9-remove-alfont_get_string.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
959f1c6
%patch1 -p1
e5179ca
for i in include/alfont*.h freetype/docs/FTL.TXT; do
e5179ca
    sed -i.orig s'/\r//g' $i
e5179ca
    touch -r $i.orig $i
e5179ca
done
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
%doc CHANGES.txt README.txt freetype/docs/FTL.TXT
a8840b6
%{_libdir}/lib%{name}.so.*
a8840b6
a8840b6
%files devel
a8840b6
%{_includedir}/%{name}*.h
a8840b6
%{_libdir}/lib%{name}.so
a8840b6
a8840b6
a8840b6
%changelog
959f1c6
* Sun Jul 29 2012 Hans de Goede <hdegoede@redhat.com> - 2.0.9-3
959f1c6
- Fix undefined reference to _msize
959f1c6
64090f4
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.9-2
64090f4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
64090f4
e5179ca
* Thu Jul  5 2012 Hans de Goede <hdegoede@redhat.com> - 2.0.9-1
e5179ca
- New upstream release 2.0.9
e5179ca
3c3dccc
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.6-9
3c3dccc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
3c3dccc
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