source: projects/specs/trunk/p/python-docutils/python-docutils-vl.spec @ 11930

Revision 11930, 8.0 KB checked in by tomop, 5 years ago (diff)

python-docutils-0.14-1

RevLine 
[1741]1%define srcname docutils
[2640]2%define elisppkgname rst-el
3%define prereq_ge()  %(LC_ALL="C" rpm -q --queryformat 'Requires(post,preun):%%{NAME} >= %%{VERSION}' %1| grep -v "is not")
4
[1746]5Summary: an open-source text processing system written in Python
6Summary(ja): Pythonで書かれたテキスト処理システム
7Name: python-%{srcname}
[11930]8Version: 0.14
9Release: 1%{?_dist_release}
[1746]10Group: Development/Languages
[11930]11License: Public Domain and MIT and Python and GPLv3+
[1746]12URL: http://docutils.sourceforge.net/
13Source0: http://prdownloads.sourceforge.net/%{srcname}/%{srcname}-%{version}.tar.gz
[2640]14## for rst-mode
15Source1: %{elisppkgname}-install.sh
16Source2: %{elisppkgname}-remove.sh
17Source3: vine-default-%{elisppkgname}.el
18Source4: %{elisppkgname}-init.el
19
[1746]20BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
21BuildArch: noarch
22BuildRequires: python-devel
[11930]23BuildRequires: python-rpm-macros
[1741]24BuildRequires: python-setuptools
[1746]25Requires: python
26
27Vendor: Project Vine
28Distribution: Vine Linux
29Packager: shaolin, munepi, owa
[11930]30%{?python_provide:%python_provide python2-%{srcname}}
[1741]31Provides: docutils = %{version}-%{release}
[1746]32Obsoletes: docutils <= 0.5
[1741]33
34%description
[1746]35Docutils is an open-source text processing system for processing
36plaintext documentation into useful formats, such as HTML or LaTeX.
37It includes reStructuredText, the easy to read, easy to use,
38what-you-see-is-what-you-get plaintext markup language.
[1741]39
[1746]40%description -l ja
41Docutilsはオープンソースのテキスト処理システムで、プレーンテキストの
42文書をHTMLやLaTeXなどの使いやすいフォーマットに変換するものです。
43読みやすく使いやすくWYSIWYGなプレーンテキストのマークアップ言語である
44reStructuresTextを含んでいます。
[1741]45
[11930]46%package -n python3-%{srcname}
47Summary: an open-source text processing system written in Python
48Summary(ja): Pythonで書かれたテキスト処理システム
49Group: Development/Languages
50
51BuildRequires: python3-devel
52BuildRequires: python3-rpm-macros
53BuildRequires: python3-setuptools
54Requires: python3
55%{?python_provide:%python_provide python3-%{srcname}}
56
57%description -n python3-%{srcname}
58Docutils is an open-source text processing system for processing
59plaintext documentation into useful formats, such as HTML or LaTeX.
60It includes reStructuredText, the easy to read, easy to use,
61what-you-see-is-what-you-get plaintext markup language.
62
63%description -n python3-%{srcname} -l ja
64Docutilsはオープンソースのテキスト処理システムで、プレーンテキストの
65文書をHTMLやLaTeXなどの使いやすいフォーマットに変換するものです。
66読みやすく使いやすくWYSIWYGなプレーンテキストのマークアップ言語である
67reStructuresTextを含んでいます。
68
69
[2640]70%package -n %{elisppkgname}
71Summary: Emacs support for reStructuredText
72Summary(ja): reStructuredText の Emacs サポート
73Group: Applications/Editors/Emacs
74Requires:     emacsen
75Requires(post,preun):       emacsen
76%prereq_ge    emacsen-common
[1746]77
[2640]78%description -n %{elisppkgname}
79Emacs support for reStructuredText.
80
81%description -l ja -n %{elisppkgname}
82reStructuredText の Emacs サポート
83
[1741]84%prep
85%setup -q -n %{srcname}-%{version}
86
[11930]87# Remove shebang from library files
88for file in docutils/utils/{code_analyzer.py,punctuation_chars.py,error_reporting.py,smartquotes.py} docutils/utils/math/{latex2mathml.py,math2html.py} docutils/writers/xetex/__init__.py; do
89sed -i -e '/#! *\/usr\/bin\/.*/{1D}' $file
90done
[1741]91
[11930]92iconv -f ISO88592 -t UTF8 tools/editors/emacs/IDEAS.rst > tmp
93mv tmp tools/editors/emacs/IDEAS.rst
[1746]94
[11930]95rm -rf %{py3dir}
96cp -a . %{py3dir}
97
[1741]98%build
[11930]99pushd %{py3dir}
100%py3_build
101popd
102%py_build
[1741]103
104%install
[1746]105%__rm -rf $RPM_BUILD_ROOT
[1741]106
[11930]107pushd %{py3dir}
108%py3_install
109# We want the licenses but don't need this build file
110rm -f licenses/docutils.conf
111
112# Flash file is used for testing docutils but shouldn't be in the installed package.
113mv docs/user/rst/images/biohazard.swf ./biohazard.swf
114popd
115
116rm -f %{buildroot}/%{_bindir}/*
117
118%py_install
119
120# docutils setup.py runs 2to3 on a copy of the tests and puts it in sitelib.
121rm -rf %{buildroot}%{python3_sitelib}/test
122
123# Flash file is used for testing docutils but shouldn't be in the installed package.
124mv docs/user/rst/images/biohazard.swf ./biohazard.swf
125
[1741]126for file in %{buildroot}/%{_bindir}/*.py; do
127    mv $file `dirname $file`/`basename $file .py`
128done
129
130
[2640]131## for Emacs package
132mkdir -p %{buildroot}%{_datadir}/emacs/site-lisp/%{elisppkgname}/packages
133mkdir -p %{buildroot}%{emacsen_pkgdir}/install
134mkdir -p %{buildroot}%{emacsen_pkgdir}/remove
135
136#
137# install el files
138#
139mv tools/editors/emacs/rst.el %{buildroot}%{_datadir}/emacs/site-lisp/%{elisppkgname}
140cp -p %{SOURCE3} %{SOURCE4} %{buildroot}%{_datadir}/emacs/site-lisp/%{elisppkgname}
141
142#
143# install script (bytecompile el and install elc , remove)
144#
145%_installemacsenscript %{elisppkgname} %{SOURCE1}
146
147%_removeemacsenscript  %{elisppkgname} %{SOURCE2}
148
149
150
[11930]151%check
152mv  biohazard.swf docs/user/rst/images/biohazard.swf
153python test/alltests.py
154rm docs/user/rst/images/biohazard.swf
155
156pushd %{py3dir}
157mv  biohazard.swf docs/user/rst/images/biohazard.swf
158python3 test3/alltests.py
159rm docs/user/rst/images/biohazard.swf
160popd
161
162
[1741]163%clean
[1746]164rm -rf $RPM_BUILD_ROOT
[1741]165
[1746]166
[2640]167%post -n %{elisppkgname}
168#
169# bytecompile and install
170#
171if [ "$1" = 2 ]; then
172
173%_emacsenPackageRemove %{elisppkgname}
174
175fi
176
177%_addemacsenlist %{elisppkgname}
178
179%_emacsenPackageInstall %{elisppkgname}
180
181
182%preun -n %{elisppkgname}
183if [ "$1" = 0 ]; then
184
185%_emacsenPackageRemove %{elisppkgname}
186
187%_removeemacsenlist %{elisppkgname}
188
189fi
190
191
192
[1741]193%files
[1746]194%defattr(-,root,root)
[11930]195%license COPYING.txt licenses/*
196%doc BUGS.txt FAQ.txt HISTORY.txt README.txt RELEASE-NOTES.txt
197%doc THANKS.txt docs tools/editors
[1741]198%{_bindir}/*
[1746]199%{python_sitelib}/%{srcname}/
200%{python_sitelib}/docutils-*.egg-info
[1741]201
[11930]202%files -n python3-%{srcname}
203%defattr(-,root,root)
204%license COPYING.txt licenses/*
205%doc BUGS.txt FAQ.txt HISTORY.txt README.txt RELEASE-NOTES.txt
206%doc THANKS.txt docs tools/editors
207%{python3_sitelib}/%{srcname}/
208%{python3_sitelib}/docutils-*.egg-info
209
[2640]210%files -n %{elisppkgname}
211%defattr(-,root,root)
212%doc BUGS.txt HISTORY.txt RELEASE-NOTES.txt COPYING.txt THANKS.txt FAQ.txt README.txt
213%doc licenses tools/editors
214%{_datadir}/emacs/site-lisp/%{elisppkgname}
215%{emacsen_pkgdir}/install/%{elisppkgname}
216%{emacsen_pkgdir}/remove/%{elisppkgname}
[1746]217
[2640]218
[1741]219%changelog
[11930]220* Tue Nov 27 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.14-1
221- new upstream release.
222- added python3 support.
223
[8158]224* Sun Jan 12 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.11-2
225- rebuild with VineSeed environment
226
[7785]227* Fri Sep 06 2013 Toshiharu Kudoh <toshi.kd2@gmail.com> 0.11-1
228- new upstream release
229
[7716]230* Sun Jun 16 2013 Toshiharu Kudoh <toshi.kd2@gmail.com> 0.10-1
231- new upstream release
232
[5701]233* Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.6-4
234- rebuild with python-2.7.2
235
[2640]236* Sat Jan 29 2011 IWAI, Masaharu <iwai@alib.jp> 0.6-3
237- new package: rst-el (Emacs Lisp)
238 - add Source1-4
239
[1746]240* Thu Sep 02 2010 Shu KONNO <owa@bg.wakwak.com> 0.6-2
241- changed package-name to python-docutils from docutils
242- added Provides: docutils = %%{version}-%%{release}
243- added Obsoletes: docutils <= 0.5
244- added BR: python-setuptools
245- added RQ: python-imaging
246  (merged from '* Mon Aug 23 2010 Munehiro Yamamoto <munepi@vinelinux.org> python-docutils-0.6-1')
[1741]247
[1746]248* Wed Feb 03 2010 Shu KONNO <owa@bg.wakwak.com> 0.5-3
249- rebuilt with python-2.6.4
[1741]250
[1746]251* Thu Aug  6 2009 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 0.5-2
252- rename /usr/bin/*.py to /usr/bin/*
253  (keep symlinking to *.py for compatibility - should be removed in the future)
[1741]254
[1746]255* Wed Jul 01 2009 Shu KONNO <owa@bg.wakwak.com> 0.5-1
256- updated docutils to 0.5
257- added BuildArch: noarch
[1741]258
[1746]259* Sun Jul 20 2008 Shu KONNO <owa@bg.wakwak.com> 0.4-1vl5
260- rebuilt with python-2.5.2
261- applied new versioning policy and spec in utf-8
[1741]262
[1746]263* Thu Jan 31 2008 Shu KONNO <owa@bg.wakwak.com> 0.4-0vl4
264- defined python_sitelib by using distutils.sysconfig.get_python_lib()
265- updated module directory with platform-independent path
266- added script to install extras/roman.py (missing if it's already on the system)
[1741]267
[1746]268* Sun Sep 9 2007 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 0.4-0vl2
269- initial build for Vine Linux
[1741]270
Note: See TracBrowser for help on using the repository browser.