[python-zope-i18n] Initial Import

cheeselee cheeselee at fedoraproject.org
Mon Sep 20 09:05:36 UTC 2010


commit 36d070422e4edb7c4ac6e4d21c7d3b11d122bf23
Author: Robin Lee <robinlee.sysu at gmail.com>
Date:   Mon Sep 20 17:05:23 2010 +0800

    Initial Import

 .gitignore            |    1 +
 python-zope-i18n.spec |  100 +++++++++++++++++++++++++++++++++++++++++++++++++
 sources               |    1 +
 3 files changed, 102 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..d731873 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/zope.i18n-3.7.4.tar.gz
diff --git a/python-zope-i18n.spec b/python-zope-i18n.spec
new file mode 100644
index 0000000..a7e33af
--- /dev/null
+++ b/python-zope-i18n.spec
@@ -0,0 +1,100 @@
+%global modname zope.i18n
+
+Summary: Zope Internationalization Support
+Name: python-zope-i18n
+Version: 3.7.4
+Release: 2%{?dist}
+Source0: http://pypi.python.org/packages/source/z/%{modname}/%{modname}-%{version}.tar.gz
+# Patch for FHS compliance
+Patch0: zope.i18n-fhs-datadir.patch
+# Code is ZPLv2.1, data in /usr/share/zope/i18n//locales/data is UCD
+License: ZPLv2.1 and UCD
+Group: Development/Libraries
+BuildArch: noarch
+URL: http://pypi.python.org/pypi/zope.i18n
+
+BuildRequires: python2-devel
+BuildRequires: python-setuptools
+# for tests
+#BuildRequires: python-zope-testrunner (not yet in Fedora)
+#BuildRequires: pytz
+#BuildRequires: python-zope-schema
+#BuildRequires: python-zope-i18nmessageid
+#BuildRequires: python-zope-component
+
+Requires: pytz
+# python-zope-schema is noarch
+Requires: python-zope-schema
+Requires: python-zope-i18nmessageid
+Requires: python-zope-component
+
+%description
+This package implements several APIs related to internationalization and
+localization and also provides:
+
+* Locale objects for all locales maintained by the ICU project.
+
+* Gettext-based message catalogs for message strings.
+
+* Locale discovery for Web-based requests.
+
+%prep
+%setup -q -n %{modname}-%{version}
+%patch0 -p1 -b .fhs
+
+%build
+%{__python} setup.py build
+
+%install
+%{__python} setup.py install --root=%{buildroot}
+# deal with documents
+mkdir -p %{buildroot}%{_docdir}/%{name}-%{version}/locales/
+cp -p *.txt %{buildroot}%{_docdir}/%{name}-%{version}/
+mv %{buildroot}%{python_sitelib}/zope/i18n/*.txt \
+   %{buildroot}%{_docdir}/%{name}-%{version}/
+mv %{buildroot}%{python_sitelib}/zope/i18n/locales/*.txt \
+   %{buildroot}%{_docdir}/%{name}-%{version}/locales/
+mv %{buildroot}%{python_sitelib}/zope/i18n/locales/data/license.html \
+   %{buildroot}%{_docdir}/%{name}-%{version}/locales/
+
+install -m 0755 -d %{buildroot}%{_datadir}/%{name}/locales/
+DATADIR=%{_datadir}/%{name}
+mv %{buildroot}%{python_sitelib}/zope/i18n/locales/data \
+   %{buildroot}$DATADIR/locales/
+rm -f %{name}.lang
+for locale_file in `find %{buildroot}$DATADIR/locales/ -name '*.xml' ! -name 'root*'` ; do
+    filename=`basename $locale_file`
+    locale=`basename $locale_file .xml`
+    echo "%lang($locale) $DATADIR/locales/data/$filename">> %{name}.lang
+done
+
+%files -f %{name}.lang
+%defattr(-,root,root,-)
+%dir %{_datadir}/%{name}/
+%dir %{_datadir}/%{name}/locales/
+%dir %{_datadir}/%{name}/locales/data/
+%{_datadir}/%{name}/locales/data/root.xml
+%{_docdir}/%{name}-%{version}/
+%{python_sitelib}/zope/i18n/
+%exclude %{python_sitelib}/zope/i18n/tests/
+%exclude %{python_sitelib}/zope/i18n/locales/tests/
+%{python_sitelib}/%{modname}-*.egg-info
+%{python_sitelib}/%{modname}-*-nspkg.pth
+
+
+%changelog
+* Fri Sep 17 2010 Robin Lee <robinlee.sysu at gmail.com> - 3.7.4-2
+- Moved the data files to %%{_datadir}/%%{name}/ and applied a small
+  complementary patch with help from Toshio Kuratomi <a.badger at gmail.com>
+- Marked the data files with %%lang directives properly
+- License revised to 'ZPL2.1 and UCD'
+
+* Thu Sep 16 2010 Robin Lee <robinlee.sysu at gmail.com> - 3.7.4-1
+- Update to 3.7.4
+- Rearrange the documents
+- Requires: python-zope-filesystem and python-setuptools removed
+- Spec cleaned up
+- Exclude the tests
+
+* Wed Jun 16 2010 Robin Lee <robinlee.sysu at gmail.com> - 3.7.3-1
+- Initial packaging
diff --git a/sources b/sources
index e69de29..2993838 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+a6fe9d9ad53dd7e94e87cd58fb67d3b7  zope.i18n-3.7.4.tar.gz


More information about the scm-commits mailing list