[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} |
---|
[12469] | 8 | Version: 0.16 |
---|
[12477] | 9 | Release: 2%{?_dist_release} |
---|
[12469] | 10 | Group: programming |
---|
| 11 | Vendor: Project Vine |
---|
| 12 | Distribution: Vine Linux |
---|
| 13 | Packager: shaolin, munepi, owa |
---|
| 14 | |
---|
[11930] | 15 | License: Public Domain and MIT and Python and GPLv3+ |
---|
[12469] | 16 | URL: https://docutils.sourceforge.net/ |
---|
| 17 | Source0: https://prdownloads.sourceforge.net/%{srcname}/%{srcname}-%{version}.tar.gz |
---|
[2640] | 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 | |
---|
[1746] | 24 | BuildArch: noarch |
---|
[12469] | 25 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root |
---|
| 26 | |
---|
[11930] | 27 | BuildRequires: python-rpm-macros |
---|
[12469] | 28 | BuildRequires: python-devel |
---|
| 29 | BuildRequires: python2-rpm-macros |
---|
[1741] | 30 | BuildRequires: python-setuptools |
---|
[1746] | 31 | Requires: python |
---|
| 32 | |
---|
[11930] | 33 | %{?python_provide:%python_provide python2-%{srcname}} |
---|
[1741] | 34 | Provides: docutils = %{version}-%{release} |
---|
[1746] | 35 | Obsoletes: docutils <= 0.5 |
---|
[1741] | 36 | |
---|
| 37 | %description |
---|
[1746] | 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. |
---|
[1741] | 42 | |
---|
[1746] | 43 | %description -l ja |
---|
| 44 | Docutilsはオープンソースのテキスト処理システムで、プレーンテキストの |
---|
| 45 | 文書をHTMLやLaTeXなどの使いやすいフォーマットに変換するものです。 |
---|
| 46 | 読みやすく使いやすくWYSIWYGなプレーンテキストのマークアップ言語である |
---|
| 47 | reStructuresTextを含んでいます。 |
---|
[1741] | 48 | |
---|
[12469] | 49 | |
---|
[11930] | 50 | %package -n python3-%{srcname} |
---|
| 51 | Summary: an open-source text processing system written in Python |
---|
| 52 | Summary(ja): Pythonで書かれたテキスト処理システム |
---|
[12469] | 53 | Group: programming |
---|
[11930] | 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 | |
---|
[2640] | 74 | %package -n %{elisppkgname} |
---|
| 75 | Summary: Emacs support for reStructuredText |
---|
| 76 | Summary(ja): reStructuredText の Emacs サポート |
---|
[12469] | 77 | Group: publishing |
---|
[2640] | 78 | Requires: emacsen |
---|
| 79 | Requires(post,preun): emacsen |
---|
| 80 | %prereq_ge emacsen-common |
---|
[1746] | 81 | |
---|
[2640] | 82 | %description -n %{elisppkgname} |
---|
| 83 | Emacs support for reStructuredText. |
---|
| 84 | |
---|
| 85 | %description -l ja -n %{elisppkgname} |
---|
| 86 | reStructuredText の Emacs サポート |
---|
| 87 | |
---|
[12469] | 88 | |
---|
[1741] | 89 | %prep |
---|
| 90 | %setup -q -n %{srcname}-%{version} |
---|
| 91 | |
---|
[11930] | 92 | # Remove shebang from library files |
---|
[12469] | 93 | sed -i -e '/#! *\/usr\/bin\/.*/{1D}' $(grep -Erl '^#!.+python' %{srcname}) |
---|
[1741] | 94 | |
---|
[11930] | 95 | iconv -f ISO88592 -t UTF8 tools/editors/emacs/IDEAS.rst > tmp |
---|
| 96 | mv tmp tools/editors/emacs/IDEAS.rst |
---|
[1746] | 97 | |
---|
[12469] | 98 | # We want the licenses but don't need this build file |
---|
| 99 | rm -f licenses/docutils.conf |
---|
[11930] | 100 | |
---|
[12469] | 101 | # https://bugzilla.redhat.com/show_bug.cgi?id=1687377 |
---|
| 102 | rm test/test_writers/test_odt.py |
---|
| 103 | |
---|
| 104 | |
---|
[1741] | 105 | %build |
---|
[12477] | 106 | %py2_build |
---|
[11930] | 107 | %py3_build |
---|
[1741] | 108 | |
---|
| 109 | %install |
---|
[1746] | 110 | %__rm -rf $RPM_BUILD_ROOT |
---|
[1741] | 111 | |
---|
[12469] | 112 | %py2_install |
---|
[11930] | 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 | |
---|
[1741] | 121 | for file in %{buildroot}/%{_bindir}/*.py; do |
---|
[12469] | 122 | mv $file `dirname $file`/`basename $file .py` |
---|
[1741] | 123 | done |
---|
| 124 | |
---|
[2640] | 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 | |
---|
[11930] | 143 | %check |
---|
| 144 | mv biohazard.swf docs/user/rst/images/biohazard.swf |
---|
| 145 | python test/alltests.py |
---|
[12469] | 146 | python3 test/alltests.py |
---|
[11930] | 147 | rm docs/user/rst/images/biohazard.swf |
---|
| 148 | |
---|
| 149 | |
---|
[1741] | 150 | %clean |
---|
[1746] | 151 | rm -rf $RPM_BUILD_ROOT |
---|
[1741] | 152 | |
---|
[1746] | 153 | |
---|
[2640] | 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 | |
---|
[1741] | 172 | %files |
---|
[1746] | 173 | %defattr(-,root,root) |
---|
[11930] | 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 |
---|
[1746] | 177 | %{python_sitelib}/%{srcname}/ |
---|
| 178 | %{python_sitelib}/docutils-*.egg-info |
---|
[1741] | 179 | |
---|
[11930] | 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 |
---|
[12469] | 185 | %{_bindir}/* |
---|
[11930] | 186 | %{python3_sitelib}/%{srcname}/ |
---|
| 187 | %{python3_sitelib}/docutils-*.egg-info |
---|
| 188 | |
---|
[2640] | 189 | %files -n %{elisppkgname} |
---|
| 190 | %defattr(-,root,root) |
---|
[12469] | 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 |
---|
[2640] | 194 | %{_datadir}/emacs/site-lisp/%{elisppkgname} |
---|
| 195 | %{emacsen_pkgdir}/install/%{elisppkgname} |
---|
| 196 | %{emacsen_pkgdir}/remove/%{elisppkgname} |
---|
[1746] | 197 | |
---|
[2640] | 198 | |
---|
[1741] | 199 | %changelog |
---|
[12477] | 200 | * Wed Aug 19 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.16-2 |
---|
| 201 | - fixed dependency. |
---|
| 202 | |
---|
[12469] | 203 | * Sun Aug 16 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.16-1 |
---|
| 204 | - new upstream release. |
---|
| 205 | |
---|
[11930] | 206 | * Tue Nov 27 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.14-1 |
---|
| 207 | - new upstream release. |
---|
| 208 | - added python3 support. |
---|
| 209 | |
---|
[8158] | 210 | * Sun Jan 12 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.11-2 |
---|
| 211 | - rebuild with VineSeed environment |
---|
| 212 | |
---|
[7785] | 213 | * Fri Sep 06 2013 Toshiharu Kudoh <toshi.kd2@gmail.com> 0.11-1 |
---|
| 214 | - new upstream release |
---|
| 215 | |
---|
[7716] | 216 | * Sun Jun 16 2013 Toshiharu Kudoh <toshi.kd2@gmail.com> 0.10-1 |
---|
| 217 | - new upstream release |
---|
| 218 | |
---|
[5701] | 219 | * Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.6-4 |
---|
| 220 | - rebuild with python-2.7.2 |
---|
| 221 | |
---|
[2640] | 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 | |
---|
[1746] | 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') |
---|
[1741] | 233 | |
---|
[1746] | 234 | * Wed Feb 03 2010 Shu KONNO <owa@bg.wakwak.com> 0.5-3 |
---|
| 235 | - rebuilt with python-2.6.4 |
---|
[1741] | 236 | |
---|
[1746] | 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) |
---|
[1741] | 240 | |
---|
[1746] | 241 | * Wed Jul 01 2009 Shu KONNO <owa@bg.wakwak.com> 0.5-1 |
---|
| 242 | - updated docutils to 0.5 |
---|
| 243 | - added BuildArch: noarch |
---|
[1741] | 244 | |
---|
[1746] | 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 |
---|
[1741] | 248 | |
---|
[1746] | 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) |
---|
[1741] | 253 | |
---|
[1746] | 254 | * Sun Sep 9 2007 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 0.4-0vl2 |
---|
| 255 | - initial build for Vine Linux |
---|
[1741] | 256 | |
---|