#### Red Hat Package Specification File # # File: pythos2-1.5.2.spec # # This RPM is a packaging of the OS/2 version of the Python interpreter. # When the RPM is installed, it provides a single .ZIP file of a full # OS/2 development environment. # # An independent 'BuildRoot:' directive is used so that that this package # can be built in the /tmp directory, for the case where the existing setup # on the build host would be disrupted by installing-after-build-to-package # onto that system. # # Sample Package Name: # pythos2-1.5.2-1.i386.rpm # # Modification History: # 02-Jul-98 jrr Derived from 1.5.1 version packaged by Oliver Andrich # in order to meet custom needs # 25-Feb-99 jrr Updated to produce Python/2 for version 1.5.2b2 # 27-Jun-99 jrr Updated to produce Python/2 for final version of 1.5.2 # #### #### # Section: Preamble (Items Displayed When Users Request Info About Package) # # The order of the entries below is unimportant. # #### Name: pythos2 Version: 1.5.2 Release: 1 Copyright: Freely Distributable Vendor: CNRL URL: http://www.python.org/ Packager: Jeff Rush BuildArchitectures: i386 BuildRoot: /tmp/pythos2-1.5.2-rootdir Group: Development/Languages Summary: Python Scripting Language Interpreter AutoReqProv: no Source0: python152.tgz Source1: pythos2-deunix Source2: html-1.5.2.tgz Patch0: pythos2-152-html.patch Patch1: pythos2-152-tau.patch %description Python in an interpreted, object oriented scripting language. It contains support for dynamic loading of objects, classes, modules, and exceptions. Adding interfaces to new system libraries through C code is straightforward, making Python easy to use in custom settings. ######################################## ########## # # The following environment variables are automatically defined for use # in any of the following shell scripts: # # RPM_SOURCE_DIR { where sources originally reside } # RPM_BUILD_DIR { where sources get unpacked into } # RPM_DOC_DIR # RPM_OPT_FLAGS # RPM_ARCH # RPM_OS # RPM_ROOT_DIR # RPM_BUILD_ROOT { where final images get placed before packaging } # RPM_PACKAGE_NAME # RPM_PACKAGE_VERSION # RPM_PACKAGE_RELEASE # ########## #### # Section: Prep Script (Prepare to Build; Usually Just Unpacking the Sources) #### %prep %setup -n Python-1.5.2 # Keep Workarea Directory and Unpack the HTML Doc Tar Ball %setup -T -D -c -a 2 -n $RPM_BUILD_DIR/Python-1.5.2/html # Reset RPM's Concept of "-n" Back to the Top-Level Package Dir Name %setup -T -D -n $RPM_BUILD_DIR/Python-1.5.2 # Remove Version Control (CVS) Specific Files, If Any Are Lurking find . -type f -name '.cvsignore' -exec rm \{\} \; # Remove Non-VisualAge C/C++ OS/2 Platform Support rm -rf PC/wat_os2/ PC/wat_dos/ PC/vc15_w31/ PC/vc15_lib/ PC/utils/ PC/example_nt/ rm -rf Lib/plat-beos/ Lib/plat-sunos5/ Lib/plat-sunos4/ Lib/plat-next3/ rm -rf Lib/plat-netbsd1/ Lib/plat-linux2/ Lib/plat-linux1/ Lib/plat-irix6/ rm -rf Lib/plat-irix5/ Lib/plat-generic/ Lib/plat-freebsd3/ Lib/plat-freebsd2/ rm -rf Lib/plat-aix4/ Lib/plat-aix3/ Lib/lib-stdwin/ Demo/stdwin/ rm -rf Demo/sgi/ BeOS/ # Remove Non-OS/2 Documentation rm Misc/AIX-NOTES rm Misc/HPUX-NOTES rm Misc/NEXT-NOTES # Remove Non-OS/2 Build-Related Stuff rm Include/Makefile rm Lib/Makefile rm Demo/Makefile (cd Modules rm Makefile* Setup* config.c.in cstubs ld_so_aix license.terms rm makesetup makexp_aix almodule.c cdmodule.c clmodule.c rm dlmodule.c flmodule.c fmmodule.c glmodule.c sgimodule.c rm stdwinmodule.c svmodule.c sunaudiodev.c imgfile.c rm cgen.py cgensupport.c cgensupport.h ) rm Objects/Makefile* rm Parser/Makefile* (cd Python rm Makefile* thread_cthread.h thread_foobar.h thread_lwp.h thread_beos.h rm thread_nt.h thread_pthread.h thread_sgi.h thread_solaris.h ) (cd PC cp py.ico os2vacpp/python.ico find . -maxdepth 1 -type f -exec rm \{\} \; ) rm -rf PC/src/ rm -rf PCbuild/ (cd Misc rm Makefile* *.sh editline-fix ) # Test Modules Unrelated to the OS/2 Platform (cd Lib/test rm test_al.py test_audioop.py test_bsddb.py test_cd.py test_cl.py rm test_crypt.py test_dbm.py test_dl.py test_fcntl.py test_gdbm.py rm test_gl.py test_grp.py test_imageop.py test_imgfile.py test_nis.py rm test_popen2.py test_pwd.py test_rgbimg.py test_rotor.py test_signal.py rm test_sunaudiodev.py test_timing.py ) # Remove Non-OS/2 Documentation (That for a Mac, SGI, Sun, etc.) rm -rf html/mac/ # Strip 1 Level of Directories Off the Patch Filename and Apply Patches 0 & 1 %patch0 -p1 %patch1 -p1 #### # Section: Build Script (Actually Perform the Build; Usually Just 'make') #### #%build #### # Section: Install-After-Build Script (Often Just 'make install') #### %install # Make the Necessary Directories install -m755 --directory $RPM_BUILD_ROOT/var/local/pythos2 install -m755 --directory $RPM_BUILD_ROOT/var/local/pythos2/Add-Ons install -m755 --directory $RPM_BUILD_ROOT/var/local/pythos2/lib/site-packages install -m755 --directory $RPM_BUILD_ROOT/var/local/pythos2/lib/lib-dynload cp $RPM_SOURCE_DIR/pythos2-deunix $RPM_BUILD_DIR/python/deunix # Place Immediate-Use Docs in the Topmost Directory cp README $RPM_BUILD_ROOT/var/local/pythos2/README cp Misc/NEWS $RPM_BUILD_ROOT/var/local/pythos2/NEWS cp PC/os2vacpp/readme.txt $RPM_BUILD_ROOT/var/local/pythos2/README.OS2 cp -R Include/ $RPM_BUILD_ROOT/var/local/pythos2/ cp -R Modules/ $RPM_BUILD_ROOT/var/local/pythos2/ cp -R Objects/ $RPM_BUILD_ROOT/var/local/pythos2/ cp -R Parser/ $RPM_BUILD_ROOT/var/local/pythos2/ cp -R Python/ $RPM_BUILD_ROOT/var/local/pythos2/ cp -R Lib/ $RPM_BUILD_ROOT/var/local/pythos2/ cp -R PC/ $RPM_BUILD_ROOT/var/local/pythos2/ cp -R Demo/ $RPM_BUILD_ROOT/var/local/pythos2/ cp -R Tools/ $RPM_BUILD_ROOT/var/local/pythos2/ cp -R Misc/ $RPM_BUILD_ROOT/var/local/pythos2/ cp -R html/ $RPM_BUILD_ROOT/var/local/pythos2/ # For Each Subdirectory, Change EOLs to OS/2-Style in Specified Files find $RPM_BUILD_ROOT/var/local/pythos2 -type d \ -exec $RPM_BUILD_DIR/python/deunix \{\}/*.{h,c,py,uue,def,txt} \; find $RPM_BUILD_ROOT/var/local/pythos2 -type d \ -exec $RPM_BUILD_DIR/python/deunix \{\}/{makefile,makefile.omk,README,NEWS,README.OS2} \; $RPM_BUILD_DIR/python/deunix $RPM_BUILD_ROOT/var/local/pythos2/lib/test/output/* (cd $RPM_BUILD_ROOT/var/local/pythos2 zip -r0 pyth152.zip . ) #### # Section: Delivery Install/Uninstall Scripts (Pre/Post Install/Erase Scripts) #### #### # Section: Verify Script (Check for Proper Installation of Package) #### #### # Section: Clean Script (Tidy Up Build Area After a Build Completes) #### %clean rm -rf $RPM_BUILD_ROOT #### # Section: Files (List of Files w/Attributes Making Up Package) #### %files %defattr(-, root, wheel) /var/local/pythos2/pyth152.zip