summaryrefslogtreecommitdiff
path: root/security/pyca/Makefile
blob: 0b0aa90bbc3fd7ae379225a6083d45e94dd0674e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# $NetBSD: Makefile,v 1.15 2008/06/12 02:14:45 joerg Exp $

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

MAINTAINER=	pkgsrc-users@NetBSD.org
HOMEPAGE=	http://www.pyca.de/
COMMENT=	Administration tools for X.509/PKIX CA

NO_BUILD=	yes

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

PKG_SYSCONFVAR=			openssl
PKG_SYSCONFSUBDIR=		openssl

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

PYTHON_PATCH_SCRIPTS=	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/html/pyca/help share/doc/html/pyca/ssi \
			share/examples/pyca

pyca-script-fixup:
	cd ${WRKSRC}; for file in ${PYTHON_PATCH_SCRIPTS}; 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/html/pyca;	\
	done
	cd ${WRKSRC}; for file in htdocs/help/*; do			\
		${INSTALL_DATA} $${file} ${DESTDIR}${PREFIX}/share/doc/html/pyca/help; \
	done
	cd ${WRKSRC}; for file in htdocs/ssi/*.html; do			\
		${INSTALL_DATA} $${file} ${DESTDIR}${PREFIX}/share/doc/html/pyca/ssi; \
	done

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