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.11 |
---|
9 | Release: 2%{?_dist_release} |
---|
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 |
---|
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 | |
---|
20 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root |
---|
21 | BuildArch: noarch |
---|
22 | BuildRequires: python-devel |
---|
23 | BuildRequires: python-setuptools |
---|
24 | Requires: python |
---|
25 | Requires: python-imaging |
---|
26 | |
---|
27 | Vendor: Project Vine |
---|
28 | Distribution: Vine Linux |
---|
29 | Packager: shaolin, munepi, owa |
---|
30 | Provides: docutils = %{version}-%{release} |
---|
31 | Obsoletes: docutils <= 0.5 |
---|
32 | |
---|
33 | %description |
---|
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. |
---|
38 | |
---|
39 | %description -l ja |
---|
40 | Docutilsはオープンソースのテキスト処理システムで、プレーンテキストの |
---|
41 | 文書をHTMLやLaTeXなどの使いやすいフォーマットに変換するものです。 |
---|
42 | 読みやすく使いやすくWYSIWYGなプレーンテキストのマークアップ言語である |
---|
43 | reStructuresTextを含んでいます。 |
---|
44 | |
---|
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 |
---|
52 | |
---|
53 | %description -n %{elisppkgname} |
---|
54 | Emacs support for reStructuredText. |
---|
55 | |
---|
56 | %description -l ja -n %{elisppkgname} |
---|
57 | reStructuredText の Emacs サポート |
---|
58 | |
---|
59 | %prep |
---|
60 | %setup -q -n %{srcname}-%{version} |
---|
61 | |
---|
62 | # Remove a shebang from one of the library files |
---|
63 | #%__sed -i -e '/#! *\/usr\/bin\/.*python.*/{1D}' docutils/readers/python/pynodes.py |
---|
64 | |
---|
65 | |
---|
66 | %build |
---|
67 | CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build |
---|
68 | |
---|
69 | |
---|
70 | %install |
---|
71 | %__rm -rf $RPM_BUILD_ROOT |
---|
72 | %{__python} setup.py install --skip-build --root=$RPM_BUILD_ROOT |
---|
73 | |
---|
74 | for file in %{buildroot}/%{_bindir}/*.py; do |
---|
75 | mv $file `dirname $file`/`basename $file .py` |
---|
76 | ln -sf `basename $file .py` `dirname $file`/`basename $file` |
---|
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. |
---|
85 | #install -D -m644 extras/roman.py ${RPM_BUILD_ROOT}/%{python_sitelib}/roman.py |
---|
86 | |
---|
87 | |
---|
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 | |
---|
108 | %clean |
---|
109 | rm -rf $RPM_BUILD_ROOT |
---|
110 | |
---|
111 | |
---|
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 | |
---|
138 | %files |
---|
139 | %defattr(-,root,root) |
---|
140 | %doc BUGS.txt HISTORY.txt RELEASE-NOTES.txt docs COPYING.txt THANKS.txt FAQ.txt README.txt |
---|
141 | %doc licenses docs |
---|
142 | %{_bindir}/* |
---|
143 | %{python_sitelib}/%{srcname}/ |
---|
144 | #%{python_sitelib}/roman.* |
---|
145 | %{python_sitelib}/docutils-*.egg-info |
---|
146 | |
---|
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} |
---|
154 | |
---|
155 | |
---|
156 | %changelog |
---|
157 | * Sun Jan 12 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.11-2 |
---|
158 | - rebuild with VineSeed environment |
---|
159 | |
---|
160 | * Fri Sep 06 2013 Toshiharu Kudoh <toshi.kd2@gmail.com> 0.11-1 |
---|
161 | - new upstream release |
---|
162 | |
---|
163 | * Sun Jun 16 2013 Toshiharu Kudoh <toshi.kd2@gmail.com> 0.10-1 |
---|
164 | - new upstream release |
---|
165 | |
---|
166 | * Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.6-4 |
---|
167 | - rebuild with python-2.7.2 |
---|
168 | |
---|
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 | |
---|
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') |
---|
180 | |
---|
181 | * Wed Feb 03 2010 Shu KONNO <owa@bg.wakwak.com> 0.5-3 |
---|
182 | - rebuilt with python-2.6.4 |
---|
183 | |
---|
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) |
---|
187 | |
---|
188 | * Wed Jul 01 2009 Shu KONNO <owa@bg.wakwak.com> 0.5-1 |
---|
189 | - updated docutils to 0.5 |
---|
190 | - added BuildArch: noarch |
---|
191 | |
---|
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 |
---|
195 | |
---|
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) |
---|
200 | |
---|
201 | * Sun Sep 9 2007 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 0.4-0vl2 |
---|
202 | - initial build for Vine Linux |
---|
203 | |
---|