Magellan Linux

Diff of /trunk/mage/usr/lib/mage/meta-generator.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2366 by niro, Mon Jan 6 13:07:36 2014 UTC revision 2367 by niro, Mon Jan 6 13:28:00 2014 UTC
# Line 80  PKGTARBALL="" Line 80  PKGTARBALL=""
80  SMAGEFILE=""  SMAGEFILE=""
81  METADIR="${PKGDIR}/meta"  METADIR="${PKGDIR}/meta"
82  METASUFFIX="meta"  METASUFFIX="meta"
83    PKGMETADIR=""
84  PKGMETAFILE=""  PKGMETAFILE=""
85    
86  # very basic getops  # very basic getops
# Line 122  PKGNAME="${PNAME}-${PVER}-${PBUILD}" Line 123  PKGNAME="${PNAME}-${PVER}-${PBUILD}"
123  ARCHPKGNAME="${PNAME}-${PVER}-${ARCH}$(print_distrotag)-${PBUILD}"  ARCHPKGNAME="${PNAME}-${PVER}-${ARCH}$(print_distrotag)-${PBUILD}"
124    
125  # set the right meta-location  # set the right meta-location
126    PKGMETADIR="${METADIR}/${ARCHPKGNAME}"
127    PKGMETAFILE="${METADIR}/${ARCHPKGNAME}/${METASUFFIX}"
128    
129  [[ ! -d ${METADIR} ]] && install -d ${METADIR}  [[ ! -d ${METADIR} ]] && install -d ${METADIR}
130  PKGMETAFILE="${METADIR}/${ARCHPKGNAME}.${METASUFFIX}"  [[ ! -d ${PKGMETADIR} ]] && install -d ${PKGMETADIR}
131    
132  # create a clean metafile  # create a clean metafile
133  :> ${PKGMETAFILE}  :> ${PKGMETAFILE}
# Line 155  SEARCH_DIRS+=",usr/*/bin,usr/*/sbin" Line 159  SEARCH_DIRS+=",usr/*/bin,usr/*/sbin"
159  SEARCH_DIRS+=",opt/bin,opt/*/bin,opt/*/sbin"  SEARCH_DIRS+=",opt/bin,opt/*/bin,opt/*/sbin"
160  SEARCH_DIRS+=",opt/*/jre/bin"  SEARCH_DIRS+=",opt/*/jre/bin"
161  # at last add braces  # at last add braces
162  SEARCH_DIRS="{${SEARCH_DIRS}}"  #SEARCH_DIRS="{${SEARCH_DIRS}}"
163  # search them  # search them
164  add2meta PROVIDED_BINARIES "$(find $(eval echo ${BUILDDIR}/${ARCHPKGNAME}/binfiles/${SEARCH_DIRS}) -type f -printf '%f ' 2> /dev/null)"  #add2meta PROVIDED_BINARIES "$(find $(eval echo ${BUILDDIR}/${ARCHPKGNAME}/binfiles/${SEARCH_DIRS}) -type f -printf '%f ' 2> /dev/null)"
   
165  # generate MD5SUM (get it with tail -n1)  # generate MD5SUM (get it with tail -n1)
166  echo >> ${PKGMETAFILE}  add2meta PKG_CHECKSUM_MD5 "$(cd ${PKGDIR}; md5sum ${ARCHPKGNAME}.${PKGSUFFIX} | cut -d' ' -f1 )"
167  echo '# MD5 CHECKSUM:' >> ${PKGMETAFILE}  
168  ( cd ${PKGDIR}; md5sum ${ARCHPKGNAME}.${PKGSUFFIX} >> ${PKGMETAFILE} )  # generate content file
169    find ${BINDIR} | sed "s:${BINDIR}::g;/^$/d" | sort -d > ${PKGMETADIR}/content

Legend:
Removed from v.2366  
changed lines
  Added in v.2367