summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authordrochner <drochner@pkgsrc.org>2001-05-14 13:41:32 +0000
committerdrochner <drochner@pkgsrc.org>2001-05-14 13:41:32 +0000
commit29042bf01306957a3ea904b67eecbee09b052443 (patch)
treef6eff8bfcc16f6cc3a8298d83bd35b3b21d75b0c /pkgtools
parent64aa918370c9ff3309cbeae1c4545b49efa3d607 (diff)
downloadpkgsrc-29042bf01306957a3ea904b67eecbee09b052443.tar.gz
first cut on a Makefile snippet for common python package stuff
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/python-mk/Makefile26
-rw-r--r--pkgtools/python-mk/files/bsd.python.mk39
-rw-r--r--pkgtools/python-mk/pkg/DESCR1
-rw-r--r--pkgtools/python-mk/pkg/PLIST2
4 files changed, 68 insertions, 0 deletions
diff --git a/pkgtools/python-mk/Makefile b/pkgtools/python-mk/Makefile
new file mode 100644
index 00000000000..6e19887a03a
--- /dev/null
+++ b/pkgtools/python-mk/Makefile
@@ -0,0 +1,26 @@
+# $NetBSD: Makefile,v 1.1.1.1 2001/05/14 13:41:32 drochner Exp $
+#
+
+DISTNAME= python-mk-1.0
+CATEGORIES= pkgtools
+MASTER_SITES= # empty
+DISTFILES= # empty
+
+MAINTAINER= packages@netbsd.org
+COMMENT= common functions for python "distutils" packages
+
+# not strictly needed
+DEPENDS+= python>=1.6:../../lang/python
+
+EXTRACT_ONLY= # empty
+NO_CHECKSUM= # defined
+NO_CONFIGURE= # defined
+NO_PATCH= # defined
+NO_BUILD= # defined
+
+PYMKFILE= ${FILESDIR}/bsd.python.mk
+
+do-install:
+ ${INSTALL_SCRIPT} ${PYMKFILE} ${PREFIX}/share/mk
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/pkgtools/python-mk/files/bsd.python.mk b/pkgtools/python-mk/files/bsd.python.mk
new file mode 100644
index 00000000000..15d759cd598
--- /dev/null
+++ b/pkgtools/python-mk/files/bsd.python.mk
@@ -0,0 +1,39 @@
+# $NetBSD: bsd.python.mk,v 1.1.1.1 2001/05/14 13:41:32 drochner Exp $
+#
+
+.if defined(PYBINMODULE)
+.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "mips" || ${MACHINE_ARCH} == "vax"
+IGNORE="${PKGNAME} needs dynamic loading"
+.endif
+.endif
+
+PYINC!= ${PYTHON} -c "import distutils.sysconfig; \
+ print distutils.sysconfig.get_python_inc(0, \"\")"
+PYSITELIB!= ${PYTHON} -c "import distutils.sysconfig; \
+ print distutils.sysconfig.get_python_lib(0, 0, \"\")"
+
+.if defined(PYDISTUTILSPKG)
+PYSETUP?= setup.py
+PYSETUPBUILDARGS?= #empty
+PYSETUPINSTALLARGS?= #empty
+PY_PATCHPLIST?= yes
+
+do-build:
+ (cd ${WRKSRC} && ${PYTHON} ${PYSETUP} ${PYSETUPBUILDARGS} build)
+
+do-install:
+ (cd ${WRKSRC} && ${PYTHON} ${PYSETUP} ${PYSETUPINSTALLARGS} install)
+.endif
+
+PY_PLIST_TEMPLATE?= ${PKGDIR}/PLIST
+PY_PLIST_SRC?= ${WRKDIR}/.PLIST_SRC
+
+py_patchplist:
+ ${SED} "s|PYINC|${PYINC}|g;s|PYSITELIB|${PYSITELIB}|g" \
+ <${PY_PLIST_TEMPLATE} >${PY_PLIST_SRC}
+
+.if defined(PY_PATCHPLIST)
+PLIST_SRC?= ${PY_PLIST_SRC}
+
+pre-install: py_patchplist
+.endif
diff --git a/pkgtools/python-mk/pkg/DESCR b/pkgtools/python-mk/pkg/DESCR
new file mode 100644
index 00000000000..a8335aa6f2c
--- /dev/null
+++ b/pkgtools/python-mk/pkg/DESCR
@@ -0,0 +1 @@
+common functions for python "distutils" packages
diff --git a/pkgtools/python-mk/pkg/PLIST b/pkgtools/python-mk/pkg/PLIST
new file mode 100644
index 00000000000..6ae6d4ab646
--- /dev/null
+++ b/pkgtools/python-mk/pkg/PLIST
@@ -0,0 +1,2 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2001/05/14 13:41:32 drochner Exp $
+share/mk/bsd.python.mk