[BACK]Return to bsd.pkg.mk CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / mk

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /pkgsrc/mk/bsd.pkg.mk between version 1.1540.2.12 and 1.1540.2.14

version 1.1540.2.12, 2005/01/24 18:25:28 version 1.1540.2.14, 2005/01/24 18:50:16
Line 35  MAKEFLAGS+=  _PATH_ORIG=${_PATH_ORIG:Q}
Line 35  MAKEFLAGS+=  _PATH_ORIG=${_PATH_ORIG:Q}
 # Transform package Makefile variables and set defaults  # Transform package Makefile variables and set defaults
 ############################################################################  ############################################################################
   
   CHECK_FILES?=           NO      # run check-files after install
   CHECK_FILES_STRICT?=    NO      # make check-files very strict on errors
 CHECK_SHLIBS?=          YES     # run check-shlibs after install  CHECK_SHLIBS?=          YES     # run check-shlibs after install
 CLEANDEPENDS?=          NO  CLEANDEPENDS?=          NO
 DEINSTALLDEPENDS?=      NO      # add -R to pkg_delete  DEINSTALLDEPENDS?=      NO      # add -R to pkg_delete
Line 1282  init-install:
Line 1284  init-install:
                 ${ECHO_MSG} "If this is not desired, set it to an appropriate value (${DEF_UMASK})"; \                  ${ECHO_MSG} "If this is not desired, set it to an appropriate value (${DEF_UMASK})"; \
                 ${ECHO_MSG} "and install this package again by \`\`${MAKE} deinstall reinstall''."; \                  ${ECHO_MSG} "and install this package again by \`\`${MAKE} deinstall reinstall''."; \
         fi          fi
   .  if defined(PKG_DEVELOPER) && (${CHECK_FILES} == "YES")
           ${_PKG_SILENT}${_PKG_DEBUG}${ECHO_MSG} "${_PKGSRC_IN}> Generating pre-install file lists"
           ${_PKG_SILENT}${_PKG_DEBUG}${FIND} ${PREFIX} -type f -or -type l \
                   2>/dev/null ${CHECK_FILES_SKIP_CMD} >${WRKDIR}/.prefix.pre \
                   || ${TRUE}
   .    if ${CHECK_FILES_STRICT} == "YES"
           ${_PKG_SILENT}${_PKG_DEBUG}${FIND} ${PKG_SYSCONFDIR} \
                   2>/dev/null ${CHECK_FILES_SKIP_CMD} >${WRKDIR}/.sysconfdir.pre \
                   || ${TRUE}
           ${_PKG_SILENT}${_PKG_DEBUG}${FIND} ${VARBASE} \
                   2>/dev/null ${CHECK_FILES_SKIP_CMD} >${WRKDIR}/.varbase.pre \
                   || ${TRUE}
   .    endif
   .  endif
 .  if defined(INSTALLATION_DIRS) && !empty(INSTALLATION_DIRS)  .  if defined(INSTALLATION_DIRS) && !empty(INSTALLATION_DIRS)
         ${_PKG_SILENT}${_PKG_DEBUG}${ECHO_MSG} "${_PKGSRC_IN}> Creating installation directories"          ${_PKG_SILENT}${_PKG_DEBUG}${ECHO_MSG} "${_PKGSRC_IN}> Creating installation directories"
         ${_PKG_SILENT}${_PKG_DEBUG}                                     \          ${_PKG_SILENT}${_PKG_DEBUG}                                     \
Line 1360  _REAL_TARGETS.su-install+= plist
Line 1376  _REAL_TARGETS.su-install+= plist
 .PHONY: plist  .PHONY: plist
 plist: ${PLIST}  plist: ${PLIST}
   
   #===> "post-install-check-files"
   
   .if defined(PKG_DEVELOPER) && (${CHECK_FILES} == "YES")
   _REAL_TARGETS.su-install+=      post-install-check-files
   .PHONY: post-install-check-files
   post-install-check-files:
           ${_PKG_SILENT}${_PKG_DEBUG}${ECHO_MSG} "${_PKGSRC_IN}> Generating post-install file lists"
           ${_PKG_SILENT}${_PKG_DEBUG}${FIND} ${PREFIX} -type f -or -type l \
                   2>/dev/null ${CHECK_FILES_SKIP_CMD} >${WRKDIR}/.prefix.post \
                   || ${TRUE}
   .  if ${CHECK_FILES_STRICT} == "YES"
           ${_PKG_SILENT}${_PKG_DEBUG}${FIND} ${PKG_SYSCONFDIR} \
                   2>/dev/null ${CHECK_FILES_SKIP_CMD} >${WRKDIR}/.sysconfdir.post\
                   || ${TRUE}
           ${_PKG_SILENT}${_PKG_DEBUG}${FIND} ${VARBASE} \
                   2>/dev/null ${CHECK_FILES_SKIP_CMD} >${WRKDIR}/.varbase.post \
                   || ${TRUE}
   .  endif
   .endif
   
 #===> "post-install-script"  #===> "post-install-script"
   
 _REAL_TARGETS.su-install+=      post-install-script  _REAL_TARGETS.su-install+=      post-install-script
Line 1459  _REAL_TARGETS.su-install+= fake-pkg
Line 1495  _REAL_TARGETS.su-install+= fake-pkg
 _REAL_TARGETS.su-install+=      check-shlibs  _REAL_TARGETS.su-install+=      check-shlibs
 .  endif  .  endif
   
   #===> "check-files"
   
   .  if defined(PKG_DEVELOPER) && (${CHECK_FILES} == "YES")
   _REAL_TARGETS.su-install+=      check-files
   .  endif
   
 .endif  # !empty(PKG_PHASES:Minstall)  .endif  # !empty(PKG_PHASES:Minstall)
   
 ############################################################################  ############################################################################
Line 2683  check-shlibs:
Line 2725  check-shlibs:
         fi          fi
 .endif # NO_PKG_REGISTER  .endif # NO_PKG_REGISTER
   
   # CHECK_FILES_SKIP is a list of file names that will be skipped when
   # analyzing file lists in the check-files target.  This is useful to
   # avoid getting errors triggered by changes in directories not really
   # handled by pkgsrc.
   #
   # We have to do this here, i.e., quite late in bsd.pkg.mk parsing, so
   # that the variables used in them are defined.  Otherwise we may get
   # problems with the 'for' expressions.
   .if defined(INFO_DIR)
   CHECK_FILES_SKIP+=      ${PREFIX}/${INFO_DIR}/dir
   .endif
   CHECK_FILES_SKIP+=      ${PREFIX}/emul/linux/proc
   
   .for e c in ${CONF_FILES} ${SUPPORT_FILES}
   CHECK_FILES_SKIP+=      ${c}/.pkgsrc
   .endfor
   .for e c o g m in ${CONF_FILES_PERMS} ${SUPPORT_FILES_PERMS}
   CHECK_FILES_SKIP+=      ${c}/.pkgsrc
   .endfor
   .for d in ${MAKE_DIRS} ${OWN_DIRS}
   CHECK_FILES_SKIP+=      ${d}
   .endfor
   .for d o g m in ${MAKE_DIRS_PERMS} ${OWN_DIRS_PERMS}
   CHECK_FILES_SKIP+=      ${d}
   .endfor
   .undef e c d o g m
   
   CHECK_FILES_SKIP_CMD=
   .for name in ${CHECK_FILES_SKIP}
   CHECK_FILES_SKIP_CMD+=  | ${GREP} -v ${name}
   .endfor
   .undef name
   
   # Check if the generated PLIST matches the list of really installed files.
   #
   .PHONY: check-files
   check-files:
   .if !defined(NO_PKG_REGISTER)
           ${_PKG_SILENT}${_PKG_DEBUG}                                     \
           errors=0;                                                       \
           diff -u ${WRKDIR}/.prefix.pre ${WRKDIR}/.prefix.post            \
                   >${WRKDIR}/.files.diff || ${TRUE};                      \
           ${GREP} '^+/' ${WRKDIR}/.files.diff | ${SED} "s|^+||" | ${SORT} \
                   >${WRKDIR}/.files.added;                                \
           ${GREP} '^-/' ${WRKDIR}/.files.diff | ${SED} "s|^-||" | ${SORT} \
                   >${WRKDIR}/.files.deleted;                              \
           if ${TEST} `${WC} -l ${WRKDIR}/.files.deleted |                 \
                   ${AWK} '{ print $$1; }'` -gt 0;                         \
           then                                                            \
                   echo "*** The following files have been deleted from"   \
                        "${PREFIX}!";                                      \
                   ${SED} "s|^|        |" <${WRKDIR}/.files.deleted;       \
                   errors=1;                                               \
           fi;                                                             \
           ${GREP} '^[A-Za-z]' ${PLIST} | ${SED} "s|^|${PREFIX}/|" |       \
                   ${SORT} >${WRKDIR}/.files.expected;                     \
           if ! ${CMP} -s ${WRKDIR}/.files.expected ${WRKDIR}/.files.added; then \
                   echo "*** The PLIST does not match installed files!";   \
                   echo "    The following files were not expected in ${PREFIX}:";\
                   diff -u ${WRKDIR}/.files.expected ${WRKDIR}/.files.added | \
                           ${GREP} '^+[^+]' | ${SED} "s|^+|        |";     \
                   errors=1;                                               \
           fi;                                                             \
           if [ ${CHECK_FILES_STRICT} = "YES" ] &&                         \
              ! ${CMP} -s ${WRKDIR}/.sysconfdir.pre ${WRKDIR}/.sysconfdir.post; \
           then                                                            \
                   echo "*** The package has modified ${PKG_SYSCONFDIR}"   \
                        "contents directly!";                              \
                   echo "    The offending files/directories are:";        \
                   diff -u ${WRKDIR}/.sysconfdir.pre ${WRKDIR}/.sysconfdir.post | \
                           ${GREP} '^+[^+]' | ${SED} "s|^+|        |";     \
                   errors=1;                                               \
           fi;                                                             \
           if [ ${CHECK_FILES_STRICT} = "YES" ] &&                         \
              ! ${CMP} -s ${WRKDIR}/.varbase.pre ${WRKDIR}/.varbase.post; then \
                   echo "*** The package has modified ${VARBASE} contents" \
                        "directly!";                                       \
                   echo "    The offending files/directories are:";        \
                   diff -u ${WRKDIR}/.varbase.pre ${WRKDIR}/.varbase.post |\
                           ${GREP} '^+[^+]' | ${SED} "s|^+|        |";     \
                   errors=1;                                               \
           fi;                                                             \
           ${RM} -f ${WRKDIR}/.files.added ${WRKDIR}/.files.deleted        \
                    ${WRKDIR}/.files.diff ${WRKDIR}/.files.expected;       \
           ${TEST} $$errors -eq 0
   .endif
   
 LOCKFILE=       ${WRKDIR}/.lockfile  LOCKFILE=       ${WRKDIR}/.lockfile
 .for targ in ${_PKG_PHASES_WRKDIR}  .for targ in ${_PKG_PHASES_WRKDIR}
 .PHONY: acquire-${targ}-lock release-${targ}-lock  .PHONY: acquire-${targ}-lock release-${targ}-lock

Legend:
Removed from v.1.1540.2.12  
changed lines
  Added in v.1.1540.2.14

CVSweb <webmaster@jp.NetBSD.org>