- Fix build on 10+ (new OpenSSL API)

- Add staging support, allow it as regular user
- Register conflict with security/nss (file ${LOCALBASE}/bin/derdump)
- Convert to USES=libtool
- Use @sample for config files

MFH:		2014Q3
This commit is contained in:
Pawel Pekala 2014-07-10 21:30:26 +00:00
parent 87c6b0a27b
commit 626162dbc0
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=361493
6 changed files with 77 additions and 53 deletions

View file

@ -3,24 +3,21 @@
PORTNAME= openscep
PORTVERSION= 0.4.2
PORTREVISION= 7
PORTREVISION= 8
CATEGORIES= security
MASTER_SITES= http://openscep.othello.ch/download/
MAINTAINER= ports@FreeBSD.org
COMMENT= Open source scep server
CONFLICTS_INSTALL= nss-3.*
USE_AUTOTOOLS= libtool
USES= gmake libtool
USE_OPENSSL= yes
USE_OPENLDAP= yes
USE_APACHE= 22+
GNU_CONFIGURE= yes
USE_LDCONFIG= yes
USES= gmake
NO_STAGE= yes
.include <bsd.port.pre.mk>
PLIST_DIRSTRY= www/cgi-bin
@ -34,41 +31,33 @@ CONFIGURE_ARGS= --with-html-install-dir="${PREFIX}/www/openscep" \
CONF_DIR= ${PREFIX}/etc/${PORTNAME}
LOCAL_CONF_FILES= openscep.cnf openscep.ldif openscep.schema slapd.conf
SUB_FILES= pkg-deinstall pkg-install pkg-message
SUB_FILES= pkg-message
SUB_LIST= CONF_DIR="${CONF_DIR}" CONF_FILES="${LOCAL_CONF_FILES}"
MAN1= derdump.1 \
scep.1 \
scepclient.1 \
scepconf.1 \
sceplist.1 \
scepxid.1
MAN5= openscep.cnf.5
MAN8= cafingerprint.8 \
createcrl.8 \
crl2ldap.8 \
dn2xid.8 \
scepd.8 \
scepgrant.8 \
scepreject.8 \
updatecrl.8
post-patch:
@${REINPLACE_CMD} -e '/^subdirs=/ s|libltdl||' ${WRKSRC}/configure
@${REINPLACE_CMD} -e '/^SUBDIRS =/ s|libltdl||' ${WRKSRC}/Makefile.in
@${REINPLACE_CMD} -e 's|^\(install-data-am:\) install-data-local$$|\1|' \
${WRKSRC}/ldap/Makefile.in ${WRKSRC}/openssl/Makefile.in
@${REINPLACE_CMD} 's,sbindir),DESTDIR)$$(&,' \
${WRKSRC}/openssl/Makefile.in
@${REINPLACE_CMD} -E -e 's,(bin|sbin)dir},DESTDIR}$${&,' \
-e 's,-o \$$\(USER\) -g \$$\(GROUP\),,' \
${WRKSRC}/scep/Makefile.in \
${WRKSRC}/scepd/Makefile.in
@${REINPLACE_CMD} -E 's,(CGIINSTALLDIR|PKICLIENTEXE)),DESTDIR)$$(&,' \
${WRKSRC}/cgi-bin/Makefile.in
@${REINPLACE_CMD} 's|HTMLINSTALLDIR)|DESTDIR)$$(&|' \
${WRKSRC}/Makefile.in \
${WRKSRC}/doc/Makefile.in \
${WRKSRC}/html/Makefile.in
post-install:
${MKDIR} ${CONF_DIR}
${INSTALL_DATA} ${WRKSRC}/openssl/openscep.cnf ${CONF_DIR}/openscep.cnf.default
@${MKDIR} ${STAGEDIR}${CONF_DIR}
${INSTALL_DATA} ${WRKSRC}/openssl/openscep.cnf \
${STAGEDIR}${CONF_DIR}/openscep.cnf.sample
.for f in openscep.ldif openscep.schema slapd.conf
${INSTALL_DATA} ${WRKSRC}/ldap/${f} ${CONF_DIR}/${f}.default
${INSTALL_DATA} ${WRKSRC}/ldap/${f} ${STAGEDIR}${CONF_DIR}/${f}.sample
.endfor
${CHOWN} www:www ${PREFIX}/www/cgi-bin/openscep/*
${CHOWN} www:www ${PREFIX}/www/cgi-bin/pkiclient.exe
${CHOWN} www:www ${PREFIX}/etc/openscep/*
@PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>
.include <bsd.port.mk>

View file

@ -0,0 +1,14 @@
--- include/scep.h.orig 2002-02-20 00:40:05.000000000 +0100
+++ include/scep.h 2014-07-10 22:24:29.366255595 +0200
@@ -80,7 +80,11 @@
int recipientNonceLength;
/* OpenSSL configuration file contents */
+#ifdef LHASH_OF
+ LHASH_OF(CONF_VALUE) *conf;
+#else
LHASH *conf;
+#endif
/* signer/client information different from requestor for v2 */
X509 *selfsignedcert;

View file

@ -0,0 +1,14 @@
--- scepd/scepconf.c.orig 2001-03-03 23:23:22.000000000 +0100
+++ scepd/scepconf.c 2014-07-10 22:26:24.326212726 +0200
@@ -20,7 +20,11 @@
int debug = 0;
int main(int argc, char *argv[]) {
+#ifdef LHASH_OF
+ LHASH_OF(CONF_VALUE) *conf;
+#else
LHASH *conf;
+#endif
long eline;
char *section = NULL, *variable = NULL, *value;
int c, n;

View file

@ -1,9 +0,0 @@
#!/bin/sh
[ "$2" != "DEINSTALL" ] && exit 0
for f in %%CONF_FILES%%; do
if cmp -s "%%CONF_DIR%%/$f" "%%CONF_DIR%%/$f.default"; then
rm -f "%%CONF_DIR%%/$f"
fi
done

View file

@ -1,7 +0,0 @@
#!/bin/sh
[ "$2" != "POST-INSTALL" ] && exit 0
for f in %%CONF_FILES%%; do
[ -f "%%CONF_DIR%%/$f" ] || cp -p "%%CONF_DIR%%/$f.default" "%%CONF_DIR%%/$f"
done

View file

@ -5,14 +5,33 @@ bin/scepconf
bin/scepkey
bin/sceplist
bin/scepxid
etc/openscep/openscep.cnf.default
etc/openscep/openscep.ldif.default
etc/openscep/openscep.schema.default
etc/openscep/slapd.conf.default
@owner www
@group www
@sample etc/openscep/openscep.cnf.sample
@sample etc/openscep/openscep.ldif.sample
@sample etc/openscep/openscep.schema.sample
@sample etc/openscep/slapd.conf.sample
@owner
@group
lib/libscep.a
lib/libscep.la
lib/libscep.so
lib/libscep.so.4
lib/libscep.so.4.0.22
man/man1/derdump.1.gz
man/man1/scep.1.gz
man/man1/scepclient.1.gz
man/man1/scepconf.1.gz
man/man1/sceplist.1.gz
man/man1/scepxid.1.gz
man/man5/openscep.cnf.5.gz
man/man8/cafingerprint.8.gz
man/man8/createcrl.8.gz
man/man8/crl2ldap.8.gz
man/man8/dn2xid.8.gz
man/man8/scepd.8.gz
man/man8/scepgrant.8.gz
man/man8/scepreject.8.gz
man/man8/updatecrl.8.gz
sbin/cafingerprint
sbin/createcrl
sbin/crl2ldap
@ -22,6 +41,8 @@ sbin/scepd
sbin/scepgrant
sbin/scepreject
sbin/updatecrl
@owner www
@group www
www/cgi-bin/openscep/add.pl
www/cgi-bin/openscep/crl.pl
www/cgi-bin/openscep/granted.pl
@ -30,6 +51,8 @@ www/cgi-bin/openscep/pending.pl
www/cgi-bin/openscep/rejected.pl
www/cgi-bin/openscep/revoked.pl
www/cgi-bin/pkiclient.exe
@owner
@group
www/openscep/COPYING
www/openscep/ChangeLog
www/openscep/INSTALL