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

Revision 8158, 6.0 KB checked in by Takemikaduchi, 9 years ago (diff)

new upstream release or rebuild

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: 2%{?_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* 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
Note: See TracBrowser for help on using the repository browser.