File fontlinge.spec of Package Fontlinge

#%define __os_install_post true # workaround for SuSE 8.2 (and other?)
# (compressing the fontlinge::* manpages failed because they are already compressed)
# -> no longer needed, tested on SUSE 9.3 - 10.2, Mandriva 2006, Fedora Core 4 and 5

Summary: 	Font management and organisation for TrueType and PostScript fonts
Name: 		fontlinge
Version: 	2.1
Release: 	1
License: 	GPL
Group: 		Productivity/Graphics/Other
Prefix:     %{_prefix}
Prefix:     %{perl_vendorlib}
BuildRoot:  %{_tmppath}/%{name}-%{version}-buildroot

# for perl scripts
PreReq:     perl >= 5.6
Requires:   ImageMagick
Requires:   perl(bytes) perl(utf8) perl(Cwd) perl(DBD::mysql) perl(DBI) perl(File::Compare) perl(File::Copy) 
# perl(ExtUtils::MakeMaker) 
Requires:   perl(File::Find) perl(File::Path) perl(File::Spec) perl(File::stat) perl(File::Temp) perl(Fcntl) perl(Getopt::Long) 
Requires:   perl(Image::Magick) perl(IO::Handle) perl(POSIX) perl(Socket) perl(Term::ReadKey) perl(Time::HiRes) perl(User::pwent) 

# for the WebGUI
Requires:   mod_php_any php-mysql php-gd tar

Provides:   perl(fontlinge::Config) = %{version} perl(fontlinge::Filebasics) = %{version} perl(fontlinge::Fontling) = %{version}
Autoreqprov: on
BuildArchitectures: noarch

BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl-macros

Searches for font files, sorts them into folders by name and look
and with human readable names, stores gathered font information in
a database, can generate previews and posters, can find and remove
duplicates and can reunite PostScript font families.

Also, Fontlinge have a web interface to browse through your fonts.
It shows detail previews and font infos, provides font download as
tarball and has the possibility to sort fonts.

    Joerg Rossdeutscher <>
    Christian Boltz <rpms  A T  cboltz  D O T  de>

%setup -q

./configure \
	--verbose \
	--prefix "%{_prefix}" \
	--bindir "%{_bindir}" \
	--perllibdir "%{perl_vendorlib}" \
	--docdir "%{_docdir}/%{name}" \
    --mandir=%{_mandir} \

make \
rm ${RPM_BUILD_ROOT}%{perl_vendorlib}/auto/fontlinge/Fontling/.packlist
rm ${RPM_BUILD_ROOT}%{perl_vendorlib}/perllocal.pod
%if 0%{?mandriva_version} >= 2006
touch ${RPM_BUILD_ROOT}/%{_datadir}/%{name}/webgui/

perl -e "use fontlinge::Config" || { echo >&2 ; echo "ERROR: Fontlinge Perl module cannot be found by perl." >&2 ; echo "Please uninstall this package (rpm -e fontlinge) and reinstall with" >&2 ; echo "rpm -Uhv --relocate %{perl_vendorlib}=/a/path/in/@INC fontlinge-%{version}-noarch.rpm" >&2 ; exit 1 ; }

%if 0%{?mandriva_version} >= 2006
%ghost %config /%{_datadir}/%{name}/webgui/
%dir %{perl_vendorlib}/fontlinge/

%doc %{_mandir}/man3/fontlinge::*.3pm
%doc %{_docdir}/fontlinge