--- admin/PlamoBuild-template-20170415 2017-04-15 12:25:32.000000000 +0900 +++ plamo/01_minimum/Python2/PlamoBuild.Python2-2.7.9 2017-05-05 13:13:40.000000000 +0900 @@ -1,18 +1,19 @@ #!/bin/sh ###################################################################### -url="" +url="https://www.python.org/ftp/python/2.7.9/Python-2.7.9.tar.xz" verify= digest= commitid= -pkgbase= -vers= +pkgbase=Python2 +vers=2.7.9 arch=`uname -m` -build=P1 -src=$pkgbase-$vers +build=P4 +src=Python-$vers patchfiles="" -OPT_CONFIG="" -DOCS="README" +OPT_CONFIG="--enable-shared --with-system-expat --with-system-ffi + --with-dbmliborder=gdbm:bdb:ndbm" +DOCS="LICENSE README" template=20170415 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -36,6 +37,16 @@ if [ -d ${B[$i]} ] ; then rm -rf ${B[$i]} ; fi ; cp -a ${S[$i]} ${B[$i]} done apply_patches + cd $B + sed -i 's@\(#! /usr\)/local\(/bin/python\)@\1\22@' Lib/cgi.py + if [ $arch == x86_64 ] ; then + sed -i 's@lib\(/python\)@lib64\1@' \ + Lib/{distutils/command/install,sysconfig}.py + sed -i 's@"lib"@"lib64"@' Lib/{distutils/sysconfig,site}.py + sed -i '/^SCRIPTDIR/s@lib@lib64@' Makefile.pre.in + sed -i -e '/VERSION/s@lib/@lib64/@' -e '/joinpath/s@lib/@lib64/@' \ + Modules/getpath.c + fi for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -x configure ] ; then @@ -64,16 +75,28 @@ make install DESTDIR=$P fi done + touch $P/usr/bin/{pydoc,idle,2to3,smtpd.py} + ln -s /usr/$libdir/libpython2.7.so $P/usr/$libdir/python2.7/config + touch $P/usr/$libdir/python2.7/lib-dynload/* touch $W/i.et cd $W find $P ! -type l -newer i.st ! -newer i.et \ -exec touch -t `date '+%m%d0900'` {} \; compress + strip_libdir $P/usr/$libdir/python2.7/config + strip_libdir $P/usr/$libdir/python2.7/lib-dynload + touch -t `date '+%m%d0900'` $P/usr/$libdir/python2.7/lib-dynload setup_docdir convert_links + touch -t `date '+%m%d0900'` $P/usr/$libdir/python2.7/config tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` + tar rvpf $pkg.tar -C $P `cd $P ; find usr/$libdir -maxdepth 1 -name libpython2.7.*` + tar rvpf $pkg.tar -C $P usr/$libdir/python2.7 + tar rvpf $pkg.tar -C $P `cd $P ; find usr/$libdir/pkgconfig | tail -n+2` + tar rvpf $pkg.tar -C $P usr/include/python2.7 tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/man/man1 | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/doc/$src + tar rvpf $pkg.tar -C $P install/doinst.sh touch -t `date '+%m%d0900'` $pkg.tar ; xz $pkg.tar ; touch $pkg.tar.xz mv $pkg.tar.xz $pkg.txz cleanup