File ttf2pt1.spec of Package ttf2pt1

#
# spec file for package ttf2pt1
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           ttf2pt1
BuildRequires:  freetype2-devel
Requires:       t1utils
Summary:        True Type Font to PostScript Type 1 font converter
License:        BSD-3-Clause
Group:          Productivity/Publishing/PS
Version:        344
Release:        0
Url:            http://ttf2pt1.sourceforge.net/
# original Sources are .tgz
Source0:        http://download.sourceforge.net/ttf2pt1/ttf2pt1-3.4.4.tar.bz2
Source1:        http://download.sourceforge.net/ttf2pt1/ttf2pt1-chinese-3.4.0.tar.bz2
Source2:        README.SuSE
Patch0:         %{name}.diff
Patch1:         ttf2pt1-3.4.1-freetype2.diff
Patch2:         freetype-2.1.7.patch
Patch3:         ttf2pt1-3.4.4-fix-convert.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
This is a collection of tools and scripts that allow to convert True
Type Fonts (as used by MS Wind*ws) to be converted to Postscript Type 1
fonts, so they can be used in X11 and Ghostscript.



Authors:
--------
    Mark Heath <mheath@netspace.net.au>
    Sergey Babkin <babkin@bellatlantic.net>
    Andrew Weeks <ccsaw@bath.ac.uk>
    Frank M. Siegert <fms@this.net>

%prep 
%setup -n %{name}-3.4.4 -a 1
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1

%build
make CFLAGS_SYS="$RPM_OPT_FLAGS -fno-strict-aliasing"

%install
[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT;
make INSTDIR=$RPM_BUILD_ROOT/usr MANDIR=$RPM_BUILD_ROOT/%{_mandir} install
mkdir -p $RPM_BUILD_ROOT/etc/%{name}
cp -ai $RPM_BUILD_ROOT/usr/share/%{name}/scripts/convert.cfg.sample \
       $RPM_BUILD_ROOT/etc/%{name}/convert.cfg
cp -a ttf2pt1-chinese-*/*.map $RPM_BUILD_ROOT/usr/share/%{name}/maps/
rm -f  $RPM_BUILD_ROOT/usr/share/%{name}/scripts/{inst_dir,inst_file,mkrel,html2man}
rm -rf  $RPM_BUILD_ROOT/usr/share/%{name}/app/{RPM,X11}
mkdir -p $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}/{app,encodings,other}
for i in COPYRIGHT FONTS* README* CHANGES* app encodings other
do
    ln -s /usr/share/%{name}/$i $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}/$i
done
cp -a %{S:2} $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-, root, root)
%doc %{_defaultdocdir}/%{name}
%dir /etc/%{name}
%config(noreplace) /etc/%{name}/*
/usr/bin/*
/usr/lib/ttf2pt1
/usr/share/%{name}
%{_mandir}/man1/*

%changelog
openSUSE Build Service is sponsored by