source: projects/specs/trunk/p/python-docutils/python-docutils-vl.spec @ 7785

Revision 7785, 5.9 KB checked in by kudoh, 11 years ago (diff)

--force-log

Line 
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
5Summary: an open-source text processing system written in Python
6Summary(ja): Pythonで書かれたテキスト処理システム
7Name: python-%{srcname}
8Version: 0.11
9Release: 1%{?_dist_release}
10Group: Development/Languages
11License: Public Domain and MIT and Python and GPLv2
12URL: http://docutils.sourceforge.net/
13Source0: http://prdownloads.sourceforge.net/%{srcname}/%{srcname}-%{version}.tar.gz
14## for rst-mode
15Source1: %{elisppkgname}-install.sh
16Source2: %{elisppkgname}-remove.sh
17Source3: vine-default-%{elisppkgname}.el
18Source4: %{elisppkgname}-init.el
19
20BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
21BuildArch: noarch
22BuildRequires: python-devel
23BuildRequires: python-setuptools
24Requires: python
25Requires: python-imaging
26
27Vendor: Project Vine
28Distribution: Vine Linux
29Packager: shaolin, munepi, owa
30Provides: docutils = %{version}-%{release}
31Obsoletes: docutils <= 0.5
32
33%description
34Docutils is an open-source text processing system for processing
35plaintext documentation into useful formats, such as HTML or LaTeX.
36It includes reStructuredText, the easy to read, easy to use,
37what-you-see-is-what-you-get plaintext markup language.
38
39%description -l ja
40Docutilsはオープンソースのテキスト処理システムで、プレーンテキストの
41文書をHTMLやLaTeXなどの使いやすいフォーマットに変換するものです。
42読みやすく使いやすくWYSIWYGなプレーンテキストのマークアップ言語である
43reStructuresTextを含んでいます。
44
45%package -n %{elisppkgname}
46Summary: Emacs support for reStructuredText
47Summary(ja): reStructuredText の Emacs サポート
48Group: Applications/Editors/Emacs
49Requires:     emacsen
50Requires(post,preun):       emacsen
51%prereq_ge    emacsen-common
52
53%description -n %{elisppkgname}
54Emacs support for reStructuredText.
55
56%description -l ja -n %{elisppkgname}
57reStructuredText の 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
67CFLAGS="$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
74for file in %{buildroot}/%{_bindir}/*.py; do
75    mv $file `dirname $file`/`basename $file .py`
76    ln -sf `basename $file .py` `dirname $file`/`basename $file`
77done
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
89mkdir -p %{buildroot}%{_datadir}/emacs/site-lisp/%{elisppkgname}/packages
90mkdir -p %{buildroot}%{emacsen_pkgdir}/install
91mkdir -p %{buildroot}%{emacsen_pkgdir}/remove
92
93#
94# install el files
95#
96mv tools/editors/emacs/rst.el %{buildroot}%{_datadir}/emacs/site-lisp/%{elisppkgname}
97cp -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
109rm -rf $RPM_BUILD_ROOT
110
111
112%post -n %{elisppkgname}
113#
114# bytecompile and install
115#
116if [ "$1" = 2 ]; then
117
118%_emacsenPackageRemove %{elisppkgname}
119
120fi
121
122%_addemacsenlist %{elisppkgname}
123
124%_emacsenPackageInstall %{elisppkgname}
125
126
127%preun -n %{elisppkgname}
128if [ "$1" = 0 ]; then
129
130%_emacsenPackageRemove %{elisppkgname}
131
132%_removeemacsenlist %{elisppkgname}
133
134fi
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* Fri Sep 06 2013 Toshiharu Kudoh <toshi.kd2@gmail.com> 0.11-1
158- new upstream release
159
160* Sun Jun 16 2013 Toshiharu Kudoh <toshi.kd2@gmail.com> 0.10-1
161- new upstream release
162
163* Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.6-4
164- rebuild with python-2.7.2
165
166* Sat Jan 29 2011 IWAI, Masaharu <iwai@alib.jp> 0.6-3
167- new package: rst-el (Emacs Lisp)
168 - add Source1-4
169
170* Thu Sep 02 2010 Shu KONNO <owa@bg.wakwak.com> 0.6-2
171- changed package-name to python-docutils from docutils
172- added Provides: docutils = %%{version}-%%{release}
173- added Obsoletes: docutils <= 0.5
174- added BR: python-setuptools
175- added RQ: python-imaging
176  (merged from '* Mon Aug 23 2010 Munehiro Yamamoto <munepi@vinelinux.org> python-docutils-0.6-1')
177
178* Wed Feb 03 2010 Shu KONNO <owa@bg.wakwak.com> 0.5-3
179- rebuilt with python-2.6.4
180
181* Thu Aug  6 2009 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 0.5-2
182- rename /usr/bin/*.py to /usr/bin/*
183  (keep symlinking to *.py for compatibility - should be removed in the future)
184
185* Wed Jul 01 2009 Shu KONNO <owa@bg.wakwak.com> 0.5-1
186- updated docutils to 0.5
187- added BuildArch: noarch
188
189* Sun Jul 20 2008 Shu KONNO <owa@bg.wakwak.com> 0.4-1vl5
190- rebuilt with python-2.5.2
191- applied new versioning policy and spec in utf-8
192
193* Thu Jan 31 2008 Shu KONNO <owa@bg.wakwak.com> 0.4-0vl4
194- defined python_sitelib by using distutils.sysconfig.get_python_lib()
195- updated module directory with platform-independent path
196- added script to install extras/roman.py (missing if it's already on the system)
197
198* Sun Sep 9 2007 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 0.4-0vl2
199- initial build for Vine Linux
200
Note: See TracBrowser for help on using the repository browser.