[BACK]Return to Makefile CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / security / pyca

File: [cvs.NetBSD.org] / pkgsrc / security / pyca / Makefile (download)

Revision 1.26, Fri Dec 4 20:45:39 2020 UTC (3 years, 2 months ago) by nia
Branch: MAIN
CVS Tags: pkgsrc-2022Q2-base, pkgsrc-2022Q2, pkgsrc-2022Q1-base, pkgsrc-2022Q1, pkgsrc-2021Q4-base, pkgsrc-2021Q4, pkgsrc-2021Q3-base, pkgsrc-2021Q3, pkgsrc-2021Q2-base, pkgsrc-2021Q2, pkgsrc-2021Q1-base, pkgsrc-2021Q1, pkgsrc-2020Q4-base, pkgsrc-2020Q4
Changes since 1.25: +2 -2 lines

Revbump packages with a runtime Python dep but no version prefix.

For the Python 3.8 default switch.

# $NetBSD: Makefile,v 1.26 2020/12/04 20:45:39 nia Exp $

# Date-based distfile name for pre-releases leading to 0.6.6.
DISTNAME=	pyca-20031118
PKGNAME=	${DISTNAME:S/pyca-/pyca-0.6.6./}
PKGREVISION=	5
CATEGORIES=	security python
#MASTER_SITES=	http://www.pyca.de/download/

MAINTAINER=	pkgsrc-users@NetBSD.org
HOMEPAGE=	https://www.pyca.de/2017/12/31/pyca-x-509-ca/
COMMENT=	Administration tools for X.509/PKIX CA
LICENSE=	gnu-gpl-v2

NO_BUILD=	yes

.include "../../mk/bsd.prefs.mk"

PKG_SYSCONFVAR=			openssl
PKG_SYSCONFSUBDIR=		openssl

.if ${OPSYS} == "NetBSD"
PKG_SYSCONFDIR.openssl?=	/etc/openssl
.endif

REPLACE_PYTHON=	bin/*.py cgi-bin/*.py sbin/*.py

PYCA_SCRIPT_FIXUP_SED= \
	-e "s|/usr/local/pyca/pylib|${PREFIX}/lib/pyca|g"		\
	-e "s|/etc/openssl/openssl.cnf|${PKG_SYSCONFDIR}/openssl.cnf|g"	\
	-e "s|/home/.*/openssl.cnf|${PKG_SYSCONFDIR}/openssl.cnf|g"	\
	-e "s|/home/.*/pylib|${PREFIX}/lib/pyca|g"

INSTALLATION_DIRS=	bin lib/pyca/openssl libexec/cgi-bin sbin \
			share/doc/pyca/help share/doc/pyca/ssi \
			share/examples/pyca

pyca-script-fixup:
	cd ${WRKSRC}; for file in ${REPLACE_PYTHON}; do \
		${SED} ${PYCA_SCRIPT_FIXUP_SED} \
			<$${file} >$${file}.fixed; \
		${MV} $${file}.fixed $${file}; \
	done

post-configure: pyca-script-fixup

do-install:
	cd ${WRKSRC}; for file in bin/*.py; do				\
		${INSTALL_SCRIPT} $${file} ${DESTDIR}${PREFIX}/bin;	\
	done
	cd ${WRKSRC}; for file in cgi-bin/*.py; do			\
		${INSTALL_SCRIPT} $${file} ${DESTDIR}${PREFIX}/libexec/cgi-bin;	\
	done
	cd ${WRKSRC}; for file in sbin/*.py; do				\
		${INSTALL_SCRIPT} $${file} ${DESTDIR}${PREFIX}/sbin;	\
	done
	cd ${WRKSRC}; for file in pylib/*.py; do			\
		${INSTALL_DATA} $${file} ${DESTDIR}${PREFIX}/lib/pyca;	\
	done
	cd ${WRKSRC}; for file in pylib/openssl/*.py; do		\
		${INSTALL_DATA} $${file} ${DESTDIR}${PREFIX}/lib/pyca/openssl;	\
	done
	cd ${WRKSRC}; for file in conf/*.cnf; do			\
		${INSTALL_DATA} $${file} ${DESTDIR}${PREFIX}/share/examples/pyca;	\
	done
	cd ${WRKSRC}; for file in htdocs/*.html; do			\
		${INSTALL_DATA} $${file} ${DESTDIR}${PREFIX}/share/doc/pyca;	\
	done
	cd ${WRKSRC}; for file in htdocs/help/*; do			\
		${INSTALL_DATA} $${file} ${DESTDIR}${PREFIX}/share/doc/pyca/help; \
	done
	cd ${WRKSRC}; for file in htdocs/ssi/*.html; do			\
		${INSTALL_DATA} $${file} ${DESTDIR}${PREFIX}/share/doc/pyca/ssi; \
	done

.include "../../lang/python/application.mk"
.include "../../mk/bsd.pkg.mk"