diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1c16a91 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +xgridfit-xgridfit.tar.gz diff --git a/dead.package b/dead.package deleted file mode 100644 index e92c3d0..0000000 --- a/dead.package +++ /dev/null @@ -1 +0,0 @@ -xgridfit fails to build from source: https://bugzilla.redhat.com/show_bug.cgi?id=1676231 diff --git a/sources b/sources new file mode 100644 index 0000000..636a1da --- /dev/null +++ b/sources @@ -0,0 +1 @@ +73b5bbf484a0761ec878f817b5c15b44 xgridfit-xgridfit.tar.gz diff --git a/xgridfit-2.2a-maindir-in-python.patch b/xgridfit-2.2a-maindir-in-python.patch new file mode 100644 index 0000000..dde987a --- /dev/null +++ b/xgridfit-2.2a-maindir-in-python.patch @@ -0,0 +1,26 @@ +diff -uNr xgridfit-2.2a.orig/Makefile xgridfit-2.2a/Makefile +--- xgridfit-2.2a.orig/Makefile 2010-03-30 17:58:56.000000000 +0200 ++++ xgridfit-2.2a/Makefile 2010-06-06 19:04:26.302726506 +0200 +@@ -46,7 +46,9 @@ + done + @install -d -m 0755 $(DESTDIR)$(MANDIR)/man1 + @install -p -m 0644 man/*.1 $(DESTDIR)$(MANDIR)/man1 +- @cd python ; python setup.py install --root=$(DESTDIR)/ ++ @rm -fr python.tmp ; cp -pr python python.tmp ; sed -i -e "s|@xgridfit_dir@|${MAINDIR}|g" python.tmp/xgflib.py ++ @cd python.tmp ; python setup.py install --root=$(DESTDIR)/ ++ @cd - ; rm -fr python.tmp + @echo "Xgridfit installed successfully." + + +diff -uNr xgridfit-2.2a.orig/python/xgflib.py xgridfit-2.2a/python/xgflib.py +--- xgridfit-2.2a.orig/python/xgflib.py 2010-03-30 17:26:55.000000000 +0200 ++++ xgridfit-2.2a/python/xgflib.py 2010-06-06 18:55:45.840596588 +0200 +@@ -18,7 +18,7 @@ + VERSION = '2.2' + JAVA_EXECUTABLE = 'java' + DISPLAY_DIAGNOSTIC_MESSAGES = False +-XGRIDFIT_DIR = abspath('/usr/local/share/xml/xgridfit/') ++XGRIDFIT_DIR = abspath('@xgridfit_dir@') + XSLT_DIR = abspath(join(XGRIDFIT_DIR, 'lib')) + UTIL_DIR = abspath(join(XGRIDFIT_DIR, 'utils')) + SCHEMA_DIR = abspath(join(XGRIDFIT_DIR, 'schemas')) diff --git a/xgridfit.spec b/xgridfit.spec new file mode 100644 index 0000000..f74a3a0 --- /dev/null +++ b/xgridfit.spec @@ -0,0 +1,167 @@ +%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")} + +%global alphatag 20100725cvs +%global patchlevel a + +%global archivever %{!?alphatag:%{version}%{?patchlevel}}%{?alphatag:%{name}} + +Name: xgridfit +Version: 2.2 +Release: 6%{?patchlevel:.%{patchlevel}}%{?alphatag:.%{alphatag}}%{?dist} +Summary: Font hinting tool + +# This is where we drop fontforge +Group: Applications/Publishing +License: LGPLv2 +URL: http://%{name}.sf.net/ +Source0: %{!?alphatag:http://downloads.sourceforge.net/%{name}/}%{name}-%{archivever}.tar.gz +Patch1: %{name}-2.2a-maindir-in-python.patch + + +BuildArch: noarch + +BuildRequires: python2-devel + +Requires: %{_bindir}/xsltproc, fontforge, libxml2-python +Requires(post): %{_bindir}/xmlcatalog +Requires(preun): %{_bindir}/xmlcatalog + +%description +Xgridfit is a high-level, XML-based language for gridfitting, or ‘hinting’, +fonts. The Xgridfit program compiles an XML source file into tables and +instructions that relate to the gridfitting of glyphs. Xgridfit does not +insert these elements into a font itself, but rather relies on FontForge, the +Open-Source font editor, to do so. + + +%package doc +Group: Documentation +Summary: Font hinting tool use documentation +# Does not really make sense without the tool itself +Requires: %{name} = %{version}-%{release} + +%description doc +Xgridfit font hinting tool user documentation. + + +%prep +%setup -q -n %{name} +%patch1 -p1 -b .mip + +%build + + +%install +rm -fr %{buildroot} + +make install DESTDIR=%{buildroot} \ + BINDIR=%{_bindir} \ + MANDIR=%{_mandir} \ + MAINDIR=%{_datadir}/xml/%{name}-%{version} + +# Simplify preun/post catalog logic +ln -s catalog.xml \ + %{buildroot}%{_datadir}/xml/%{name}-%{version}/schemas/catalog-%{version}.%{release}.xml + +%clean +rm -fr %{buildroot} + + +%post +cd %{_sysconfdir}/xml +[ -e catalog ] || xmlcatalog --noout --create catalog +xmlcatalog --noout --add \ + nextCatalog %{_datadir}/xml/%{name}-%{version}/schemas/catalog-%{version}.%{release}.xml "" catalog >/dev/null +: + + +%preun +xmlcatalog --noout --del \ + %{_datadir}/xml/%{name}-%{version}/schemas/catalog-%{version}.%{release}.xml \ + %{_sysconfdir}/xml/catalog >/dev/null >/dev/null +: + + + +%files +%defattr(0644,root,root,0755) +%doc COPYING ChangeLog + +%{_datadir}/xml/%{name}-%{version} +%{_mandir}/man1/* + +%{python_sitelib}/* + +%defattr(0755,root,root,0755) +%{_bindir}/* + + +%files doc +%defattr(0644,root,root,0755) +%doc docs/* + + +%changelog +* Mon Feb 07 2011 Fedora Release Engineering - 2.2-6.a.20100725cvs +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Thu Jul 29 2010 Nicolas Mailhot +- 2.2-5.a.20100725cvs +— Rebuild against python 2.7 + +* Sun Jul 25 2010 Nicolas Mailhot +- 2.2-4.a.20100725cvs +— Bump to cvs version (required by edrip) + +* Sun Jun 6 2010 Nicolas Mailhot +- 2.2-3.a +— Fix hardcoded path in python module +- 2.2-2.a +— Add missing requires + +* Sat Jun 5 2010 Nicolas Mailhot +- 2.2-1.a +— Major upstream changes (python utilities, namespace, etc) + +* Mon Jul 27 2009 Fedora Release Engineering +- 1.19-2.b +— Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Tue Jul 14 2009 Nicolas Mailhot +- 1.19-1.b +— Rework to use upstream makefile now there is one + +* Thu Feb 26 2009 Fedora Release Engineering +- 1.17-4.a +— Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Mon Feb 23 2009 Nicolas Mailhot +- 1.17-3.a +— global-ization + +* Mon Feb 16 2009 Nicolas Mailhot +- 1.17-2.a + +* Fri Jan 30 2009 Nicolas Mailhot +- 1.17-1 + +* Fri Nov 14 2008 Nicolas Mailhot +- 1.11-1.a +◮ update for F11 cycle + +* Mon Sep 1 2008 Nicolas Mailhot +- 1.9-1 +ᕏ Major update, many changes +ᕚ Only package xsltproc support for now + +* Sun May 18 2008 Nicolas Mailhot +- 1.6-3 +⊸ Lots of new makefile goodness + +* Thu Mar 13 2008 Nicolas Mailhot +- 1.5-2 +✓ Fix path munging + +* Tue Mar 11 2008 Nicolas Mailhot +- 1.5-1 +✓ Initial Fedora packaging