[Python-checkins] python/dist/src/Misc/RPM python-2.3.spec, 1.2.12.3, 1.2.12.4

loewis at users.sourceforge.net loewis at users.sourceforge.net
Sun Oct 19 14:34:37 EDT 2003


Update of /cvsroot/python/python/dist/src/Misc/RPM
In directory sc8-pr-cvs1:/tmp/cvs-serv29804

Modified Files:
      Tag: release23-maint
	python-2.3.spec 
Log Message:
Patch #823259: Update spec file:
- skip building HTML documentation if it is not available.
- Removal of patches, which can't be referenced from a build
directly from the tar-file.
- Using the RPM tmp directory macro for the buildroot location.
- Ensuring that the clean directive doesn't accidentally
delete the users root directory or another directory.
- --enable-unicode=ucs4 in configure line.


Index: python-2.3.spec
===================================================================
RCS file: /cvsroot/python/python/dist/src/Misc/RPM/python-2.3.spec,v
retrieving revision 1.2.12.3
retrieving revision 1.2.12.4
diff -C2 -d -r1.2.12.3 -r1.2.12.4
*** python-2.3.spec	1 Oct 2003 06:47:48 -0000	1.2.12.3
--- python-2.3.spec	19 Oct 2003 18:34:35 -0000	1.2.12.4
***************
*** 42,45 ****
--- 42,48 ----
  %define include_tkinter %(if [ \\( "%{config_tkinter}" = auto -a -f /usr/bin/wish \\) -o "%{config_tkinter}" = yes ]; then echo 1; else echo 0; fi)
  
+ #  detect if documentation is available
+ %define include_docs %(if [ -f "%{_sourcedir}/html-%{version}.tar.bz2" ]; then echo 1; else echo 0; fi)
+ 
  Summary: An interpreted, interactive, object-oriented programming language.
  Name: %{name}%{binsuffix}
***************
*** 49,54 ****
  Group: Development/Languages
  Source: Python-%{version}.tgz
  Source1: html-%{version}.tar.bz2
! #Patch0: Python-2.1-pythonpath.patch
  BuildRoot: %{_tmppath}/%{name}-%{version}-root
  BuildPrereq: expat-devel
--- 52,58 ----
  Group: Development/Languages
  Source: Python-%{version}.tgz
+ %if %{include_docs}
  Source1: html-%{version}.tar.bz2
! %endif
  BuildRoot: %{_tmppath}/%{name}-%{version}-root
  BuildPrereq: expat-devel
***************
*** 113,116 ****
--- 117,121 ----
  tkinter packages.
  
+ %if %{include_docs}
  %package docs
  Summary: Python-related documentation.
***************
*** 120,125 ****
--- 125,134 ----
  Documentation relating to the Python programming language in HTML and info
  formats.
+ %endif
  
  %changelog
+ * Mon Oct 13 2003 Sean Reifschneider <jafo-rpms at tummy.com> [2.3.2-1pydotorg]
+ - Adding code to detect wether documentation is available to build.
+ 
  * Fri Sep 19 2003 Sean Reifschneider <jafo-rpms at tummy.com> [2.3.1-1pydotorg]
  - Updating to the 2.3.1 release.
***************
*** 178,182 ****
  %prep
  %setup -n Python-%{version}
- #%patch0 -p1
  
  ########
--- 187,190 ----
***************
*** 246,249 ****
--- 254,258 ----
  ######
  # Docs
+ %if %{include_docs}
  mkdir -p "$RPM_BUILD_ROOT"/var/www/html/python
  (
***************
*** 251,263 ****
     bunzip2 < %{SOURCE1} | tar x
  )
! 
! #  clean up the /usr/local/bin/python references
! find "$RPM_BUILD_ROOT" -type f | xargs grep -l /usr/local/bin/python | while read file
! do
!    rm -f /tmp/pypathtmp
!    sed 's|/usr/local/bin/python|/usr/bin/python%{binsuffix}|g' <"$file" >/tmp/pypathtmp
!    cat </tmp/pypathtmp >"$file"
!    rm -f /tmp/pypathtmp
! done
  
  ########
--- 260,264 ----
     bunzip2 < %{SOURCE1} | tar x
  )
! %endif
  
  ########
***************
*** 265,271 ****
  ########
  %clean
! #@@@
! #rm -fr $RPM_BUILD_ROOT
! #rm -f mainpkg.files tools.files
  
  ########
--- 266,271 ----
  ########
  %clean
! [ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT
! rm -f mainpkg.files tools.files
  
  ########
***************
*** 313,317 ****
--- 313,319 ----
  %endif
  
+ %if %{include_docs}
  %files docs
  %defattr(-,root,root)
  /var/www/html/python/*
+ %endif





More information about the Python-checkins mailing list