diff --git a/Misc/RPM/python-2.4.spec b/Misc/RPM/python-2.4.spec index 1e4e8518c8f..0f1dbd574ad 100644 --- a/Misc/RPM/python-2.4.spec +++ b/Misc/RPM/python-2.4.spec @@ -25,6 +25,9 @@ %define config_ipv6 yes %define config_ipv6 no +# Location of the HTML directory. +%define config_htmldir /var/www/html/python + ################################# # End of user-modifiable configs ################################# @@ -40,6 +43,7 @@ %define pymalloc %(if [ "%{config_pymalloc}" = yes ]; then echo --with-pymalloc; else echo --without-pymalloc; fi) %define binsuffix %(if [ "%{config_binsuffix}" = none ]; then echo ; else echo "%{config_binsuffix}"; fi) %define include_tkinter %(if [ \\( "%{config_tkinter}" = auto -a -f /usr/bin/wish \\) -o "%{config_tkinter}" = yes ]; then echo 1; else echo 0; fi) +%define libdirname %(( uname -m | egrep -q '_64$' && [ -d /usr/lib64 ] && echo lib64 ) || echo lib) # detect if documentation is available %define include_docs %(if [ -f "%{_sourcedir}/html-%{version}.tar.bz2" ]; then echo 1; else echo 0; fi) @@ -50,7 +54,7 @@ Version: %{version} Release: %{release} Copyright: Modified CNRI Open Source License Group: Development/Languages -Source: Python-%{version}.tgz +Source: Python-%{version}.tar.bz2 %if %{include_docs} Source1: html-%{version}.tar.bz2 %endif @@ -127,6 +131,15 @@ formats. %endif %changelog +* Tue Oct 19 2004 Sean Reifschneider [2.4b1-1pydotorg] +- Updating to 2.4. + +* Thu Jul 22 2004 Sean Reifschneider [2.3.4-3pydotorg] +- Paul Tiemann fixes for %{prefix}. +- Adding permission changes for directory as suggested by reimeika.ca +- Adding code to detect when it should be using lib64. +- Adding a define for the location of /var/www/html for docs. + * Thu May 27 2004 Sean Reifschneider [2.3.4-2pydotorg] - Including changes from Ian Holsman to build under Red Hat 7.3. - Fixing some problems with the /usr/local path change. @@ -213,10 +226,10 @@ make %install # set the install path echo '[install_scripts]' >setup.cfg -echo 'install_dir='"${RPM_BUILD_ROOT}/usr/bin" >>setup.cfg +echo 'install_dir='"${RPM_BUILD_ROOT}%{__prefix}/bin" >>setup.cfg [ -d "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT -mkdir -p $RPM_BUILD_ROOT%{__prefix}/lib/python%{libvers}/lib-dynload +mkdir -p $RPM_BUILD_ROOT%{__prefix}/%{libdirname}/python%{libvers}/lib-dynload make prefix=$RPM_BUILD_ROOT%{__prefix} install # REPLACE PATH IN PYDOC @@ -225,7 +238,7 @@ then ( cd $RPM_BUILD_ROOT%{__prefix}/bin mv pydoc pydoc.old - sed 's|#!.*|#!/usr/bin/env python'%{binsuffix}'|' \ + sed 's|#!.*|#!%{__prefix}/bin/env python'%{binsuffix}'|' \ pydoc.old >pydoc chmod 755 pydoc rm -f pydoc.old @@ -244,14 +257,14 @@ fi ######## # Tools -echo '#!/bin/bash' >${RPM_BUILD_ROOT}%{_bindir}/idle%{binsuffix} -echo 'exec %{__prefix}/bin/python%{binsuffix} /usr/lib/python%{libvers}/idlelib/idle.py' >>$RPM_BUILD_ROOT%{_bindir}/idle%{binsuffix} -chmod 755 $RPM_BUILD_ROOT%{_bindir}/idle%{binsuffix} -cp -a Tools $RPM_BUILD_ROOT%{__prefix}/lib/python%{libvers} +echo '#!/bin/bash' >${RPM_BUILD_ROOT}%{__prefix}/bin/idle%{binsuffix} +echo 'exec %{__prefix}/bin/python%{binsuffix} %{__prefix}/%{libdirname}/python%{libvers}/idlelib/idle.py' >>$RPM_BUILD_ROOT%{__prefix}/bin/idle%{binsuffix} +chmod 755 $RPM_BUILD_ROOT%{__prefix}/bin/idle%{binsuffix} +cp -a Tools $RPM_BUILD_ROOT%{__prefix}/%{libdirname}/python%{libvers} # MAKE FILE LISTS rm -f mainpkg.files -find "$RPM_BUILD_ROOT""%{__prefix}"/lib/python%{libvers}/lib-dynload -type f | +find "$RPM_BUILD_ROOT""%{__prefix}"/%{libdirname}/python%{libvers}/lib-dynload -type f | sed "s|^${RPM_BUILD_ROOT}|/|" | grep -v -e '_tkinter.so$' >mainpkg.files find "$RPM_BUILD_ROOT""%{__prefix}"/bin -type f | @@ -259,17 +272,17 @@ find "$RPM_BUILD_ROOT""%{__prefix}"/bin -type f | grep -v -e '/bin/idle%{binsuffix}$' >>mainpkg.files rm -f tools.files -find "$RPM_BUILD_ROOT""%{__prefix}"/lib/python%{libvers}/idlelib \ - "$RPM_BUILD_ROOT""%{__prefix}"/lib/python%{libvers}/Tools -type f | +find "$RPM_BUILD_ROOT""%{__prefix}"/%{libdirname}/python%{libvers}/idlelib \ + "$RPM_BUILD_ROOT""%{__prefix}"/%{libdirname}/python%{libvers}/Tools -type f | sed "s|^${RPM_BUILD_ROOT}|/|" >tools.files echo "%{__prefix}"/bin/idle%{binsuffix} >>tools.files ###### # Docs %if %{include_docs} -mkdir -p "$RPM_BUILD_ROOT"/var/www/html/python +mkdir -p "$RPM_BUILD_ROOT"%{config_htmldir} ( - cd "$RPM_BUILD_ROOT"/var/www/html/python + cd "$RPM_BUILD_ROOT"%{config_htmldir} bunzip2 < %{SOURCE1} | tar x ) %endif @@ -279,7 +292,7 @@ find "$RPM_BUILD_ROOT" -type f -print0 | xargs -0 grep -l /usr/local/bin/python | while read file do FIXFILE="$file" - sed 's|^#!.*python|#!/usr/bin/env python'"%{binsuffix}"'|' \ + sed 's|^#!.*python|#!%{__prefix}/bin/env python'"%{binsuffix}"'|' \ "$FIXFILE" >/tmp/fix-python-path.$$ cat /tmp/fix-python-path.$$ >"$FIXFILE" rm -f /tmp/fix-python-path.$$ @@ -321,30 +334,30 @@ rm -f mainpkg.files tools.files %doc LICENSE Misc/ACKS Misc/HISTORY Misc/NEWS %{__prefix}/man/man1/python%{binsuffix}.1* -%dir %{__prefix}/include/python%{libvers} -%dir %{__prefix}/lib/python%{libvers}/ -%{__prefix}/lib/python%{libvers}/*.txt -%{__prefix}/lib/python%{libvers}/*.py* -%{__prefix}/lib/python%{libvers}/pdb.doc -%{__prefix}/lib/python%{libvers}/profile.doc -%{__prefix}/lib/python%{libvers}/curses -%{__prefix}/lib/python%{libvers}/distutils -%{__prefix}/lib/python%{libvers}/encodings -%{__prefix}/lib/python%{libvers}/plat-linux2 -%{__prefix}/lib/python%{libvers}/site-packages -%{__prefix}/lib/python%{libvers}/test -%{__prefix}/lib/python%{libvers}/xml -%{__prefix}/lib/python%{libvers}/email -%{__prefix}/lib/python%{libvers}/compiler -%{__prefix}/lib/python%{libvers}/bsddb -%{__prefix}/lib/python%{libvers}/hotshot -%{__prefix}/lib/python%{libvers}/logging -%{__prefix}/lib/python%{libvers}/lib-old +%attr(755,root,root) %dir %{__prefix}/include/python%{libvers} +%attr(755,root,root) %dir %{__prefix}/%{libdirname}/python%{libvers}/ +%{__prefix}/%{libdirname}/python%{libvers}/*.txt +%{__prefix}/%{libdirname}/python%{libvers}/*.py* +%{__prefix}/%{libdirname}/python%{libvers}/pdb.doc +%{__prefix}/%{libdirname}/python%{libvers}/profile.doc +%{__prefix}/%{libdirname}/python%{libvers}/curses +%{__prefix}/%{libdirname}/python%{libvers}/distutils +%{__prefix}/%{libdirname}/python%{libvers}/encodings +%{__prefix}/%{libdirname}/python%{libvers}/plat-linux2 +%{__prefix}/%{libdirname}/python%{libvers}/site-packages +%{__prefix}/%{libdirname}/python%{libvers}/test +%{__prefix}/%{libdirname}/python%{libvers}/xml +%{__prefix}/%{libdirname}/python%{libvers}/email +%{__prefix}/%{libdirname}/python%{libvers}/compiler +%{__prefix}/%{libdirname}/python%{libvers}/bsddb +%{__prefix}/%{libdirname}/python%{libvers}/hotshot +%{__prefix}/%{libdirname}/python%{libvers}/logging +%{__prefix}/%{libdirname}/python%{libvers}/lib-old %files devel %defattr(-,root,root) %{__prefix}/include/python%{libvers}/*.h -%{__prefix}/lib/python%{libvers}/config +%{__prefix}/%{libdirname}/python%{libvers}/config %files -f tools.files tools %defattr(-,root,root) @@ -352,12 +365,12 @@ rm -f mainpkg.files tools.files %if %{include_tkinter} %files tkinter %defattr(-,root,root) -%{__prefix}/lib/python%{libvers}/lib-tk -%{__prefix}/lib/python%{libvers}/lib-dynload/_tkinter.so* +%{__prefix}/%{libdirname}/python%{libvers}/lib-tk +%{__prefix}/%{libdirname}/python%{libvers}/lib-dynload/_tkinter.so* %endif %if %{include_docs} %files docs %defattr(-,root,root) -/var/www/html/python/* +%{config_htmldir}/* %endif