author | laca |
Tue, 20 Sep 2005 16:30:08 +0000 | |
changeset 5950 | 3f8f03c21c7d |
parent 5948 | 343403994358 |
child 6102 | 1e3e35b9a369 |
permissions | -rw-r--r-- |
2146 | 1 |
# |
2 |
# spec file for package SUNWPython |
|
3 |
# |
|
4 |
# includes module(s): Python |
|
5 |
# |
|
6 |
# Copyright (c) 2004 Sun Microsystems, Inc. |
|
7 |
# This file and all modifications and additions to the pristine |
|
8 |
# package are under the same license as the package itself. |
|
9 |
# |
|
10 |
%include Solaris.inc |
|
5950 | 11 |
|
12 |
%define p23_version 2.3.3 |
|
13 |
%define p23_subdir sfw |
|
14 |
%define p23_prefix %{_basedir}/%{p23_subdir} |
|
15 |
%define p23_bindir %{p23_prefix}/bin |
|
16 |
%define p23_libdir %{p23_prefix}/lib |
|
17 |
%define p23_includedir %{p23_prefix}/include |
|
18 |
%define p23_sysconfdir /etc |
|
19 |
%define p23_datadir %{p23_prefix}/share |
|
20 |
%define p23_mandir %{p23_datadir}/man |
|
3984 | 21 |
|
2146 | 22 |
Name: SUNWPython |
23 |
Summary: The Python interpreter, libraries and utilities |
|
5604 | 24 |
Version: 2.4.1 |
2621 | 25 |
SUNW_BaseDir: %{_basedir} |
2146 | 26 |
BuildRoot: %{_tmppath}/%{name}-%{version}-build |
5604 | 27 |
Source: http://www.python.org/ftp/python/%{version}/Python-%{version}.tar.bz2 |
5950 | 28 |
Source1: http://www.python.org/ftp/python/%{p23_version}/Python-%{p23_version}.tar.bz2 |
29 |
Source2: l10n-configure.sh |
|
2146 | 30 |
|
31 |
%include default-depend.inc |
|
5518 | 32 |
BuildRequires: SUNWTk |
33 |
BuildRequires: SUNWTcl |
|
34 |
BuildRequires: SUNWlexpt |
|
35 |
BuildRequires: SUNWsfwhea |
|
2146 | 36 |
Requires: SUNWPython-share |
5518 | 37 |
Requires: SUNWlibms |
38 |
Requires: SUNWopenssl-libraries |
|
39 |
Requires: SUNWTk |
|
40 |
Requires: SUNWTcl |
|
41 |
Requires: SUNWlexpt |
|
42 |
Requires: SUNWxwrtl |
|
43 |
Requires: SUNWxwplt |
|
44 |
Requires: SUNWbzip |
|
2146 | 45 |
|
46 |
%package share |
|
3984 | 47 |
Summary: The Python interperer, libraries and utilities - platform independent files, /usr/sfw/share |
2621 | 48 |
SUNW_BaseDir: %{_basedir} |
2146 | 49 |
%include default-depend.inc |
50 |
||
51 |
%package devel |
|
52 |
Summary: The Python interpreter, libraries and utilities - develper files - platform dependent, /usr filesystem |
|
53 |
%include default-depend.inc |
|
54 |
Requires: SUNWPython |
|
55 |
||
56 |
%prep |
|
5950 | 57 |
%setup -q -c -n %name-%version |
58 |
%setup -q -D -T -b 1 -c -n %name-%version |
|
2146 | 59 |
|
60 |
%build |
|
5950 | 61 |
cd Python-%{p23_version} |
3984 | 62 |
CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '` |
3700 | 63 |
if test "x$CPUS" = "x" -o $CPUS = 0; then |
3984 | 64 |
CPUS=1 |
3700 | 65 |
fi |
2146 | 66 |
export CXXFLAGS="%cxx_optflags" |
5936 | 67 |
%if %cc_is_gcc |
68 |
export CFLAGS="%optflags" |
|
69 |
%else |
|
5948 | 70 |
# -xregs=no%%frameptr breaks the build of Python 2.4.1 |
71 |
export CFLAGS=`echo '%optflags' | sed -e 's/-xregs=no%%frameptr//'` |
|
72 |
export CFLAGS="$CFLAGS -DANSICPP -D__STDC_VERSION__=199409L" |
|
5936 | 73 |
%endif |
2146 | 74 |
export BASECFLAGS=$CFLAGS |
75 |
export RPM_OPT_FLAGS="$CFLAGS" |
|
4576 | 76 |
export LD_RUN_PATH="/usr/sfw/lib" |
2146 | 77 |
export CPP="$CC -E $CFLAGS" |
5950 | 78 |
./configure --prefix=%{p23_prefix} \ |
79 |
--libdir=%{p23_libdir} \ |
|
80 |
--mandir=%{p23_mandir} \ |
|
81 |
--datadir=%{p23_datadir} \ |
|
82 |
--infodir=%{p23_datadir}/info |
|
83 |
||
84 |
make -j$CPUS |
|
85 |
||
86 |
cd ../Python-%{version} |
|
2146 | 87 |
./configure --prefix=%{_prefix} \ |
88 |
--libdir=%{_libdir} \ |
|
89 |
--mandir=%{_mandir} \ |
|
90 |
--datadir=%{_datadir} \ |
|
91 |
--infodir=%{_datadir}/info |
|
5936 | 92 |
%if %cc_is_gcc |
93 |
perl -pi -e "s/^#define _POSIX_C_SOURCE/\/\//" pyconfig.h |
|
94 |
perl -pi -e "s/^#define _XOPEN_SOURCE/\/\//" pyconfig.h |
|
95 |
perl -pi -e "s/^#define _XOPEN_SOURCE_EXTENDED/\/\//" pyconfig.h |
|
96 |
%endif |
|
97 |
||
3700 | 98 |
make -j$CPUS |
2146 | 99 |
|
100 |
%install |
|
101 |
[ "$RPM_BUILD_ROOT" != "" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT |
|
5950 | 102 |
cd Python-%{p23_version} |
2146 | 103 |
make install DESTDIR=$RPM_BUILD_ROOT |
5950 | 104 |
|
105 |
cd ../Python-%{version} |
|
106 |
make install DESTDIR=$RPM_BUILD_ROOT |
|
107 |
||
5604 | 108 |
cd $RPM_BUILD_ROOT%{_bindir} && rm python && ln -s python2.4 python |
109 |
rm -rf $RPM_BUILD_ROOT%{_libdir}/python2.4/bsddb |
|
5950 | 110 |
cd $RPM_BUILD_ROOT%{p23_bindir} && rm python && ln -s ../../bin/python2.4 python |
111 |
rm -rf $RPM_BUILD_ROOT%{p23_libdir}/python2.3/bsddb |
|
112 |
||
2146 | 113 |
|
5859
da89f4e343b9
update package version numbers and change ELF comment from supported to
laca
parents:
5604
diff
changeset
|
114 |
%{?pkgbuild_postprocess: %pkgbuild_postprocess -v -c "%{version}:%{jds_version}:%{name}:$RPM_ARCH:%(date +%%Y-%%m-%%d):%{support_level}" $RPM_BUILD_ROOT} |
4122 | 115 |
|
4123 | 116 |
%clean |
117 |
rm -rf $RPM_BUILD_ROOT |
|
118 |
||
2146 | 119 |
%files |
120 |
%defattr (-, root, other) |
|
5950 | 121 |
%dir %attr (0755, root, bin) %{p23_prefix} |
122 |
%dir %attr (0755, root, bin) %{p23_bindir} |
|
123 |
%{p23_bindir}/* |
|
2146 | 124 |
%dir %attr (0755, root, bin) %{_bindir} |
125 |
%{_bindir}/* |
|
126 |
%dir %attr (0755, root, bin) %{_libdir} |
|
127 |
%{_libdir}/* |
|
5950 | 128 |
%dir %attr (0755, root, bin) %{p23_libdir} |
129 |
%{p23_libdir}/* |
|
2146 | 130 |
|
131 |
%files share |
|
132 |
%defattr (-, root, other) |
|
5950 | 133 |
%dir %attr (0755, root, bin) %{p23_prefix} |
134 |
%dir %attr(0755, root, sys) %{_datadir} |
|
135 |
%dir %attr(0755, root, bin) %{p23_datadir} |
|
2146 | 136 |
%dir %attr(0755, root, bin) %{_mandir} |
137 |
%dir %attr(0755, root, bin) %{_mandir}/* |
|
138 |
%{_mandir}/*/* |
|
5950 | 139 |
%dir %attr(0755, root, bin) %{p23_mandir} |
140 |
%dir %attr(0755, root, bin) %{p23_mandir}/* |
|
141 |
%{p23_mandir}/*/* |
|
2146 | 142 |
|
143 |
%files devel |
|
144 |
%defattr (-, root, other) |
|
5950 | 145 |
%dir %attr (0755, root, bin) %{p23_prefix} |
2146 | 146 |
%dir %attr (0755, root, bin) %{_includedir} |
147 |
%{_includedir}/* |
|
5950 | 148 |
%dir %attr (0755, root, bin) %{p23_includedir} |
149 |
%{p23_includedir}/* |
|
2146 | 150 |
|
151 |
%changelog |
|
5948 | 152 |
* Tue Sep 20 2005 - [email protected] |
5950 | 153 |
- move python 2.4.1 to /usr and keep python 2.3 in /usr/sfw for backcompat |
5948 | 154 |
- omit -xregs=no%frameptr as it breaks the build |
5604 | 155 |
* Fri Aug 26 2005 - [email protected] |
156 |
- update to 2.4.1 |
|
5518 | 157 |
* Tue Aug 02 2005 - [email protected] |
158 |
- added SUNWsfwhea build dependency needed for expat headers |
|
159 |
* Tue Aug 02 2005 - [email protected] |
|
160 |
- Add SUNWlexpt dependency as the Expat library is required for building. |
|
161 |
* Fri Jul 29 2005 - [email protected] |
|
162 |
- Add missing runtime dependencies, fixes 6208617. |
|
4568 | 163 |
* Sun Nov 14 2004 - [email protected] |
164 |
- add /usr/sfw/lib to RPATH |
|
4320 | 165 |
* Fri Oct 22 2004 - [email protected] |
166 |
- remove bsddb bits (won't work without bsd db itself), fixes 6176600 |
|
4122 | 167 |
* Sat Oct 02 2004 - [email protected] |
168 |
- added %pkgbuild_postprocess |
|
3984 | 169 |
* Sat Sep 18 2004 - [email protected] |
170 |
- move to /usr/sfw |
|
3221
a9dc1a9a5f37
Updated for changing Gnome install location to /usr/...,
woos
parents:
2621
diff
changeset
|
171 |
* Tue Jun 22 2004 - [email protected] |
a9dc1a9a5f37
Updated for changing Gnome install location to /usr/...,
woos
parents:
2621
diff
changeset
|
172 |
- changed install location to /usr/lib and /usr/bin |
2154 | 173 |
* Fri Mar 05 2005 - [email protected] |
174 |
- remove package root def'n |
|
2146 | 175 |
* Thu Mar 04 2004 - [email protected] |
176 |
- initial version added to CVS |