From 8518f72312aecbb8dfb992b599bdb9a41c318791 Mon Sep 17 00:00:00 2001 From: Igor Pashev Date: Fri, 12 Apr 2013 02:23:28 +0400 Subject: Dynamic developer/python --- python2.7/Makefile | 52 ++++++--- python2.7/developer-python.p5m | 226 +++++++++++++++++++------------------ python2.7/developer-python.p5m.gen | 32 ++++++ 3 files changed, 184 insertions(+), 126 deletions(-) create mode 100755 python2.7/developer-python.p5m.gen diff --git a/python2.7/Makefile b/python2.7/Makefile index 2621607..c172221 100644 --- a/python2.7/Makefile +++ b/python2.7/Makefile @@ -31,6 +31,7 @@ checksum-Python-2.7.3.tar.bz2 := \ build-depends += \ compress/bzip2 \ developer/build/autoconf \ + file/symlinks \ library/libbz2 \ library/libdb-5.1 \ library/libexpat \ @@ -110,12 +111,14 @@ install-default-stamp: make-vars += \ DESTSHARED=$(prefix)/lib/python$(pyver)/lib-dynload # Shorter name: -d := $(protodir.default) -scriptdir = usr/lib/python$(VER) -VER := $(pyver) -d_min := work/proto/python-minimal -d_lib := work/proto/libpython - +d := $(protodir.default) +b := $(builddir.default) +VER := $(pyver) +scriptdir := usr/lib/python$(VER) +d_min := work/proto/python-minimal +d_lib := work/proto/libpython +d_dev := work/proto/dev-python +libdir := usr/lib$(lib-suffix.$(bits)) python-minimal.p5m: env += proto=$(d_min) @@ -124,6 +127,13 @@ install-stamp: postinst-stamp postinst-stamp: install-default-stamp mv $(d)/$(scriptdir)/_sysconfigdata.py \ $(d)/$(scriptdir)/_sysconfigdata_nd.py + cp $(b)/libpython$(pyver).a \ + $(d)/$(libdir)/ + rm $(d)/$(scriptdir)/config/*.a + ln -sf $(topdir)/$(d)/$(libdir)/libpython$(pyver).a \ + $(d)/$(scriptdir)/config/libpython$(pyver).a + symlinks -c $(d)/$(scriptdir)/config/ + cp -p debian/_sysconfigdata.py $(d)/$(scriptdir)/ mv $(d)/usr/lib/python$(VER)/site-packages \ $(d)/usr/lib/python$(VER)/dist-packages @@ -177,18 +187,24 @@ postinst-stamp: install-default-stamp # install libpython: mkdir -p $(d_lib) - if ls $(d)/usr/lib/libpython$(pyver).so.* >/dev/null 2>&1; then \ - $(movefiles) -s $(d) -d $(d_lib) \ - usr/lib/libpython$(pyver).so.1.0 ; \ - ln -sf libpython$(pyver).so.1.0 \ - $(d_lib)/usr/lib/libpython$(pyver).so.1 ; \ - fi - if ls $(d)/usr/lib/$(mach64)/libpython$(pyver).so.* >/dev/null 2>&1; then \ - $(movefiles) -s $(d) -d$(d_lib) \ - usr/lib/$(mach64)/libpython$(pyver).so.1.0 ; \ - ln -sf libpython$(pyver).so.1.0 \ - $(d_lib)/usr/lib/$(mach64)/libpython$(pyver).so.1 ; \ - fi + $(movefiles) -s $(d) -d $(d_lib) \ + $(libdir)/libpython$(pyver).so.1.0 + ln -sf libpython$(pyver).so.1.0 \ + $(d_lib)/$(libdir)/libpython$(pyver).so.1 + + # install developer/python: + mkdir -p $(d_dev) + mkdir -p $(d_dev)/usr/share/man/man1 + $(movefiles) -s $(d) -d $(d_dev) \ + usr/lib/python$(VER)/config \ + usr/include/python$(VER) \ + $(libdir)/libpython$(VER).so \ + $(libdir)/libpython$(VER).a \ + $(libdir)/pkgconfig/python-$(VER).pc \ + usr/bin/python$(VER)-config + cp -p debian/python-config.1 \ + $(d_dev)/usr/share/man/man1/python$(VER)-config.1 + touch $@ diff --git a/python2.7/developer-python.p5m b/python2.7/developer-python.p5m index c56604a..b03800f 100644 --- a/python2.7/developer-python.p5m +++ b/python2.7/developer-python.p5m @@ -1,3 +1,4 @@ +# This file was generated by "developer-python.p5m.gen" set name=pkg.fmri value=pkg:/developer/python$(pyver)@$(ips-version) set name=pkg.summary value="Header files and a static library for Python (version $(pyver))" set name=info.upstream-url value="$(home)" @@ -14,111 +15,120 @@ depend fmri=pkg:/library/libpython$(pyver)@$(ips-version) type=incorporate depend fmri=pkg:/runtime/python$(pyver)@$(ips-version) type=require depend fmri=pkg:/runtime/python$(pyver)@$(ips-version) type=incorporate -file path=usr/bin/python$(pyver)-config pkg.depend.bypass-generate=.* -file python-config.1 path=usr/share/man/man1/python$(pyver)-config.1 - -file path=usr/include/python$(pyver)/Python-ast.h -file path=usr/include/python$(pyver)/Python.h -file path=usr/include/python$(pyver)/abstract.h -file path=usr/include/python$(pyver)/asdl.h -file path=usr/include/python$(pyver)/ast.h -file path=usr/include/python$(pyver)/bitset.h -file path=usr/include/python$(pyver)/boolobject.h -file path=usr/include/python$(pyver)/bufferobject.h -file path=usr/include/python$(pyver)/bytearrayobject.h -file path=usr/include/python$(pyver)/bytes_methods.h -file path=usr/include/python$(pyver)/bytesobject.h -file path=usr/include/python$(pyver)/cStringIO.h -file path=usr/include/python$(pyver)/cellobject.h -file path=usr/include/python$(pyver)/ceval.h -file path=usr/include/python$(pyver)/classobject.h -file path=usr/include/python$(pyver)/cobject.h -file path=usr/include/python$(pyver)/code.h -file path=usr/include/python$(pyver)/codecs.h -file path=usr/include/python$(pyver)/compile.h -file path=usr/include/python$(pyver)/complexobject.h -file path=usr/include/python$(pyver)/datetime.h -file path=usr/include/python$(pyver)/descrobject.h -file path=usr/include/python$(pyver)/dictobject.h -file path=usr/include/python$(pyver)/dtoa.h -file path=usr/include/python$(pyver)/enumobject.h -file path=usr/include/python$(pyver)/errcode.h -file path=usr/include/python$(pyver)/eval.h -file path=usr/include/python$(pyver)/fileobject.h -file path=usr/include/python$(pyver)/floatobject.h -file path=usr/include/python$(pyver)/frameobject.h -file path=usr/include/python$(pyver)/funcobject.h -file path=usr/include/python$(pyver)/genobject.h -file path=usr/include/python$(pyver)/graminit.h -file path=usr/include/python$(pyver)/grammar.h -file path=usr/include/python$(pyver)/import.h -file path=usr/include/python$(pyver)/intobject.h -file path=usr/include/python$(pyver)/intrcheck.h -file path=usr/include/python$(pyver)/iterobject.h -file path=usr/include/python$(pyver)/listobject.h -file path=usr/include/python$(pyver)/longintrepr.h -file path=usr/include/python$(pyver)/longobject.h -file path=usr/include/python$(pyver)/marshal.h -file path=usr/include/python$(pyver)/memoryobject.h -file path=usr/include/python$(pyver)/metagrammar.h -file path=usr/include/python$(pyver)/methodobject.h -file path=usr/include/python$(pyver)/modsupport.h -file path=usr/include/python$(pyver)/moduleobject.h -file path=usr/include/python$(pyver)/node.h -file path=usr/include/python$(pyver)/object.h -file path=usr/include/python$(pyver)/objimpl.h -file path=usr/include/python$(pyver)/opcode.h -file path=usr/include/python$(pyver)/osdefs.h -file path=usr/include/python$(pyver)/parsetok.h -file path=usr/include/python$(pyver)/patchlevel.h -file path=usr/include/python$(pyver)/pgen.h -file path=usr/include/python$(pyver)/pgenheaders.h -file path=usr/include/python$(pyver)/py_curses.h -file path=usr/include/python$(pyver)/pyarena.h -file path=usr/include/python$(pyver)/pycapsule.h -file path=usr/include/python$(pyver)/pyctype.h -file path=usr/include/python$(pyver)/pydebug.h -file path=usr/include/python$(pyver)/pyerrors.h -file path=usr/include/python$(pyver)/pyexpat.h -file path=usr/include/python$(pyver)/pyfpe.h -file path=usr/include/python$(pyver)/pygetopt.h -file path=usr/include/python$(pyver)/pymacconfig.h -file path=usr/include/python$(pyver)/pymactoolbox.h -file path=usr/include/python$(pyver)/pymath.h -file path=usr/include/python$(pyver)/pymem.h -file path=usr/include/python$(pyver)/pyport.h -file path=usr/include/python$(pyver)/pystate.h -file path=usr/include/python$(pyver)/pystrcmp.h -file path=usr/include/python$(pyver)/pystrtod.h -file path=usr/include/python$(pyver)/pythonrun.h -file path=usr/include/python$(pyver)/pythread.h -file path=usr/include/python$(pyver)/rangeobject.h -file path=usr/include/python$(pyver)/setobject.h -file path=usr/include/python$(pyver)/sliceobject.h -file path=usr/include/python$(pyver)/stringobject.h -file path=usr/include/python$(pyver)/structmember.h -file path=usr/include/python$(pyver)/structseq.h -file path=usr/include/python$(pyver)/symtable.h -file path=usr/include/python$(pyver)/sysmodule.h -file path=usr/include/python$(pyver)/timefuncs.h -file path=usr/include/python$(pyver)/token.h -file path=usr/include/python$(pyver)/traceback.h -file path=usr/include/python$(pyver)/tupleobject.h -file path=usr/include/python$(pyver)/ucnhash.h -file path=usr/include/python$(pyver)/unicodeobject.h -file path=usr/include/python$(pyver)/warnings.h -file path=usr/include/python$(pyver)/weakrefobject.h -file path=usr/lib/$(mach64)/pkgconfig/python-$(pyver).pc -file path=usr/lib/python$(pyver)/config/Setup -file path=usr/lib/python$(pyver)/config/Setup.config -file path=usr/lib/python$(pyver)/config/Setup.local -file path=usr/lib/python$(pyver)/config/config.c -file path=usr/lib/python$(pyver)/config/config.c.in -file path=usr/lib/python$(pyver)/config/install-sh -file path=usr/lib/python$(pyver)/config/libpython$(pyver).a -file path=usr/lib/python$(pyver)/config/makesetup -file path=usr/lib/python$(pyver)/config/python.o - -link path=usr/lib/$(mach64)/libpython$(pyver).so target=libpython$(pyver).so.1 -link path=usr/lib/$(mach64)/libpython$(pyver).a \ - target=../python$(pyver)/config/libpython$(pyver).a +dir path=usr +dir path=usr/share +dir path=usr/share/man +dir path=usr/share/man/man1 +dir path=usr/lib +dir path=usr/lib/amd64 +dir path=usr/lib/amd64/pkgconfig +dir path=usr/lib/python2.7 +dir path=usr/lib/python2.7/config +dir path=usr/bin +dir path=usr/include +dir path=usr/include/python2.7 +file work/proto/dev-python/usr/share/man/man1/python2.7-config.1 path=usr/share/man/man1/python2.7-config.1 +file work/proto/dev-python/usr/lib/amd64/libpython2.7.a path=usr/lib/amd64/libpython2.7.a +file work/proto/dev-python/usr/lib/amd64/pkgconfig/python-2.7.pc path=usr/lib/amd64/pkgconfig/python-2.7.pc +file work/proto/dev-python/usr/lib/python2.7/config/python.o path=usr/lib/python2.7/config/python.o +file work/proto/dev-python/usr/lib/python2.7/config/makesetup path=usr/lib/python2.7/config/makesetup +file work/proto/dev-python/usr/lib/python2.7/config/config.c path=usr/lib/python2.7/config/config.c +file work/proto/dev-python/usr/lib/python2.7/config/Setup.local path=usr/lib/python2.7/config/Setup.local +file work/proto/dev-python/usr/lib/python2.7/config/Setup.config path=usr/lib/python2.7/config/Setup.config +file work/proto/dev-python/usr/lib/python2.7/config/config.c.in path=usr/lib/python2.7/config/config.c.in +file work/proto/dev-python/usr/lib/python2.7/config/install-sh path=usr/lib/python2.7/config/install-sh +file work/proto/dev-python/usr/lib/python2.7/config/Setup path=usr/lib/python2.7/config/Setup +file work/proto/dev-python/usr/bin/python2.7-config path=usr/bin/python2.7-config +file work/proto/dev-python/usr/include/python2.7/listobject.h path=usr/include/python2.7/listobject.h +file work/proto/dev-python/usr/include/python2.7/codecs.h path=usr/include/python2.7/codecs.h +file work/proto/dev-python/usr/include/python2.7/token.h path=usr/include/python2.7/token.h +file work/proto/dev-python/usr/include/python2.7/bytes_methods.h path=usr/include/python2.7/bytes_methods.h +file work/proto/dev-python/usr/include/python2.7/abstract.h path=usr/include/python2.7/abstract.h +file work/proto/dev-python/usr/include/python2.7/pymacconfig.h path=usr/include/python2.7/pymacconfig.h +file work/proto/dev-python/usr/include/python2.7/code.h path=usr/include/python2.7/code.h +file work/proto/dev-python/usr/include/python2.7/grammar.h path=usr/include/python2.7/grammar.h +file work/proto/dev-python/usr/include/python2.7/pymem.h path=usr/include/python2.7/pymem.h +file work/proto/dev-python/usr/include/python2.7/objimpl.h path=usr/include/python2.7/objimpl.h +file work/proto/dev-python/usr/include/python2.7/osdefs.h path=usr/include/python2.7/osdefs.h +file work/proto/dev-python/usr/include/python2.7/pydebug.h path=usr/include/python2.7/pydebug.h +file work/proto/dev-python/usr/include/python2.7/descrobject.h path=usr/include/python2.7/descrobject.h +file work/proto/dev-python/usr/include/python2.7/stringobject.h path=usr/include/python2.7/stringobject.h +file work/proto/dev-python/usr/include/python2.7/metagrammar.h path=usr/include/python2.7/metagrammar.h +file work/proto/dev-python/usr/include/python2.7/warnings.h path=usr/include/python2.7/warnings.h +file work/proto/dev-python/usr/include/python2.7/eval.h path=usr/include/python2.7/eval.h +file work/proto/dev-python/usr/include/python2.7/pystrcmp.h path=usr/include/python2.7/pystrcmp.h +file work/proto/dev-python/usr/include/python2.7/pyport.h path=usr/include/python2.7/pyport.h +file work/proto/dev-python/usr/include/python2.7/bitset.h path=usr/include/python2.7/bitset.h +file work/proto/dev-python/usr/include/python2.7/pygetopt.h path=usr/include/python2.7/pygetopt.h +file work/proto/dev-python/usr/include/python2.7/pymath.h path=usr/include/python2.7/pymath.h +file work/proto/dev-python/usr/include/python2.7/pyerrors.h path=usr/include/python2.7/pyerrors.h +file work/proto/dev-python/usr/include/python2.7/symtable.h path=usr/include/python2.7/symtable.h +file work/proto/dev-python/usr/include/python2.7/node.h path=usr/include/python2.7/node.h +file work/proto/dev-python/usr/include/python2.7/bytearrayobject.h path=usr/include/python2.7/bytearrayobject.h +file work/proto/dev-python/usr/include/python2.7/funcobject.h path=usr/include/python2.7/funcobject.h +file work/proto/dev-python/usr/include/python2.7/marshal.h path=usr/include/python2.7/marshal.h +file work/proto/dev-python/usr/include/python2.7/iterobject.h path=usr/include/python2.7/iterobject.h +file work/proto/dev-python/usr/include/python2.7/pyarena.h path=usr/include/python2.7/pyarena.h +file work/proto/dev-python/usr/include/python2.7/classobject.h path=usr/include/python2.7/classobject.h +file work/proto/dev-python/usr/include/python2.7/errcode.h path=usr/include/python2.7/errcode.h +file work/proto/dev-python/usr/include/python2.7/longobject.h path=usr/include/python2.7/longobject.h +file work/proto/dev-python/usr/include/python2.7/sliceobject.h path=usr/include/python2.7/sliceobject.h +file work/proto/dev-python/usr/include/python2.7/py_curses.h path=usr/include/python2.7/py_curses.h +file work/proto/dev-python/usr/include/python2.7/pycapsule.h path=usr/include/python2.7/pycapsule.h +file work/proto/dev-python/usr/include/python2.7/traceback.h path=usr/include/python2.7/traceback.h +file work/proto/dev-python/usr/include/python2.7/structmember.h path=usr/include/python2.7/structmember.h +file work/proto/dev-python/usr/include/python2.7/opcode.h path=usr/include/python2.7/opcode.h +file work/proto/dev-python/usr/include/python2.7/enumobject.h path=usr/include/python2.7/enumobject.h +file work/proto/dev-python/usr/include/python2.7/asdl.h path=usr/include/python2.7/asdl.h +file work/proto/dev-python/usr/include/python2.7/bufferobject.h path=usr/include/python2.7/bufferobject.h +file work/proto/dev-python/usr/include/python2.7/moduleobject.h path=usr/include/python2.7/moduleobject.h +file work/proto/dev-python/usr/include/python2.7/cobject.h path=usr/include/python2.7/cobject.h +file work/proto/dev-python/usr/include/python2.7/structseq.h path=usr/include/python2.7/structseq.h +file work/proto/dev-python/usr/include/python2.7/pythread.h path=usr/include/python2.7/pythread.h +file work/proto/dev-python/usr/include/python2.7/methodobject.h path=usr/include/python2.7/methodobject.h +file work/proto/dev-python/usr/include/python2.7/Python.h path=usr/include/python2.7/Python.h +file work/proto/dev-python/usr/include/python2.7/dtoa.h path=usr/include/python2.7/dtoa.h +file work/proto/dev-python/usr/include/python2.7/rangeobject.h path=usr/include/python2.7/rangeobject.h +file work/proto/dev-python/usr/include/python2.7/graminit.h path=usr/include/python2.7/graminit.h +file work/proto/dev-python/usr/include/python2.7/memoryobject.h path=usr/include/python2.7/memoryobject.h +file work/proto/dev-python/usr/include/python2.7/pgen.h path=usr/include/python2.7/pgen.h +file work/proto/dev-python/usr/include/python2.7/setobject.h path=usr/include/python2.7/setobject.h +file work/proto/dev-python/usr/include/python2.7/sysmodule.h path=usr/include/python2.7/sysmodule.h +file work/proto/dev-python/usr/include/python2.7/tupleobject.h path=usr/include/python2.7/tupleobject.h +file work/proto/dev-python/usr/include/python2.7/frameobject.h path=usr/include/python2.7/frameobject.h +file work/proto/dev-python/usr/include/python2.7/bytesobject.h path=usr/include/python2.7/bytesobject.h +file work/proto/dev-python/usr/include/python2.7/compile.h path=usr/include/python2.7/compile.h +file work/proto/dev-python/usr/include/python2.7/intobject.h path=usr/include/python2.7/intobject.h +file work/proto/dev-python/usr/include/python2.7/cellobject.h path=usr/include/python2.7/cellobject.h +file work/proto/dev-python/usr/include/python2.7/pyexpat.h path=usr/include/python2.7/pyexpat.h +file work/proto/dev-python/usr/include/python2.7/object.h path=usr/include/python2.7/object.h +file work/proto/dev-python/usr/include/python2.7/import.h path=usr/include/python2.7/import.h +file work/proto/dev-python/usr/include/python2.7/ucnhash.h path=usr/include/python2.7/ucnhash.h +file work/proto/dev-python/usr/include/python2.7/modsupport.h path=usr/include/python2.7/modsupport.h +file work/proto/dev-python/usr/include/python2.7/ast.h path=usr/include/python2.7/ast.h +file work/proto/dev-python/usr/include/python2.7/fileobject.h path=usr/include/python2.7/fileobject.h +file work/proto/dev-python/usr/include/python2.7/floatobject.h path=usr/include/python2.7/floatobject.h +file work/proto/dev-python/usr/include/python2.7/cStringIO.h path=usr/include/python2.7/cStringIO.h +file work/proto/dev-python/usr/include/python2.7/patchlevel.h path=usr/include/python2.7/patchlevel.h +file work/proto/dev-python/usr/include/python2.7/ceval.h path=usr/include/python2.7/ceval.h +file work/proto/dev-python/usr/include/python2.7/pymactoolbox.h path=usr/include/python2.7/pymactoolbox.h +file work/proto/dev-python/usr/include/python2.7/genobject.h path=usr/include/python2.7/genobject.h +file work/proto/dev-python/usr/include/python2.7/datetime.h path=usr/include/python2.7/datetime.h +file work/proto/dev-python/usr/include/python2.7/weakrefobject.h path=usr/include/python2.7/weakrefobject.h +file work/proto/dev-python/usr/include/python2.7/longintrepr.h path=usr/include/python2.7/longintrepr.h +file work/proto/dev-python/usr/include/python2.7/dictobject.h path=usr/include/python2.7/dictobject.h +file work/proto/dev-python/usr/include/python2.7/complexobject.h path=usr/include/python2.7/complexobject.h +file work/proto/dev-python/usr/include/python2.7/Python-ast.h path=usr/include/python2.7/Python-ast.h +file work/proto/dev-python/usr/include/python2.7/pystate.h path=usr/include/python2.7/pystate.h +file work/proto/dev-python/usr/include/python2.7/pgenheaders.h path=usr/include/python2.7/pgenheaders.h +file work/proto/dev-python/usr/include/python2.7/pyfpe.h path=usr/include/python2.7/pyfpe.h +file work/proto/dev-python/usr/include/python2.7/parsetok.h path=usr/include/python2.7/parsetok.h +file work/proto/dev-python/usr/include/python2.7/timefuncs.h path=usr/include/python2.7/timefuncs.h +file work/proto/dev-python/usr/include/python2.7/unicodeobject.h path=usr/include/python2.7/unicodeobject.h +file work/proto/dev-python/usr/include/python2.7/pyctype.h path=usr/include/python2.7/pyctype.h +file work/proto/dev-python/usr/include/python2.7/pythonrun.h path=usr/include/python2.7/pythonrun.h +file work/proto/dev-python/usr/include/python2.7/boolobject.h path=usr/include/python2.7/boolobject.h +file work/proto/dev-python/usr/include/python2.7/pystrtod.h path=usr/include/python2.7/pystrtod.h +file work/proto/dev-python/usr/include/python2.7/intrcheck.h path=usr/include/python2.7/intrcheck.h +link path=usr/lib/amd64/libpython2.7.so target=libpython2.7.so.1.0 +link path=usr/lib/python2.7/config/libpython2.7.a target=../../amd64/libpython2.7.a diff --git a/python2.7/developer-python.p5m.gen b/python2.7/developer-python.p5m.gen new file mode 100755 index 0000000..142a47e --- /dev/null +++ b/python2.7/developer-python.p5m.gen @@ -0,0 +1,32 @@ +#!/bin/sh + +set -e +set -u + +tmp=/tmp/cibs-dev-python.$$ + +proto=${proto:-work/proto/dev-python} + +cat <<'META' > $tmp +set name=pkg.fmri value=pkg:/developer/python$(pyver)@$(ips-version) +set name=pkg.summary value="Header files and a static library for Python (version $(pyver))" +set name=info.upstream-url value="$(home)" +set name=info.source-url value="$(download)" + +license $(license-file) license="$(license)" + +depend fmri=pkg:/library/openssl type=require +depend fmri=pkg:/library/libexpat type=require + +depend fmri=pkg:/library/libpython$(pyver)@$(ips-version) type=require +depend fmri=pkg:/library/libpython$(pyver)@$(ips-version) type=incorporate + +depend fmri=pkg:/runtime/python$(pyver)@$(ips-version) type=require +depend fmri=pkg:/runtime/python$(pyver)@$(ips-version) type=incorporate + +META + +/usr/share/cibs/scripts/make-payload $proto >> $tmp +cat $tmp +rm $tmp + -- cgit v1.2.3