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 | |
---|
5 | Summary: an open-source text processing system written in Python |
---|
6 | Summary(ja): Pythonで書かれたテキスト処理システム |
---|
7 | Name: python-%{srcname} |
---|
8 | Version: 0.16 |
---|
9 | Release: 2%{?_dist_release} |
---|
10 | Group: programming |
---|
11 | Vendor: Project Vine |
---|
12 | Distribution: Vine Linux |
---|
13 | Packager: shaolin, munepi, owa |
---|
14 | |
---|
15 | License: Public Domain and MIT and Python and GPLv3+ |
---|
16 | URL: https://docutils.sourceforge.net/ |
---|
17 | Source0: https://prdownloads.sourceforge.net/%{srcname}/%{srcname}-%{version}.tar.gz |
---|
18 | ## for rst-mode |
---|
19 | Source1: %{elisppkgname}-install.sh |
---|
20 | Source2: %{elisppkgname}-remove.sh |
---|
21 | Source3: vine-default-%{elisppkgname}.el |
---|
22 | Source4: %{elisppkgname}-init.el |
---|
23 | |
---|
24 | BuildArch: noarch |
---|
25 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root |
---|
26 | |
---|
27 | BuildRequires: python-rpm-macros |
---|
28 | BuildRequires: python-devel |
---|
29 | BuildRequires: python2-rpm-macros |
---|
30 | BuildRequires: python-setuptools |
---|
31 | Requires: python |
---|
32 | |
---|
33 | %{?python_provide:%python_provide python2-%{srcname}} |
---|
34 | Provides: docutils = %{version}-%{release} |
---|
35 | Obsoletes: docutils <= 0.5 |
---|
36 | |
---|
37 | %description |
---|
38 | Docutils is an open-source text processing system for processing |
---|
39 | plaintext documentation into useful formats, such as HTML or LaTeX. |
---|
40 | It includes reStructuredText, the easy to read, easy to use, |
---|
41 | what-you-see-is-what-you-get plaintext markup language. |
---|
42 | |
---|
43 | %description -l ja |
---|
44 | Docutilsはオープンソースのテキスト処理システムで、プレーンテキストの |
---|
45 | 文書をHTMLやLaTeXなどの使いやすいフォーマットに変換するものです。 |
---|
46 | 読みやすく使いやすくWYSIWYGなプレーンテキストのマークアップ言語である |
---|
47 | reStructuresTextを含んでいます。 |
---|
48 | |
---|
49 | |
---|
50 | %package -n python3-%{srcname} |
---|
51 | Summary: an open-source text processing system written in Python |
---|
52 | Summary(ja): Pythonで書かれたテキスト処理システム |
---|
53 | Group: programming |
---|
54 | |
---|
55 | BuildRequires: python3-devel |
---|
56 | BuildRequires: python3-rpm-macros |
---|
57 | BuildRequires: python3-setuptools |
---|
58 | Requires: python3 |
---|
59 | %{?python_provide:%python_provide python3-%{srcname}} |
---|
60 | |
---|
61 | %description -n python3-%{srcname} |
---|
62 | Docutils is an open-source text processing system for processing |
---|
63 | plaintext documentation into useful formats, such as HTML or LaTeX. |
---|
64 | It includes reStructuredText, the easy to read, easy to use, |
---|
65 | what-you-see-is-what-you-get plaintext markup language. |
---|
66 | |
---|
67 | %description -n python3-%{srcname} -l ja |
---|
68 | Docutilsはオープンソースのテキスト処理システムで、プレーンテキストの |
---|
69 | 文書をHTMLやLaTeXなどの使いやすいフォーマットに変換するものです。 |
---|
70 | 読みやすく使いやすくWYSIWYGなプレーンテキストのマークアップ言語である |
---|
71 | reStructuresTextを含んでいます。 |
---|
72 | |
---|
73 | |
---|
74 | %package -n %{elisppkgname} |
---|
75 | Summary: Emacs support for reStructuredText |
---|
76 | Summary(ja): reStructuredText の Emacs サポート |
---|
77 | Group: publishing |
---|
78 | Requires: emacsen |
---|
79 | Requires(post,preun): emacsen |
---|
80 | %prereq_ge emacsen-common |
---|
81 | |
---|
82 | %description -n %{elisppkgname} |
---|
83 | Emacs support for reStructuredText. |
---|
84 | |
---|
85 | %description -l ja -n %{elisppkgname} |
---|
86 | reStructuredText の Emacs サポート |
---|
87 | |
---|
88 | |
---|
89 | %prep |
---|
90 | %setup -q -n %{srcname}-%{version} |
---|
91 | |
---|
92 | # Remove shebang from library files |
---|
93 | sed -i -e '/#! *\/usr\/bin\/.*/{1D}' $(grep -Erl '^#!.+python' %{srcname}) |
---|
94 | |
---|
95 | iconv -f ISO88592 -t UTF8 tools/editors/emacs/IDEAS.rst > tmp |
---|
96 | mv tmp tools/editors/emacs/IDEAS.rst |
---|
97 | |
---|
98 | # We want the licenses but don't need this build file |
---|
99 | rm -f licenses/docutils.conf |
---|
100 | |
---|
101 | # https://bugzilla.redhat.com/show_bug.cgi?id=1687377 |
---|
102 | rm 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. |
---|
116 | mv 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. |
---|
119 | rm -rf %{buildroot}%{python3_sitelib}/test |
---|
120 | |
---|
121 | for file in %{buildroot}/%{_bindir}/*.py; do |
---|
122 | mv $file `dirname $file`/`basename $file .py` |
---|
123 | done |
---|
124 | |
---|
125 | ## for Emacs package |
---|
126 | mkdir -p %{buildroot}%{_datadir}/emacs/site-lisp/%{elisppkgname}/packages |
---|
127 | mkdir -p %{buildroot}%{emacsen_pkgdir}/install |
---|
128 | mkdir -p %{buildroot}%{emacsen_pkgdir}/remove |
---|
129 | |
---|
130 | # |
---|
131 | # install el files |
---|
132 | # |
---|
133 | mv tools/editors/emacs/rst.el %{buildroot}%{_datadir}/emacs/site-lisp/%{elisppkgname} |
---|
134 | cp -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 |
---|
144 | mv biohazard.swf docs/user/rst/images/biohazard.swf |
---|
145 | python test/alltests.py |
---|
146 | python3 test/alltests.py |
---|
147 | rm docs/user/rst/images/biohazard.swf |
---|
148 | |
---|
149 | |
---|
150 | %clean |
---|
151 | rm -rf $RPM_BUILD_ROOT |
---|
152 | |
---|
153 | |
---|
154 | %post -n %{elisppkgname} |
---|
155 | # |
---|
156 | # bytecompile and install |
---|
157 | # |
---|
158 | if [ "$1" = 2 ]; then |
---|
159 | %_emacsenPackageRemove %{elisppkgname} |
---|
160 | fi |
---|
161 | %_addemacsenlist %{elisppkgname} |
---|
162 | %_emacsenPackageInstall %{elisppkgname} |
---|
163 | |
---|
164 | %preun -n %{elisppkgname} |
---|
165 | if [ "$1" = 0 ]; then |
---|
166 | %_emacsenPackageRemove %{elisppkgname} |
---|
167 | %_removeemacsenlist %{elisppkgname} |
---|
168 | fi |
---|
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 | |
---|