Skip to content

Commit

Permalink
Stop py-X from installing a configuration file under /etc
Browse files Browse the repository at this point in the history
Spotted by joerg@'s bulk builds
PKGREVISION++
  • Loading branch information
adrianp committed May 19, 2007
1 parent 7166e5e commit 6ef8706
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 3 deletions.
19 changes: 18 additions & 1 deletion textproc/py-X/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# $NetBSD: Makefile,v 1.1.1.1 2007/01/03 14:51:07 adrianp Exp $
# $NetBSD: Makefile,v 1.2 2007/05/19 01:14:07 adrianp Exp $
#

DISTNAME= PyX-0.9
PKGNAME= ${PYPKGPREFIX}-X-0.9
PKGREVISION= 1
CATEGORIES= textproc
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=pyx/}

Expand All @@ -15,6 +16,22 @@ MAINTAINER= [email protected]
HOMEPAGE= http://pyx.sourceforge.net/
COMMENT= Package for the creation of PostScript and PDF files

CONF_FILES= ${PREFIX}/share/examples/PyX/pyxrc \
${PKG_SYSCONFDIR}/pyxrc

SUBST_CLASSES+= conf
SUBST_STAGE.conf= post-patch
SUBST_MESSAGE.conf= Fixing configuration files.
SUBST_FILES.conf= setup.py
SUBST_SED.conf+= -e "s|@PKG_SYSCONFDIR@|${PKG_SYSCONFDIR}|g"

pre-install:
${CP} ${WRKSRC}/pyxrc ${WRKSRC}/pyxrc.default
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/PyX

post-install:
${CP} ${WRKSRC}/pyxrc.default ${PREFIX}/share/examples/PyX/pyxrc

.include "../../lang/python/application.mk"
.include "../../lang/python/extension.mk"
.include "../../mk/bsd.pkg.mk"
5 changes: 4 additions & 1 deletion textproc/py-X/PLIST
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@comment $NetBSD: PLIST,v 1.2 2007/01/03 15:16:45 adrianp Exp $
@comment $NetBSD: PLIST,v 1.3 2007/05/19 01:14:07 adrianp Exp $
etc/pyxrc.default
${PYSITELIB}/pyx/__init__.py
${PYSITELIB}/pyx/__init__.pyc
${PYSITELIB}/pyx/__init__.pyo
Expand Down Expand Up @@ -140,6 +141,7 @@ ${PYSITELIB}/pyx/unit.pyo
${PYSITELIB}/pyx/version.py
${PYSITELIB}/pyx/version.pyc
${PYSITELIB}/pyx/version.pyo
share/examples/PyX/pyxrc
share/pyx/10pt.lfs
share/pyx/10ptex.lfs
share/pyx/11pt.lfs
Expand All @@ -151,6 +153,7 @@ share/pyx/foils20pt.lfs
share/pyx/foils25pt.lfs
share/pyx/foils30pt.lfs
share/pyx/pyx.def
@dirrm share/examples/PyX
@dirrm share/pyx
@dirrm ${PYSITELIB}/pyx/pykpathsea
@dirrm ${PYSITELIB}/pyx/graph/axis
Expand Down
3 changes: 2 additions & 1 deletion textproc/py-X/distinfo
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
$NetBSD: distinfo,v 1.1.1.1 2007/01/03 14:51:07 adrianp Exp $
$NetBSD: distinfo,v 1.2 2007/05/19 01:14:07 adrianp Exp $

SHA1 (PyX-0.9.tar.gz) = 79daf941f0ad36126471567879aaf6f94d21ccc4
RMD160 (PyX-0.9.tar.gz) = 095148e1cf5af028724ba3abf52794741e72d084
Size (PyX-0.9.tar.gz) = 351451 bytes
SHA1 (patch-aa) = 789d1a8209334f4258c4e404cdf0b0daf1d4f18f
13 changes: 13 additions & 0 deletions textproc/py-X/patches/patch-aa
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
$NetBSD: patch-aa,v 1.1 2007/05/19 01:14:07 adrianp Exp $

--- setup.py.orig 2006-03-09 16:49:55.000000000 +0000
+++ setup.py
@@ -75,7 +75,7 @@ adddatafiles("sharedir", "share/pyx", ["

# Note that on windows we can't install to absolute paths. Hence
# we put the global pyxrc into the share directory as well.
-adddatafiles("pyxrcdir", os.name != "nt" and "/etc" or "share/pyx", ["pyxrc"])
+adddatafiles("pyxrcdir", os.name != "nt" and "@PKG_SYSCONFDIR@" or "share/pyx", ["pyxrc.default"])

################################################################################
# extend install commands to overwrite siteconfig.py during build and install

0 comments on commit 6ef8706

Please sign in to comment.