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