0ba956f121
Use old (0.9.4) version of apr instead of recommended 0.9.5. Return BIG MESSAGE about repository dump/restore cycle. Based on PR form Roman Neuhauser <neuhauser@bellavista.cz> PR: ports/61013 Submitted by: Roman Neuhauser <neuhauser@bellavista.cz>
181 lines
5.9 KiB
Makefile
181 lines
5.9 KiB
Makefile
# New ports collection makefile for: subversion
|
|
# Date created: 10 September 2001
|
|
# Whom: rooneg@electricjellyfish.net
|
|
#
|
|
# $FreeBSD$
|
|
|
|
PORTNAME= subversion
|
|
PORTVERSION= 0.35.1
|
|
CATEGORIES= devel
|
|
MASTER_SITES= http://subversion.tigris.org/tarballs/
|
|
|
|
MAINTAINER= lev@freebsd.org
|
|
COMMENT= Version control system
|
|
|
|
LIB_DEPENDS= db4:${PORTSDIR}/databases/db4 \
|
|
neon.24:${PORTSDIR}/www/neon \
|
|
expat.4:${PORTSDIR}/textproc/expat2
|
|
|
|
INSTALLS_SHLIB= yes
|
|
|
|
GNU_CONFIGURE= yes
|
|
USE_REINPLACE= yes
|
|
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
|
|
CONFIGURE_ARGS= --with-ssl \
|
|
--with-neon=${LOCALBASE} \
|
|
--with-berkeley-db=${LOCALBASE}/include/db4:${LOCALBASE}/lib \
|
|
--with-swig=no
|
|
|
|
MAN1= svn.1 svnadmin.1 svnlook.1 svndumpfilter.1 svnversion.1
|
|
MAN5= svnserve.conf.5
|
|
MAN8= svnserve.8
|
|
MANCOMPRESSED= no
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
SVNREPOS?= /home/svn/repos
|
|
|
|
.if defined(WITH_MOD_DAV_SVN)
|
|
WITH_APACHE2_APR= yes
|
|
CONFIGURE_ARGS+= \
|
|
--with-apxs=${APXS}
|
|
PLIST_SUB+= MOD_DAV_SVN=""
|
|
SVNGROUP?= www
|
|
.else
|
|
PLIST_SUB+= MOD_DAV_SVN="@comment "
|
|
PKGDEINSTALL= NONEXISTENT
|
|
SVNGROUP?= svn
|
|
.endif
|
|
|
|
.if defined(WITH_APACHE2_APR)
|
|
APACHE2_PORT?= www/apache2
|
|
BUILD_DEPENDS+= ${APXS}:${PORTSDIR}/${APACHE2_PORT}
|
|
RUN_DEPENDS+= ${APXS}:${PORTSDIR}/${APACHE2_PORT}
|
|
CONFIGURE_ARGS+=--with-apr=${LOCALBASE}/lib/apache2/apr-config \
|
|
--with-apr-util=${LOCALBASE}/lib/apache2/apu-config
|
|
.else
|
|
LIB_DEPENDS+= apr-0.9:${PORTSDIR}/devel/apr
|
|
CONFIGURE_ARGS+=--with-apr=${LOCALBASE} \
|
|
--with-apr-util=${LOCALBASE}
|
|
.endif
|
|
|
|
.if defined(WITH_SVNSERVE_WRAPPER)
|
|
PLIST_SUB+= SVNSERVE_WRAPPER=""
|
|
EXTRA_PATCHES= ${PATCHDIR}/build-outputs.mk.patch
|
|
.else
|
|
PLIST_SUB+= SVNSERVE_WRAPPER="@comment "
|
|
.endif
|
|
|
|
pre-extract:
|
|
.if !defined (BATCH)
|
|
@dialog --title "-- URGENT UPGRADE INFORMATION --" --clear --yesno \
|
|
"If you upgrade Subversion from pre-0.34.0 version, please,\ndump you repository with old (pre-0.34.0) svnadmin command.\nAfter this, install new version, remove old repository, create new\none with svnadmin & load dump created from old repository\n\nVersions after 0.34.0 have different repository format and\nyour old repository could not be used with versions 0.34.0 and up.\n\nRead\nhttp://svn.collab.net/repos/svn/trunk/notes/repos_upgrade_HOWTO\nfor details.\n\nDid you dump you repository and ready to install new version?" \
|
|
18 70
|
|
.endif
|
|
.if defined(WITH_MOD_DAV_SVN)
|
|
@${ECHO_MSG} "mod_dav_svn module for Apache 2.X enabled."
|
|
.else
|
|
@${ECHO_MSG} "You can enable the mod_dav_svn module for Apache 2.X"
|
|
@${ECHO_MSG} "by defining WITH_MOD_DAV_SVN. This option implies"
|
|
@${ECHO_MSG} "the WITH_APACHE2_APR option."
|
|
.endif
|
|
@${ECHO_MSG}
|
|
.if defined(WITH_APACHE2_APR)
|
|
@${ECHO_MSG} "Using APR from www/apache2. If you have the devel/apr"
|
|
@${ECHO_MSG} "port/package installed, you may need to remove it."
|
|
.else
|
|
@${ECHO_MSG} "You can link subversion against the APR built with"
|
|
@${ECHO_MSG} "the www/apache2 port, rather than the devel/apr port,"
|
|
@${ECHO_MSG} "by defining WITH_APACHE2_APR."
|
|
.endif
|
|
@${ECHO_MSG}
|
|
.if defined(WITH_SVNSERVE_WRAPPER)
|
|
@${ECHO_MSG} "svnserve wrapper enabled."
|
|
.else
|
|
@${ECHO_MSG} "You can install the svnserve wrapper (sets umask 002)"
|
|
@${ECHO_MSG} "by defining WITH_SVNSERVE_WRAPPER."
|
|
.endif
|
|
@${ECHO_MSG}
|
|
.if defined(WITH_REPOSITORY_CREATION)
|
|
@${ECHO_MSG} "I will create (or use, if it exists) \"${SVNGROUP}\" group."
|
|
@${ECHO_MSG} "Make sure that all committers are its members."
|
|
.else
|
|
@${ECHO_MSG} "You can have the repository created for you by defining"
|
|
@${ECHO_MSG} "WITH_REPOSITORY_CREATION."
|
|
@${ECHO_MSG} ""
|
|
@${ECHO_MSG} "Make sure that:"
|
|
@${ECHO_MSG} "* all your svn users are members of a common group"
|
|
@${ECHO_MSG} "* this group is the group id of the db/ and locks/"
|
|
@${ECHO_MSG} " subdirectories of your repository"
|
|
@${ECHO_MSG} "* the above subdirectories are writable by this group"
|
|
@${ECHO_MSG} ""
|
|
@${ECHO_MSG} "Repository will be created at '${SVNREPOS}' with group '${SVNGROUP}'"
|
|
@${ECHO_MSG} "You could change these settings by defining SVNREPOS and SVNGROUP"
|
|
@${ECHO_MSG} ""
|
|
.endif
|
|
@${ECHO_MSG}
|
|
|
|
post-extract:
|
|
@${REINPLACE_CMD} 's/ldb/ldb4/g' ${WRKSRC}/configure
|
|
|
|
@${RM} -r ${WRKSRC}/neon
|
|
@${RM} -r ${WRKSRC}/apr
|
|
@${RM} -r ${WRKSRC}/apr-util
|
|
|
|
post-patch:
|
|
.if ${PREFIX} != "/usr"
|
|
@${REINPLACE_CMD} "s#/etc/subversion#${PREFIX}/etc/subversion#g" ${WRKSRC}/subversion/libsvn_subr/config_file.c
|
|
@${REINPLACE_CMD} "s#/etc/subversion#${PREFIX}/etc/subversion#g" ${WRKSRC}/subversion/libsvn_subr/config_impl.h
|
|
.endif
|
|
|
|
.if defined(WITH_MOD_DAV_SVN)
|
|
pre-install:
|
|
${APXS} -e -S LIBEXECDIR=${PREFIX}/libexec/apache2 -a -n dav libexec/apache2/mod_dav.so
|
|
.endif
|
|
|
|
post-install:
|
|
.if !defined(NOPORTDOCS)
|
|
${MKDIR} ${DOCSDIR}
|
|
for f in BUGS CHANGES COMMITTERS COPYING HACKING INSTALL README; do \
|
|
${INSTALL_DATA} ${WRKSRC}/$$f ${DOCSDIR}; \
|
|
done
|
|
.endif
|
|
.if defined(WITH_SVNSERVE_WRAPPER)
|
|
@${INSTALL_SCRIPT} ${FILESDIR}/svnserve.wrapper ${PREFIX}/bin/svnserve
|
|
.endif
|
|
.if defined(WITH_REPOSITORY_CREATION) && !exists(${SVNREPOS})
|
|
. if defined(WITH_SVNSERVE_WRAPPER)
|
|
@if /usr/sbin/pw groupshow "${SVNGROUP}" >/dev/null 2>&1; then \
|
|
echo "You already have a group \"${SVNGROUP}\", so I will use it."; \
|
|
else \
|
|
if /usr/sbin/pw groupadd ${SVNGROUP} -h -; \
|
|
then \
|
|
echo "Added group \"${SVNGROUP}\"."; \
|
|
else \
|
|
echo "Adding group \"${SVNGROUP}\" failed..."; \
|
|
echo "Please create it, and try again."; \
|
|
${FALSE}; \
|
|
fi; \
|
|
fi
|
|
. endif
|
|
@${MKDIR} ${SVNREPOS}
|
|
@${PREFIX}/bin/svnadmin create ${SVNREPOS}
|
|
@${CHGRP} ${SVNGROUP} ${SVNREPOS}/db ${SVNREPOS}/locks/db.lock ${SVNREPOS}/dav
|
|
@${CHMOD} g+w ${SVNREPOS}/db ${SVNREPOS}/locks/db.lock ${SVNREPOS}/dav
|
|
@for i in ${SVNREPOS}/db/* ; do \
|
|
i=$${i##*/}; \
|
|
case $$i in \
|
|
DB_CONFIG) ;; \
|
|
*) ${CHGRP} ${SVNGROUP} ${SVNREPOS}/db/$$i; \
|
|
${CHMOD} g+w ${SVNREPOS}/db/$$i; \
|
|
;; \
|
|
esac; \
|
|
done
|
|
.endif
|
|
|
|
post-deinstall:
|
|
.if defined(WITH_MOD_DAV_SVN)
|
|
@PKG_PREFIX=${PREFIX} ${SH} ${PKGDEINSTALL} ${PKGNAME} POST-DEINSTALL
|
|
.endif
|
|
|
|
.include <bsd.port.post.mk>
|