tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Building a package needing the workdir of another package



So I did the following. Comments?

options.mk:
[...]
###
### ManageSieve patch
###
.if !empty(PKG_OPTIONS:Mmanagesieve)
SIEVE_VERSION=          0.1.3
MANAGESIEVE_VERSION=    0.11.3
# The managesieve patch to dovecot
PATCHFILES=             
dovecot-${DOVECOT_VERSION}${DOVECOT_SUBVERSION}-managesieve-${MANAGESIEVE_VERSION}.diff.gz
PATCH_SITES=            http://www.rename-it.nl/dovecot/${DOVECOT_VERSION}/
PATCH_DIST_STRIP=       -p1
# Now managesieve itself. Needs sieve to build.
# Default so one can use += below
DISTFILES=              ${DISTNAME}${EXTRACT_SUFX}
CONFIGURE_DIRS=         .
BUILD_DIRS=             .
INSTALL_DIRS=           .
PLIST_SRC=              ${PKGDIR}/PLIST
# sieve (must be built after dovecot, before managesieve)
DISTFILES+=             dovecot-${DOVECOT_VERSION}-sieve-${SIEVE_VERSION}.tar.gz
SITES.dovecot-${DOVECOT_VERSION}-sieve-${SIEVE_VERSION}.tar.gz=\
                        http://www.rename-it.nl/dovecot/${DOVECOT_VERSION}/
WRKSRC.sieve=           
${WRKDIR}/dovecot-${DOVECOT_VERSION}-sieve-${SIEVE_VERSION}
CONFIGURE_ARGS.sieve=   --with-dovecot=${WRKSRC}
# managesieve (build after both dovecot and sieve)
DISTFILES+=             
dovecot-${DOVECOT_VERSION}-managesieve-${MANAGESIEVE_VERSION}.tar.gz
SITES.dovecot-${DOVECOT_VERSION}-managesieve-${MANAGESIEVE_VERSION}.tar.gz=\
                        http://www.rename-it.nl/dovecot/${DOVECOT_VERSION}/
WRKSRC.managesieve=     
${WRKDIR}/dovecot-${DOVECOT_VERSION}-managesieve-${MANAGESIEVE_VERSION}
CONFIGURE_ARGS.managesieve=\
                        --with-dovecot=${WRKSRC} --with-sieve=${WRKSRC.sieve}
INSTALL_DIRS+=          ${WRKSRC.managesieve}
# Augment PLIST
PLIST_SRC+=             ${PKGDIR}/PLIST.managesieve
.endif


Makefile:
# Needed by sieve/managesieve (see options.mk):
DOVECOT_VERSION=        1.2
DOVECOT_SUBVERSION=     .beta1
DOVECOT_SUBDIR=         beta/
[...]
post-build:
[...]
.if !empty(PKG_OPTIONS:Mmanagesieve)
# We need dovecot built in order to be able to configure sieve.
# Wee need sieve built in order to configure and build managesieve. Sigh.
        cd ${WRKSRC.sieve} \
        && env ${CONFIGURE_ENV} ${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS} 
${CONFIGURE_ARGS.sieve}
        cd ${WRKSRC.sieve} \
        && env ${MAKE_ENV} ${MAKE_PROGRAM} ${BUILD_MAKE_FLAGS} -f ${MAKE_FILE} 
${BUILD_TARGET}
        cd ${WRKSRC.managesieve} \
        && env ${CONFIGURE_ENV} ${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS} 
${CONFIGURE_ARGS.managesieve}
        cd ${WRKSRC.managesieve} \
        && env ${MAKE_ENV} ${MAKE_PROGRAM} ${BUILD_MAKE_FLAGS} -f ${MAKE_FILE} 
${BUILD_TARGET}
.endif
[...]



Home | Main Index | Thread Index | Old Index