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

Revision 12477, 7.7 KB checked in by tomop, 4 years ago (diff)

updated 11 packages

libxml2-2.9.10-4

newt-0.52.21-2

python-docutils-0.16-2

python-inotify-0.9.6-3

python-lxml-4.5.2-2

python-pykf-0.3.4-8

python-2.7.18-1

rhpxl-1.9-10

rrdtool-1.7.2-3

system-config-date-1.9.61-3

system-config-network-1.6.2-2

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