From 50a2ec1ef38d40212674378ae19e2b53ea8adabd Mon Sep 17 00:00:00 2001 From: imil Date: Thu, 5 Mar 2009 13:08:02 +0000 Subject: Added DESTDIR examples and section 10.1.3. Python modules and programs --- doc/guide/files/configuring.xml | 41 +++++++++++++++++++++++++++++- doc/guide/files/creating.xml | 55 ++++++++++++++++++++++++++++++++++++++++- 2 files changed, 94 insertions(+), 2 deletions(-) (limited to 'doc/guide') diff --git a/doc/guide/files/configuring.xml b/doc/guide/files/configuring.xml index 69cf0c4d325..7052242175c 100644 --- a/doc/guide/files/configuring.xml +++ b/doc/guide/files/configuring.xml @@ -1,4 +1,4 @@ - + Configuring pkgsrc @@ -163,6 +163,45 @@ works. package-install will ask again. With basic DESTDIR support, make clean needs to be run as root. + + Considering the foo/bar package, + DESTDIR full support can be tested using the following commands + + +&uprompt; id +uid=1000(myusername) gid=100(users) groups=100(users),0(wheel) +&uprompt; mkdir $HOME/packages +&uprompt; cd $PKGSRCDIR/foo/bar + + + Verify DESTDIR full support, no root privileges + should be needed + + +&uprompt; make USE_DESTDIR=full install + + + Create a package without root privileges + + +&uprompt; make USE_DESTDIR=full PACKAGES=$HOME/packages package + + + For the following command, you must be able to gain root + privileges using &man.su.1; + + +&uprompt; make USE_DESTDIR=full PACKAGES=$HOME/packages package-install + + + Then, as a simple user + + +&uprompt; make clean + + + + diff --git a/doc/guide/files/creating.xml b/doc/guide/files/creating.xml index f1fd9fac2a9..8e2ea030bb9 100644 --- a/doc/guide/files/creating.xml +++ b/doc/guide/files/creating.xml @@ -1,4 +1,4 @@ - + Creating a new pkgsrc package from scratch @@ -127,6 +127,59 @@ settings that are typical of KDE packages. + +Python modules and programs + +Python modules and programs packages are easily created using a +set of predefined variables. + +Most Python packages use either distutils or +easy-setup (eggs). +If the software uses distutils, set the +PYDISTUTILSPKG variable to yes so +pkgsrc will make use of this framework. +distutils uses a script called setup.py, +if the distutils driver is not called +setup.py, set the PYSETUP variable +to the name of the script. + + +If the default Python versions are not supported by the software, set the +PYTHON_VERSIONS_ACCEPTED variable to the Python versions +the software is known to work with, from the most recent to the older +one, e.g. + +PYTHON_VERSIONS_ACCEPTED= 25 24 23 + + + +If the packaged software is a Python module, include +../../lang/python/extension.mk. +In this case, the package directory should be called +py-software and PKGNAME should be set to +${PYPKGPREFIX}-${DISTNAME}, e.g. + +DISTNAME= foopymodule-1.2.10 +PKGNAME= ${PYPKGPREFIX}-${DISTNAME} + + +If it is an application, also include +../../lang/python/application.mk +before extension.mk. + +If the packaged software, either it is an application or a module, is +egg-aware, you only need to include +../../lang/python/egg.mk. + +In order to correctly set the path to the Python interpreter, use the +REPLACE_PYTHON variable and set it to the list of files +that must be corrected. For example : + +REPLACE_PYTHON= ${WRKSRC}/*.py + + + + -- cgit v1.2.3