author | laca |
Thu, 27 Oct 2005 20:17:04 +0000 | |
changeset 6192 | 5d32a157a93a |
parent 6136 | 7409efbf1062 |
child 6200 | 19ff8721b8f2 |
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 |
6192 | 29 |
Patch1: Python-01-solaris-lib-dirs.diff |
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 |
6129
743dfb7995be
* SUNWPython.spec: Add another missing runtime dependency, SUNWlibmsr,
dc144907
parents:
6102
diff
changeset
|
38 |
Requires: SUNWlibmsr |
5518 | 39 |
Requires: SUNWopenssl-libraries |
40 |
Requires: SUNWTk |
|
41 |
Requires: SUNWTcl |
|
42 |
Requires: SUNWlexpt |
|
43 |
Requires: SUNWxwrtl |
|
44 |
Requires: SUNWxwplt |
|
45 |
Requires: SUNWbzip |
|
2146 | 46 |
|
47 |
%package share |
|
3984 | 48 |
Summary: The Python interperer, libraries and utilities - platform independent files, /usr/sfw/share |
2621 | 49 |
SUNW_BaseDir: %{_basedir} |
2146 | 50 |
%include default-depend.inc |
51 |
||
52 |
%package devel |
|
53 |
Summary: The Python interpreter, libraries and utilities - develper files - platform dependent, /usr filesystem |
|
54 |
%include default-depend.inc |
|
55 |
Requires: SUNWPython |
|
56 |
||
57 |
%prep |
|
5950 | 58 |
%setup -q -c -n %name-%version |
59 |
%setup -q -D -T -b 1 -c -n %name-%version |
|
6192 | 60 |
cd Python-%{version} |
61 |
%patch1 -p1 |
|
2146 | 62 |
|
63 |
%build |
|
5950 | 64 |
cd Python-%{p23_version} |
3984 | 65 |
CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '` |
3700 | 66 |
if test "x$CPUS" = "x" -o $CPUS = 0; then |
3984 | 67 |
CPUS=1 |
3700 | 68 |
fi |
2146 | 69 |
export CXXFLAGS="%cxx_optflags" |
5936 | 70 |
%if %cc_is_gcc |
71 |
export CFLAGS="%optflags" |
|
72 |
%else |
|
5948 | 73 |
# -xregs=no%%frameptr breaks the build of Python 2.4.1 |
74 |
export CFLAGS=`echo '%optflags' | sed -e 's/-xregs=no%%frameptr//'` |
|
5936 | 75 |
%endif |
6192 | 76 |
export OPT=$CFLAGS |
77 |
export BASECFLAGS= |
|
4576 | 78 |
export LD_RUN_PATH="/usr/sfw/lib" |
6102 | 79 |
export LDFLAGS="-z ignore" |
6192 | 80 |
export CPP="$CC -E" |
5950 | 81 |
./configure --prefix=%{p23_prefix} \ |
82 |
--libdir=%{p23_libdir} \ |
|
83 |
--mandir=%{p23_mandir} \ |
|
84 |
--datadir=%{p23_datadir} \ |
|
85 |
--infodir=%{p23_datadir}/info |
|
86 |
||
87 |
make -j$CPUS |
|
6192 | 88 |
unset LD_RUN_PATH |
5950 | 89 |
|
90 |
cd ../Python-%{version} |
|
2146 | 91 |
./configure --prefix=%{_prefix} \ |
92 |
--libdir=%{_libdir} \ |
|
93 |
--mandir=%{_mandir} \ |
|
94 |
--datadir=%{_datadir} \ |
|
95 |
--infodir=%{_datadir}/info |
|
5936 | 96 |
%if %cc_is_gcc |
97 |
perl -pi -e "s/^#define _POSIX_C_SOURCE/\/\//" pyconfig.h |
|
98 |
perl -pi -e "s/^#define _XOPEN_SOURCE/\/\//" pyconfig.h |
|
99 |
perl -pi -e "s/^#define _XOPEN_SOURCE_EXTENDED/\/\//" pyconfig.h |
|
100 |
%endif |
|
101 |
||
3700 | 102 |
make -j$CPUS |
2146 | 103 |
|
104 |
%install |
|
105 |
[ "$RPM_BUILD_ROOT" != "" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT |
|
5950 | 106 |
cd Python-%{p23_version} |
2146 | 107 |
make install DESTDIR=$RPM_BUILD_ROOT |
5950 | 108 |
|
6133 | 109 |
cd ../Python-%{version} |
110 |
make install DESTDIR=$RPM_BUILD_ROOT |
|
111 |
||
6192 | 112 |
# search for vendor packages in /usr/lib/python<version>/vendor-packages |
113 |
echo "import site; site.addsitedir('%{_libdir}/python2.4/vendor-packages')" \ |
|
114 |
> $RPM_BUILD_ROOT%{_libdir}/python2.4/site-packages/vendor-packages.pth |
|
115 |
mkdir -p $RPM_BUILD_ROOT%{_libdir}/python2.4/vendor-packages |
|
116 |
||
5604 | 117 |
cd $RPM_BUILD_ROOT%{_bindir} && rm python && ln -s python2.4 python |
118 |
rm -rf $RPM_BUILD_ROOT%{_libdir}/python2.4/bsddb |
|
5950 | 119 |
cd $RPM_BUILD_ROOT%{p23_bindir} && rm python && ln -s ../../bin/python2.4 python |
120 |
rm -rf $RPM_BUILD_ROOT%{p23_libdir}/python2.3/bsddb |
|
121 |
||
6192 | 122 |
echo deleting pyo files: |
123 |
find $RPM_BUILD_ROOT -name '*.pyo' -exec rm {} \; -print |
|
2146 | 124 |
|
5859
da89f4e343b9
update package version numbers and change ELF comment from supported to
laca
parents:
5604
diff
changeset
|
125 |
%{?pkgbuild_postprocess: %pkgbuild_postprocess -v -c "%{version}:%{jds_version}:%{name}:$RPM_ARCH:%(date +%%Y-%%m-%%d):%{support_level}" $RPM_BUILD_ROOT} |
4122 | 126 |
|
4123 | 127 |
%clean |
128 |
rm -rf $RPM_BUILD_ROOT |
|
129 |
||
2146 | 130 |
%files |
6192 | 131 |
%defattr (-, root, bin) |
5950 | 132 |
%dir %attr (0755, root, bin) %{p23_prefix} |
133 |
%dir %attr (0755, root, bin) %{p23_bindir} |
|
134 |
%{p23_bindir}/* |
|
2146 | 135 |
%dir %attr (0755, root, bin) %{_bindir} |
136 |
%{_bindir}/* |
|
137 |
%dir %attr (0755, root, bin) %{_libdir} |
|
138 |
%{_libdir}/* |
|
5950 | 139 |
%dir %attr (0755, root, bin) %{p23_libdir} |
140 |
%{p23_libdir}/* |
|
2146 | 141 |
|
142 |
%files share |
|
6192 | 143 |
%defattr (-, root, bin) |
5950 | 144 |
%dir %attr (0755, root, bin) %{p23_prefix} |
145 |
%dir %attr(0755, root, sys) %{_datadir} |
|
146 |
%dir %attr(0755, root, bin) %{p23_datadir} |
|
2146 | 147 |
%dir %attr(0755, root, bin) %{_mandir} |
148 |
%dir %attr(0755, root, bin) %{_mandir}/* |
|
149 |
%{_mandir}/*/* |
|
5950 | 150 |
%dir %attr(0755, root, bin) %{p23_mandir} |
151 |
%dir %attr(0755, root, bin) %{p23_mandir}/* |
|
152 |
%{p23_mandir}/*/* |
|
2146 | 153 |
|
154 |
%files devel |
|
6192 | 155 |
%defattr (-, root, bin) |
5950 | 156 |
%dir %attr (0755, root, bin) %{p23_prefix} |
2146 | 157 |
%dir %attr (0755, root, bin) %{_includedir} |
158 |
%{_includedir}/* |
|
5950 | 159 |
%dir %attr (0755, root, bin) %{p23_includedir} |
160 |
%{p23_includedir}/* |
|
2146 | 161 |
|
162 |
%changelog |
|
6129
743dfb7995be
* SUNWPython.spec: Add another missing runtime dependency, SUNWlibmsr,
dc144907
parents:
6102
diff
changeset
|
163 |
* Wed Oct 19 2005 - [email protected] |
743dfb7995be
* SUNWPython.spec: Add another missing runtime dependency, SUNWlibmsr,
dc144907
parents:
6102
diff
changeset
|
164 |
- Add another missing runtime dependency, SUNWlibmsr, fixes 6208617. |
6136
7409efbf1062
* SUNWPython.spec: Move Pyrex to SUNWPython-extra.spec.
dc144907
parents:
6133
diff
changeset
|
165 |
- Move Pyrex to SUNWPython-extra.spec file. |
5948 | 166 |
* Tue Sep 20 2005 - [email protected] |
5950 | 167 |
- move python 2.4.1 to /usr and keep python 2.3 in /usr/sfw for backcompat |
5948 | 168 |
- omit -xregs=no%frameptr as it breaks the build |
5604 | 169 |
* Fri Aug 26 2005 - [email protected] |
170 |
- update to 2.4.1 |
|
5518 | 171 |
* Tue Aug 02 2005 - [email protected] |
172 |
- added SUNWsfwhea build dependency needed for expat headers |
|
173 |
* Tue Aug 02 2005 - [email protected] |
|
174 |
- Add SUNWlexpt dependency as the Expat library is required for building. |
|
175 |
* Fri Jul 29 2005 - [email protected] |
|
176 |
- Add missing runtime dependencies, fixes 6208617. |
|
4568 | 177 |
* Sun Nov 14 2004 - [email protected] |
178 |
- add /usr/sfw/lib to RPATH |
|
4320 | 179 |
* Fri Oct 22 2004 - [email protected] |
180 |
- remove bsddb bits (won't work without bsd db itself), fixes 6176600 |
|
4122 | 181 |
* Sat Oct 02 2004 - [email protected] |
182 |
- added %pkgbuild_postprocess |
|
3984 | 183 |
* Sat Sep 18 2004 - [email protected] |
184 |
- move to /usr/sfw |
|
3221
a9dc1a9a5f37
Updated for changing Gnome install location to /usr/...,
woos
parents:
2621
diff
changeset
|
185 |
* Tue Jun 22 2004 - [email protected] |
a9dc1a9a5f37
Updated for changing Gnome install location to /usr/...,
woos
parents:
2621
diff
changeset
|
186 |
- changed install location to /usr/lib and /usr/bin |
2154 | 187 |
* Fri Mar 05 2005 - [email protected] |
188 |
- remove package root def'n |
|
2146 | 189 |
* Thu Mar 04 2004 - [email protected] |
190 |
- initial version added to CVS |