source: projects/specs/trunk/p/python3/python3-vl.spec @ 10101

Revision 10101, 10.9 KB checked in by Takemikaduchi, 8 years ago (diff)

rebuild with openssl

Line 
1# if you wanna test, add " --define '_run_test 1' " option to rpmbuild command
2%define run_test %{?_run_test:1}%{!?_run_test:0}
3%define libvers 3.4
4%define binsuffix 3.4
5%define python_lib %{_libdir}/python%{libvers}
6%define config_htmldir /var/www/html/python
7Summary: An interpreted, interactive, object-oriented programming language.
8Summary(ja): オブジェクト指向 Python3 インタプリタ
9Name: python3
10Version: 3.4.4
11Release: 2%{?_dist_release}
12License: PSF
13Group: Development/Languages
14URL: http://www.python.org/download/releases/%{version}
15Source0: http://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz
16Source1: https://docs.python.org/3.4/archives/python-%{version}-docs-html.tar.bz2
17Patch1: python-3.4.2-lib64.patch
18Patch2: python3-3.4.4-revert-makefile.patch
19
20BuildRoot: %{_tmppath}/%{name}-%{version}-root
21BuildRequires: expat-devel
22BuildRequires: libdb-devel
23BuildRequires: gdbm-devel
24BuildRequires: sqlite3-devel
25BuildRequires: gzip tar gcc-c++ pkgconfig sed findutils
26BuildRequires: bzip2-devel
27BuildRequires: glibc-devel
28BuildRequires: ncurses-devel
29BuildRequires: openssl-devel
30BuildRequires: readline-devel
31BuildRequires: zlib-devel
32BuildRequires: libffi-devel
33BuildRequires: valgrind-devel
34Requires: bzip2
35Requires: gdbm
36Requires: ncurses
37Requires: openssl
38Requires: readline
39Requires: sqlite3
40Requires: zlib
41
42Packager: owa, Takemikaduchi
43Vendor: Project Vine
44Distribution: Vine Linux
45
46%description
47Python is an interpreted, interactive, object-oriented programming
48language.  It incorporates modules, exceptions, dynamic typing, very high
49level dynamic data types, and classes. Python combines remarkable power
50with very clear syntax. It has interfaces to many system calls and
51libraries, as well as to various window systems, and is extensible in C or
52C++. It is also usable as an extension language for applications that need
53a programmable interface.  Finally, Python is portable: it runs on many
54brands of UNIX, on PCs under Windows, MS-DOS, and OS/2, and on the
55Mac.
56
57%package devel
58Summary: The libraries and header files needed for Python development.
59Group: Development/Libraries
60Requires: %{name} = %{version}-%{release}
61
62%description devel
63The Python programming language's interpreter can be extended with
64dynamically loaded extensions and can be embedded in other programs.
65This package contains the header files and libraries needed to do
66these types of tasks.
67
68Install python-devel if you want to develop Python extensions.  The
69python package will also need to be installed.  You'll probably also
70want to install the python-docs package, which contains Python
71documentation.
72
73%package tkinter
74Summary: A graphical user interface for the Python scripting language.
75Group: Development/Languages
76Requires: %{name} = %{version}-%{release}
77Requires: tcl, tk, tix
78Requires: libX11, libxcb, libXau, libXdmcp
79BuildRequires: tcl-devel, tk-devel, tix
80BuildRequires: libX11-devel, libxcb-devel, libXau-devel, libXdmcp-devel
81
82%description tkinter
83The Tkinter (Tk interface) program is an graphical user interface for
84the Python scripting language.
85
86You should install the tkinter package if you'd like to use a graphical
87user interface for Python programming.
88
89%package tools
90Summary: A collection of development tools included with Python.
91Group: Development/Tools
92Requires: %{name} = %{version}-%{release}
93Requires: %{name}-tkinter = %{version}
94
95%description tools
96The Python package includes several development tools that are used
97to build python programs.
98
99%package docs
100Summary: Documentation for the Python programming language.
101Summary(ja): Python プログラミング言語のドキュメント
102Group: Documentation
103
104%description docs
105The python-docs package contains documentation on the Python
106programming language and interpreter.  The documentation is provided
107in ASCII text files and in LaTeX source files.
108
109Install the python-docs package if you'd like to use the documentation
110for the Python language.
111
112
113%prep
114%setup -q -n Python-%{version}
115%if %{_lib} == lib64
116%patch1 -p1 -b .lib64
117%endif
118%patch2 -p1 -b .libpl
119
120
121%build
122./configure \
123        --prefix=%{_prefix} \
124        --libdir=%{_libdir} \
125        --enable-shared \
126        --enable-ipv6 \
127        --with-fpectl \
128        --with-doc-strings \
129        --with-pymalloc \
130        --with-signal-module \
131        --with-system-ffi \
132        --with-threads \
133        --with-valgrind \
134        --without-ensurepip \
135%ifarch x86_64
136        --with-universal-archs=64-bit \
137%endif
138        CXX=g++;
139
140make %{?_smp_mflags}
141
142%if %{run_test}
143make test
144%endif
145
146
147%install
148[ -d "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
149echo '[install_scripts]' >setup.cfg
150echo 'install_dir='"${RPM_BUILD_ROOT}%{_bindir}" >> setup.cfg
151
152mkdir -p $RPM_BUILD_ROOT%{python_lib}/lib-dynload
153make DESTDIR=$RPM_BUILD_ROOT LIBDIR=%{_libdir} install
154
155# if --with-wide-unicode at configure
156ln -s python%{libvers}m $RPM_BUILD_ROOT%{_includedir}/python%{libvers}
157
158# replace path in pydoc
159if [ ! -z "%{binsuffix}" ]
160then
161   (
162      cd $RPM_BUILD_ROOT%{_bindir}
163      mv pydoc%{libvers} pydoc.old
164      sed 's|#!.*|#!%{_bindir}/env python'%{libvers}'|' \
165            pydoc.old > pydoc%{libvers}
166      chmod 755 pydoc%{libvers}
167      rm -f pydoc.old
168   )
169fi
170
171#  Tools
172echo '#!%{_bindir}/env python%{binsuffix}' > ${RPM_BUILD_ROOT}%{_bindir}/idle%{binsuffix}
173echo 'import os, sys' >> ${RPM_BUILD_ROOT}%{_bindir}/idle%{binsuffix}
174echo 'os.execvp("%{_bindir}/python%{binsuffix}", ["%{_bindir}/python%{binsuffix}", "%{python_lib}/idlelib/idle.py"] + sys.argv[1:])' >> ${RPM_BUILD_ROOT}%{_bindir}/idle%{binsuffix}
175echo 'print "Failed to exec Idle"' >> ${RPM_BUILD_ROOT}%{_bindir}/idle%{binsuffix}
176echo 'sys.exit(1)' >> ${RPM_BUILD_ROOT}%{_bindir}/idle%{binsuffix}
177chmod 755 $RPM_BUILD_ROOT%{_bindir}/idle%{binsuffix}
178cp -a Tools $RPM_BUILD_ROOT%{python_lib}
179
180# make file lists
181rm -f mainpkg.files
182find "$RPM_BUILD_ROOT"%{python_lib} -type f |
183        sed "s|^${RPM_BUILD_ROOT}|/|" |
184        grep -v -e '/python%{libvers}/config$' -e '_tkinter.so$' >> mainpkg.files
185
186rm -f $RPM_BUILD_ROOT%{_prefix}/bin/2to3
187find "$RPM_BUILD_ROOT""%{_prefix}"/bin -type f -o -type l |
188        sed "s|^${RPM_BUILD_ROOT}|/|" |
189        grep -v -e '/bin/2to3%{binsuffix}$' |
190        grep -v -e '/bin/pydoc%{binsuffix}$' |
191        grep -v -e '/bin/smtpd.py%{binsuffix}$' |
192        grep -v -e '/bin/idle%{binsuffix}$' >> mainpkg.files
193
194
195rm -f tools.files
196find "$RPM_BUILD_ROOT"%{python_lib}/idlelib \
197      "$RPM_BUILD_ROOT"%{python_lib}/Tools -type f |
198      sed "s|^${RPM_BUILD_ROOT}|/|" > tools.files
199echo %{_bindir}/2to3-%{binsuffix} >> tools.files
200echo %{_bindir}/pydoc%{binsuffix} >> tools.files
201##echo %{_bindir}/smtpd.py%{binsuffix} >> tools.files
202echo %{_bindir}/idle%{binsuffix} >> tools.files
203
204# docs
205mkdir -p "$RPM_BUILD_ROOT"%{config_htmldir}
206(
207   cd "$RPM_BUILD_ROOT"%{config_htmldir}
208   bunzip2 < %{SOURCE1} | tar x
209)
210
211#  fix the #! line in installed files
212find "$RPM_BUILD_ROOT" -type f -print0 |
213      xargs -0 grep -l /usr/local/bin/python | while read file
214do
215   FIXFILE="$file"
216   sed 's|^#!.*python|#!%{_bindir}/env python'"%{binsuffix}"'|' \
217         "$FIXFILE" >/tmp/fix-python-path.$$
218   cat /tmp/fix-python-path.$$ > "$FIXFILE"
219   rm -f /tmp/fix-python-path.$$
220done
221
222#  check to see if there are any straggling #! lines
223find "$RPM_BUILD_ROOT" -type f | xargs egrep -n '^#! */usr/local/bin/python' \
224      | grep ':1:#!' >/tmp/python-rpm-files.$$ || true
225if [ -s /tmp/python-rpm-files.$$ ]
226then
227   echo '*****************************************************'
228   cat /tmp/python-rpm-files.$$
229   cat <<@EOF
230   *****************************************************
231     There are still files referencing /usr/local/bin/python in the
232     install directory.  They are listed above.  Please fix the .spec
233     file and try again.  If you are an end-user, you probably want
234     to report this to jafo-rpms@tummy.com as well.
235   *****************************************************
236@EOF
237   rm -f /tmp/python-rpm-files.$$
238   exit 1
239fi
240rm -f /tmp/python-rpm-files.$$
241
242
243%post -p /sbin/ldconfig
244%postun -p /sbin/ldconfig
245%clean
246rm -fr $RPM_BUILD_ROOT
247
248%files -f mainpkg.files
249%defattr(-, root, root)
250%doc LICENSE
251%doc Misc/ACKS Misc/HISTORY Misc/NEWS Misc/Porting Misc/README
252%attr(755,root,root) %dir %{python_lib}/
253%{_libdir}/libpython*
254%{_mandir}/man1/python%{libvers}.1*
255%{_mandir}/man1/%{name}.1*
256
257%files devel
258%defattr(-,root,root)
259%dir %{_includedir}/python%{libvers}m
260%{_includedir}/python%{libvers}m/*.h
261%{_includedir}/python%{libvers}
262%{_libdir}/pkgconfig/*.pc
263
264%files -f tools.files tools
265%defattr(-,root,root)
266
267%files tkinter
268%defattr(-,root,root)
269%{python_lib}/tkinter
270%{python_lib}/lib-dynload/_tkinter.*.so*
271
272%files docs
273%defattr(-,root,root)
274%{config_htmldir}/*
275
276
277%changelog
278* Sun Mar 27 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.4.4-2
279- rebuild with openssl-1.0.2g
280
281* Sat Feb 13 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.4.4-1
282- new upstream release
283- add Patch2 (python3-3.4.4-revert-makefile.patch)
284
285* Sun Apr 12 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.4.3-1
286- new upstream release
287
288* Sun Mar 22 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 3.4.2-2
289- rebuilt with readline 6.3
290- changed BuildRequires: tcl-devel, tk-devel instead of tcl, tk respectively
291- changed BuildRequires: libdb-devel instead of db4-devel
292
293* Sun Jan 11 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.4.2-1
294- new upstream release
295- update Patch1 (python-3.4.2-lib64.patch)
296
297* Sun Sep 07 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.3.3-3
298- remove configure option "--enable-profiling"
299
300* Sun Jul 06 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.3.3-2
301- rebuild with libffi-3.0.13
302
303* Sun Nov 24 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.3.3-1
304- new upstream release
305
306* Sat Oct 26 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.3.2-1
307- updated python to 3.3.2
308
309* Sun Jan  6 2013 IWAI, Masaharu <iwai@alib.jp> 3.3.0-2
310- build with Tcl/Tk 8.5.7-1
311
312* Wed Oct 24 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.3.0-1
313- updated python to 3.3.0
314- update Patch1 (python-3.3.0-lib64.patch)
315- add BuildRequires: valgrind-devel
316
317* Sat Apr 16 2011 Shu KONNO <owa@bg.wakwak.com> 3.2-1
318- updated python to 3.2
319- updated python-*-docs-html to 3.2
320- dropt all patchs
321- added python-3.2b2-lib64.patch
322- referred to the review Python-3.2/Misc/RPM/python-3.2.spec
323
324* Fri Jan 14 2011 Shu KONNO <owa@bg.wakwak.com> 3.1.3-2
325- rebuilt with openssl-1.0.0c
326
327* Mon Nov 29 2010 Shu KONNO <owa@bg.wakwak.com> 3.1.3-1
328- updated python to 3.1.3
329- added python-3.1.3-locale.patch
330- dropt python-3.1.2-lib64.patch
331- added python-3.1.3-lib64-*.patchs
332  python-3.1.3-lib64-Makefile.patch
333  python-3.1.3-lib64-setup.patch
334  python-3.1.3-lib64-site.patch
335  python-3.1.3-lib64-install.patch
336  python-3.1.3-lib64-sysconfig.patch
337  python-3.1.3-lib64-getpath.patch
338  python-3.1.3-lib64-test_install.patch
339- added run_test macro to run unit test
340- added BR: libffi
341
342* Sun Sep 26 2010 Shu KONNO <owa@bg.wakwak.com> 3.1.2-4
343- rebuilt with rpm-4.8.1 for pkg-config
344
345* Sun Jun 20 2010 Shu KONNO <owa@bg.wakwak.com> 3.1.2-3
346- spec in utf-8
347
348* Sun Jun 20 2010 Shu KONNO <owa@bg.wakwak.com> 3.1.2-2
349- added missings in BuildRequires, Requires
350
351* Fri Jun 18 2010 Shu KONNO <owa@bg.wakwak.com> 3.1.2-1
352- initial build for VineSeed
353
Note: See TracBrowser for help on using the repository browser.