[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} |
---|
[7785] | 8 | Version: 0.11 |
---|
[8158] | 9 | Release: 2%{?_dist_release} |
---|
[1746] | 10 | Group: Development/Languages |
---|
| 11 | License: Public Domain and MIT and Python and GPLv2 |
---|
| 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 |
---|
[1741] | 23 | BuildRequires: python-setuptools |
---|
[1746] | 24 | Requires: python |
---|
[1741] | 25 | Requires: python-imaging |
---|
[1746] | 26 | |
---|
| 27 | Vendor: Project Vine |
---|
| 28 | Distribution: Vine Linux |
---|
| 29 | Packager: shaolin, munepi, owa |
---|
[1741] | 30 | Provides: docutils = %{version}-%{release} |
---|
[1746] | 31 | Obsoletes: docutils <= 0.5 |
---|
[1741] | 32 | |
---|
| 33 | %description |
---|
[1746] | 34 | Docutils is an open-source text processing system for processing |
---|
| 35 | plaintext documentation into useful formats, such as HTML or LaTeX. |
---|
| 36 | It includes reStructuredText, the easy to read, easy to use, |
---|
| 37 | what-you-see-is-what-you-get plaintext markup language. |
---|
[1741] | 38 | |
---|
[1746] | 39 | %description -l ja |
---|
| 40 | Docutilsはオープンソースのテキスト処理システムで、プレーンテキストの |
---|
| 41 | 文書をHTMLやLaTeXなどの使いやすいフォーマットに変換するものです。 |
---|
| 42 | 読みやすく使いやすくWYSIWYGなプレーンテキストのマークアップ言語である |
---|
| 43 | reStructuresTextを含んでいます。 |
---|
[1741] | 44 | |
---|
[2640] | 45 | %package -n %{elisppkgname} |
---|
| 46 | Summary: Emacs support for reStructuredText |
---|
| 47 | Summary(ja): reStructuredText の Emacs サポート |
---|
| 48 | Group: Applications/Editors/Emacs |
---|
| 49 | Requires: emacsen |
---|
| 50 | Requires(post,preun): emacsen |
---|
| 51 | %prereq_ge emacsen-common |
---|
[1746] | 52 | |
---|
[2640] | 53 | %description -n %{elisppkgname} |
---|
| 54 | Emacs support for reStructuredText. |
---|
| 55 | |
---|
| 56 | %description -l ja -n %{elisppkgname} |
---|
| 57 | reStructuredText の Emacs サポート |
---|
| 58 | |
---|
[1741] | 59 | %prep |
---|
| 60 | %setup -q -n %{srcname}-%{version} |
---|
| 61 | |
---|
| 62 | # Remove a shebang from one of the library files |
---|
[7716] | 63 | #%__sed -i -e '/#! *\/usr\/bin\/.*python.*/{1D}' docutils/readers/python/pynodes.py |
---|
[1741] | 64 | |
---|
[1746] | 65 | |
---|
[1741] | 66 | %build |
---|
| 67 | CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build |
---|
| 68 | |
---|
| 69 | |
---|
| 70 | %install |
---|
[1746] | 71 | %__rm -rf $RPM_BUILD_ROOT |
---|
| 72 | %{__python} setup.py install --skip-build --root=$RPM_BUILD_ROOT |
---|
[1741] | 73 | |
---|
| 74 | for file in %{buildroot}/%{_bindir}/*.py; do |
---|
| 75 | mv $file `dirname $file`/`basename $file .py` |
---|
[1746] | 76 | ln -sf `basename $file .py` `dirname $file`/`basename $file` |
---|
[1741] | 77 | done |
---|
| 78 | |
---|
| 79 | # We want the licenses but don't need this build file |
---|
| 80 | %__rm -f licenses/docutils.conf |
---|
| 81 | |
---|
| 82 | # docutils only installs this if its not already on the system. Due to the |
---|
| 83 | # possibility that a previous version of docutils may be installed, we install |
---|
| 84 | # it manually here. |
---|
[7716] | 85 | #install -D -m644 extras/roman.py ${RPM_BUILD_ROOT}/%{python_sitelib}/roman.py |
---|
[1741] | 86 | |
---|
[1746] | 87 | |
---|
[2640] | 88 | ## for Emacs package |
---|
| 89 | mkdir -p %{buildroot}%{_datadir}/emacs/site-lisp/%{elisppkgname}/packages |
---|
| 90 | mkdir -p %{buildroot}%{emacsen_pkgdir}/install |
---|
| 91 | mkdir -p %{buildroot}%{emacsen_pkgdir}/remove |
---|
| 92 | |
---|
| 93 | # |
---|
| 94 | # install el files |
---|
| 95 | # |
---|
| 96 | mv tools/editors/emacs/rst.el %{buildroot}%{_datadir}/emacs/site-lisp/%{elisppkgname} |
---|
| 97 | cp -p %{SOURCE3} %{SOURCE4} %{buildroot}%{_datadir}/emacs/site-lisp/%{elisppkgname} |
---|
| 98 | |
---|
| 99 | # |
---|
| 100 | # install script (bytecompile el and install elc , remove) |
---|
| 101 | # |
---|
| 102 | %_installemacsenscript %{elisppkgname} %{SOURCE1} |
---|
| 103 | |
---|
| 104 | %_removeemacsenscript %{elisppkgname} %{SOURCE2} |
---|
| 105 | |
---|
| 106 | |
---|
| 107 | |
---|
[1741] | 108 | %clean |
---|
[1746] | 109 | rm -rf $RPM_BUILD_ROOT |
---|
[1741] | 110 | |
---|
[1746] | 111 | |
---|
[2640] | 112 | %post -n %{elisppkgname} |
---|
| 113 | # |
---|
| 114 | # bytecompile and install |
---|
| 115 | # |
---|
| 116 | if [ "$1" = 2 ]; then |
---|
| 117 | |
---|
| 118 | %_emacsenPackageRemove %{elisppkgname} |
---|
| 119 | |
---|
| 120 | fi |
---|
| 121 | |
---|
| 122 | %_addemacsenlist %{elisppkgname} |
---|
| 123 | |
---|
| 124 | %_emacsenPackageInstall %{elisppkgname} |
---|
| 125 | |
---|
| 126 | |
---|
| 127 | %preun -n %{elisppkgname} |
---|
| 128 | if [ "$1" = 0 ]; then |
---|
| 129 | |
---|
| 130 | %_emacsenPackageRemove %{elisppkgname} |
---|
| 131 | |
---|
| 132 | %_removeemacsenlist %{elisppkgname} |
---|
| 133 | |
---|
| 134 | fi |
---|
| 135 | |
---|
| 136 | |
---|
| 137 | |
---|
[1741] | 138 | %files |
---|
[1746] | 139 | %defattr(-,root,root) |
---|
| 140 | %doc BUGS.txt HISTORY.txt RELEASE-NOTES.txt docs COPYING.txt THANKS.txt FAQ.txt README.txt |
---|
[2640] | 141 | %doc licenses docs |
---|
[1741] | 142 | %{_bindir}/* |
---|
[1746] | 143 | %{python_sitelib}/%{srcname}/ |
---|
[7716] | 144 | #%{python_sitelib}/roman.* |
---|
[1746] | 145 | %{python_sitelib}/docutils-*.egg-info |
---|
[1741] | 146 | |
---|
[2640] | 147 | %files -n %{elisppkgname} |
---|
| 148 | %defattr(-,root,root) |
---|
| 149 | %doc BUGS.txt HISTORY.txt RELEASE-NOTES.txt COPYING.txt THANKS.txt FAQ.txt README.txt |
---|
| 150 | %doc licenses tools/editors |
---|
| 151 | %{_datadir}/emacs/site-lisp/%{elisppkgname} |
---|
| 152 | %{emacsen_pkgdir}/install/%{elisppkgname} |
---|
| 153 | %{emacsen_pkgdir}/remove/%{elisppkgname} |
---|
[1746] | 154 | |
---|
[2640] | 155 | |
---|
[1741] | 156 | %changelog |
---|
[8158] | 157 | * Sun Jan 12 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.11-2 |
---|
| 158 | - rebuild with VineSeed environment |
---|
| 159 | |
---|
[7785] | 160 | * Fri Sep 06 2013 Toshiharu Kudoh <toshi.kd2@gmail.com> 0.11-1 |
---|
| 161 | - new upstream release |
---|
| 162 | |
---|
[7716] | 163 | * Sun Jun 16 2013 Toshiharu Kudoh <toshi.kd2@gmail.com> 0.10-1 |
---|
| 164 | - new upstream release |
---|
| 165 | |
---|
[5701] | 166 | * Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.6-4 |
---|
| 167 | - rebuild with python-2.7.2 |
---|
| 168 | |
---|
[2640] | 169 | * Sat Jan 29 2011 IWAI, Masaharu <iwai@alib.jp> 0.6-3 |
---|
| 170 | - new package: rst-el (Emacs Lisp) |
---|
| 171 | - add Source1-4 |
---|
| 172 | |
---|
[1746] | 173 | * Thu Sep 02 2010 Shu KONNO <owa@bg.wakwak.com> 0.6-2 |
---|
| 174 | - changed package-name to python-docutils from docutils |
---|
| 175 | - added Provides: docutils = %%{version}-%%{release} |
---|
| 176 | - added Obsoletes: docutils <= 0.5 |
---|
| 177 | - added BR: python-setuptools |
---|
| 178 | - added RQ: python-imaging |
---|
| 179 | (merged from '* Mon Aug 23 2010 Munehiro Yamamoto <munepi@vinelinux.org> python-docutils-0.6-1') |
---|
[1741] | 180 | |
---|
[1746] | 181 | * Wed Feb 03 2010 Shu KONNO <owa@bg.wakwak.com> 0.5-3 |
---|
| 182 | - rebuilt with python-2.6.4 |
---|
[1741] | 183 | |
---|
[1746] | 184 | * Thu Aug 6 2009 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 0.5-2 |
---|
| 185 | - rename /usr/bin/*.py to /usr/bin/* |
---|
| 186 | (keep symlinking to *.py for compatibility - should be removed in the future) |
---|
[1741] | 187 | |
---|
[1746] | 188 | * Wed Jul 01 2009 Shu KONNO <owa@bg.wakwak.com> 0.5-1 |
---|
| 189 | - updated docutils to 0.5 |
---|
| 190 | - added BuildArch: noarch |
---|
[1741] | 191 | |
---|
[1746] | 192 | * Sun Jul 20 2008 Shu KONNO <owa@bg.wakwak.com> 0.4-1vl5 |
---|
| 193 | - rebuilt with python-2.5.2 |
---|
| 194 | - applied new versioning policy and spec in utf-8 |
---|
[1741] | 195 | |
---|
[1746] | 196 | * Thu Jan 31 2008 Shu KONNO <owa@bg.wakwak.com> 0.4-0vl4 |
---|
| 197 | - defined python_sitelib by using distutils.sysconfig.get_python_lib() |
---|
| 198 | - updated module directory with platform-independent path |
---|
| 199 | - added script to install extras/roman.py (missing if it's already on the system) |
---|
[1741] | 200 | |
---|
[1746] | 201 | * Sun Sep 9 2007 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 0.4-0vl2 |
---|
| 202 | - initial build for Vine Linux |
---|
[1741] | 203 | |
---|