[BACK]Return to Makefile CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / pkgtools / pkg_install

Annotation of pkgsrc/pkgtools/pkg_install/Makefile, Revision 1.156

1.156   ! joerg       1: # $NetBSD: Makefile,v 1.155 2008/06/19 18:36:51 joerg Exp $
1.4       hubertf     2:
1.58      schmonz     3: # Notes to package maintainers:
1.57      hubertf     4: #
1.58      schmonz     5: # Updating this package does not automatically necessitate bumping
                      6: # PKGTOOLS_REQD in bsd.pkg.mk. Do so if and only if there is a critical
                      7: # change in the pkg_* tools that pkgsrc relies on for proper operation.
1.57      hubertf     8:
1.58      schmonz     9: DISTNAME=              pkg_install-${VERSION}
1.1       agc        10: CATEGORIES=            pkgtools
1.58      schmonz    11: MASTER_SITES=          # empty
                     12: DISTFILES=             # empty
1.1       agc        13:
1.134     joerg      14: MAINTAINER=            joerg@NetBSD.org
1.82      reed       15: HOMEPAGE=              http://www.pkgsrc.org/
1.90      grant      16: COMMENT=               Package management and administration tools for pkgsrc
1.145     martti     17: #LICENSE=              modified-bsd
1.60      schmonz    18:
1.133     joerg      19: PKG_DESTDIR_SUPPORT=   user-destdir
1.155     joerg      20: BOOTSTRAP_PKG= yes
1.133     joerg      21:
1.132     adrianp    22: CONFLICTS+=            audit-packages-[0-9]*
                     23:
1.115     rillig     24: GNU_CONFIGURE=         yes
1.141     jlam       25: CONFIGURE_ARGS+=       --sysconfdir=${PKG_SYSCONFDIR:Q}
1.122     rillig     26: CONFIGURE_ARGS+=       --with-pkgdbdir=${PKG_DBDIR:Q}
1.141     jlam       27: CONFIGURE_ARGS+=       --with-ftp=${FETCH_CMD:Q}
                     28: CONFIGURE_ARGS+=       --with-pax=${PAX:Q}
                     29: CONFIGURE_ARGS+=       --with-tar=${TAR:Q}
1.153     joerg      30: USE_TOOLS+=            pax:run tar:run gzcat:run ftp:run
1.58      schmonz    31:
1.113     jlam       32: # The following tools are needed by pkg_view and linkfarm.
1.114     jlam       33: USE_TOOLS+=            chmod cmp cp env find grep ln mkdir rm rmdir    \
1.113     jlam       34:                        sed sort touch
                     35:
1.142     jlam       36: USE_FEATURES=          nbcompat
                     37:
1.148     joerg      38: NBCOMPAT_CONFIGURE_ARGS+=      --enable-bsd-getopt
                     39:
1.121     erh        40: SKIP_AUDIT_PACKAGES=   yes
1.122     rillig     41: NO_PKGTOOLS_REQD_CHECK=        yes
1.115     rillig     42: NO_CHECKSUM=           yes
                     43: NO_MTREE=              yes
1.122     rillig     44: PKG_PRESERVE=          yes
1.144     joerg      45: CHECK_PERMS=           no
1.1       agc        46:
1.97      jlam       47: # These are needed to solve a chicken-and-egg problem where pkgsrc uses
1.96      jlam       48: # newer features of pkg_install, but older NetBSD installations won't
                     49: # support them.  In this case, we explicitly use the native GCC
                     50: # compiler to avoid problems with depending on pkgsrc GCC for building
1.128     jlam       51: # pkg_install.
1.117     jlam       52: #
1.147     joerg      53: # We also use the newly built pkg_{add,create,delete} since upgrading
                     54: # from an older pkg_install might required features of the new program.
1.156   ! joerg      55: # Note that the definitions are only overriden for the phases that are
        !            56: # supposed to use them.  pkg_admin pmatch might be used when looking for
        !            57: # dependencies. If that is ever changed in a incompatible way, this has to
        !            58: # be rethought.
1.96      jlam       59: #
                     60: USE_NATIVE_GCC=                yes
1.156   ! joerg      61:
        !            62: .if defined(_PKGSRC_BARRIER)
1.147     joerg      63: PKG_ADD_CMD=           ${WRKSRC}/add/pkg_add
                     64: PKG_CREATE_CMD=                ${WRKSRC}/create/pkg_create
                     65: PKG_DELETE_CMD=                ${WRKSRC}/delete/pkg_delete
1.149     jlam       66: PKG_INFO_CMD=          ${WRKSRC}/info/pkg_info
1.154     he         67: .endif
1.89      grant      68:
1.139     joerg      69: CPPFLAGS+=             -D_LARGEFILE_SOURCE -D_LARGE_FILES
                     70: CPPFLAGS+=             -D_FILE_OFFSET_BITS=64
                     71:
1.100     tv         72: CPPFLAGS+=             -DDEF_UMASK=${DEF_UMASK}
                     73:
1.122     rillig     74: MAKE_ENV+=             MACHINE_ARCH=${MACHINE_ARCH:Q}
                     75: MAKE_ENV+=             OPSYS=${OPSYS:Q}
1.91      grant      76:
1.92      jlam       77: PKG_DBDIR?=            /var/db/pkg
1.132     adrianp    78: EGDIR=                 ${PREFIX}/share/examples/pkg_install
1.92      jlam       79:
1.122     rillig     80: PLIST_SUBST+=          PKG_DBDIR=${PKG_DBDIR:Q}
1.117     jlam       81:
1.125     jlam       82: DEINSTALL_SRC=         # empty
1.124     jlam       83: INSTALL_SRC=           ${PKGDIR}/INSTALL
                     84: FILES_SUBST+=          PKG_DBDIR=${PKG_DBDIR:Q}                        \
                     85:                        PKG_TOOLS_BIN=${PKG_TOOLS_BIN:Q}                \
                     86:                        MKDIR=${MKDIR:Q}
1.132     adrianp    87: MESSAGE_SUBST+=                PKGVULNDIR=${PKG_DBDIR:Q}                       \
                     88:                        EGDIR=${EGDIR:Q}
1.124     jlam       89:
1.92      jlam       90: .include "../../mk/bsd.prefs.mk"
                     91:
1.58      schmonz    92: VERSION!=              ${AWK} -F '"' '/PKGTOOLS_VERSION/ {print $$2}' \
                     93:                        ${FILESDIR}/lib/version.h
1.78      jlam       94:
1.135     adrianp    95: # Make sure the audit-packages files pick up the right tools in the right
                     96: # places.
1.132     adrianp    97: #
                     98: SUBST_CLASSES=         paths
                     99: SUBST_STAGE.paths=     pre-configure
                    100: SUBST_MESSAGE.paths=   Fixing paths in scripts.
1.135     adrianp   101: SUBST_FILES.paths=     audit-packages/Makefile.in
                    102: SUBST_SED.paths=       -e 's,_gzcat_,${GZCAT},g'
1.132     adrianp   103:
1.152     joerg     104: # linkresolver interface appeared in libarchive 2.5.
                    105: BUILDLINK_API_DEPENDS.libarchive+=     libarchive>=2.5
                    106:
1.137     joerg     107: .include "../../archivers/bzip2/builtin.mk"
                    108: .include "../../archivers/libarchive/builtin.mk"
                    109: .include "../../devel/zlib/builtin.mk"
                    110:
                    111: .if empty(USE_BUILTIN.bzip2:M[yY][eE][sS]) || \
                    112:     empty(USE_BUILTIN.zlib:M[yY][eE][sS])
                    113: USE_BUILTIN.libarchive=        no
                    114: .endif
                    115:
                    116: FILESDIR.bzip2?=       ${.CURDIR}/../../archivers/bzip2/files
                    117: FILESDIR.libarchive?=  ${.CURDIR}/../../archivers/libarchive/files
                    118: FILESDIR.zlib?=                ${.CURDIR}/../../devel/zlib/files
1.150     joerg     119: FILESDIR.libfetch?=    ${.CURDIR}/../../net/libfetch/files
1.137     joerg     120:
                    121: .if empty(USE_BUILTIN.bzip2:M[yY][eE][sS])
                    122: CPPFLAGS+=     -I${WRKDIR}/bzip2
                    123: LDFLAGS+=      -L${WRKDIR}/bzip2
                    124: .endif
                    125: .if empty(USE_BUILTIN.zlib:M[yY][eE][sS])
                    126: CPPFLAGS+=     -I${WRKDIR}/zlib
                    127: LDFLAGS+=      -L${WRKDIR}/zlib
                    128: .endif
                    129: .if empty(USE_BUILTIN.libarchive:M[yY][eE][sS])
                    130: CPPFLAGS+=     -I${WRKDIR}/libarchive/libarchive
                    131: LDFLAGS+=      -L${WRKDIR}/libarchive/.libs
                    132: .endif
1.150     joerg     133: CPPFLAGS+=     -I${WRKDIR}/libfetch
                    134: LDFLAGS+=      -L${WRKDIR}/libfetch
1.137     joerg     135:
1.58      schmonz   136: do-extract:
1.107     tv        137:        @${CP} -R ${FILESDIR} ${WRKSRC}
1.137     joerg     138: .if empty(USE_BUILTIN.bzip2:M[yY][eE][sS])
                    139:        @${CP} -R ${FILESDIR.bzip2} ${WRKDIR}/bzip2
                    140: .endif
                    141: .if empty(USE_BUILTIN.zlib:M[yY][eE][sS])
                    142:        @${CP} -R ${FILESDIR.zlib} ${WRKDIR}/zlib
                    143: .endif
                    144: .if empty(USE_BUILTIN.libarchive:M[yY][eE][sS])
                    145:        @${CP} -R ${FILESDIR.libarchive} ${WRKDIR}/libarchive
                    146: .endif
1.150     joerg     147:        @${CP} -R ${FILESDIR.libfetch} ${WRKDIR}/libfetch
1.137     joerg     148:
                    149: pre-configure:
                    150: .if empty(USE_BUILTIN.bzip2:M[yY][eE][sS])
                    151:        cd ${WRKDIR}/bzip2 && ${BUILD_MAKE_CMD} libbz2.a
                    152: .endif
                    153: .if empty(USE_BUILTIN.zlib:M[yY][eE][sS])
                    154:        cd ${WRKDIR}/zlib && ${BUILD_MAKE_CMD} libz.a
                    155: .endif
                    156: .if empty(USE_BUILTIN.libarchive:M[yY][eE][sS])
                    157:        cd ${WRKDIR}/libarchive &&                                      \
                    158:        ${SETENV} ${_CONFIGURE_SCRIPT_ENV}                              \
                    159:                ${CONFIG_SHELL} ${CONFIG_SHELL_FLAGS}                   \
1.143     joerg     160:                ./configure --disable-shared --disable-bsdtar           \
                    161:                --disable-dependency-tracking
1.137     joerg     162:        cd ${WRKDIR}/libarchive && ${BUILD_MAKE_CMD}
                    163: .endif
1.151     joerg     164:        cd ${WRKDIR}/libfetch && ${SETENV} ${MAKE_ENV}                  \
                    165:                ${MAKE_PROGRAM} ${MAKE_FLAGS} ${BUILD_MAKE_FLAGS}       \
                    166:                        -f ${MAKE_FILE} depend all
                    167:
1.12      hubertf   168:
1.106     erh       169: # XXX Reverse the order that update does things since
                    170: # XXX we need pkg_delete built before we can deinstall.
                    171: # XXX This should probably be the default order for all packages.
                    172: update:
                    173:        ${MAKE}
1.127     jlam      174:        ${MAKE} deinstall _UPDATE_RUNNING=YES
1.118     jlam      175:        ${MAKE} ${UPDATE_TARGET}
1.108     jklos     176:        ${MAKE} clean
1.106     erh       177:
1.1       agc       178: .include "../../mk/bsd.pkg.mk"

CVSweb <webmaster@jp.NetBSD.org>