diff --git a/mail/evolution/Makefile b/mail/evolution/Makefile index 076111c11052..6d320c1ed498 100644 --- a/mail/evolution/Makefile +++ b/mail/evolution/Makefile @@ -7,6 +7,7 @@ PORTNAME= evolution PORTVERSION= 1.4.0 +PORTREVISION= 1 CATEGORIES= mail gnome MASTER_SITES= ${MASTER_SITE_GNOME} \ http://people.FreeBSD.org/~sobomax/:local @@ -42,7 +43,8 @@ CONFIGURE_ARGS= --with-db3-libs=${DB3_WRKSRC} \ --with-db3-includes=${DB3_WRKSRC} \ --enable-nss=no \ --enable-openssl=yes -CONFLICTS= evolution-1.2* + +EVO_VERSION= "1.4" .if defined(WITH_LDAP) CONFIGURE_ARGS+= --with-openldap=${LOCALBASE} @@ -58,7 +60,8 @@ PLIST_SUB= PILOT:="@comment " CONFIGURE_ENV= CPPFLAGS="-I${DB3_WRKSRC} -I${LOCALBASE}/include" \ LIBS="${PTHREAD_LIBS} -L${LOCALBASE}/lib" -PLIST_SUB+= VERSION="1.4" +PLIST_SUB+= VERSION=${EVO_VERSION} +PKGINSTALL= ${WRKDIR}/pkg-install post-patch: @${FIND} ${WRKSRC} -type f -name "*.[ch]" | ${XARGS} ${GREP} -l '' | \ @@ -89,4 +92,12 @@ pre-configure: @${LN} -s . ${DB3_WRKSRC}/db3 # End of the DB3 stuff +post-install: + @${SED} -e 's|%%X11BASE%%|${X11BASE}|; \ + s|%%LOCALBASE%%|${LOCALBASE}|' < ${FILESDIR}/pkg-install.in \ + > ${PKGINSTALL} +.if !defined(PACKAGE_BUILDING) + @${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL +.endif + .include diff --git a/mail/evolution/files/pkg-install.in b/mail/evolution/files/pkg-install.in new file mode 100644 index 000000000000..48eb5e85099b --- /dev/null +++ b/mail/evolution/files/pkg-install.in @@ -0,0 +1,14 @@ +#!/bin/sh + +PATH=/bin:/usr/bin:%%LOCALBASE%%/bin:/usr/local/bin:%%X11BASE%%/bin:/usr/X11R6/bin:${PKG_PREFIX}/bin +export PATH + +if [ -n "${PACKAGE_BUILDING}" ]; then + exit 0 +fi + +if [ "$2" = "POST-INSTALL" ]; then + VERSION=`pkg-config --modversion evolution-shell | sed -E -e 's|\.[0-9]+$||'` + find ${PKG_PREFIX}/share/gnome/evolution/${VERSION}/default_user -type f | xargs chmod 0644 + exit 0 +fi