Magellan Linux

Diff of /trunk/mage/usr/lib/mage/pkgbuild_dir.sh

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

revision 439 by niro, Mon Jan 22 00:24:14 2007 UTC revision 440 by niro, Mon Mar 19 19:10:07 2007 UTC
# Line 4  Line 4 
4  # builds packages from given dir  # builds packages from given dir
5  #  #
6    
7  # $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/pkgbuild_dir.sh,v 1.13 2007-01-22 00:24:14 niro Exp $  # $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/pkgbuild_dir.sh,v 1.14 2007-03-19 19:10:07 niro Exp $
8    
9  # set default user mage.rc  # set default user mage.rc
10  : ${MAGERC="/etc/mage.rc"}  : ${MAGERC="/etc/mage.rc"}
# Line 24  export LC_ALL=C Line 24  export LC_ALL=C
24  [[ -z $1 ]] && echo "No package name given. Aborting." && exit 1  [[ -z $1 ]] && echo "No package name given. Aborting." && exit 1
25  [[ -z $2 ]] && echo "No source dir given. Aborting." && exit 1  [[ -z $2 ]] && echo "No source dir given. Aborting." && exit 1
26    
27    source /etc/mage.rc.global
28  if [ -f ${MAGERC} ]  if [ -f ${MAGERC} ]
29  then  then
30   source ${MAGERC}   source ${MAGERC}
# Line 58  build_preinstall() Line 59  build_preinstall()
59    
60  build_postinstall()  build_postinstall()
61  {  {
62   echo   echo -e "${COLBLUE}===${COLGREEN} fetching files for package '${PKGNAME}' ...${COLDEFAULT}"
  echo "Fetching files for package '${PKGNAME}' ..."  
63    
64   # md5sums will only be generated for files: $M_MD5SUM   # md5sums will only be generated for files: $M_MD5SUM
65    
# Line 148  build_postinstall() Line 148  build_postinstall()
148   unset IFS   unset IFS
149    
150   # forcing mtime to same value   # forcing mtime to same value
151   echo -n "Forcing mtime to the same value ..."   echo -e "${COLBLUE}===${COLGREEN} forcing mtime to the same value ...${COLDEFAULT}"
152   find ${BUILDDIR}/${PKGNAME}/binfiles \   find ${BUILDDIR}/${PKGNAME}/binfiles -exec touch -m -r ${BUILDDIR}/${PKGNAME}/.mtime '{}' ';'
  -exec touch -m -r ${BUILDDIR}/${PKGNAME}/.mtime '{}' ';' \  
  && echo done || echo false  
153  }  }
154    
155  build_rmtimestamp()  build_rmtimestamp()
# Line 161  build_rmtimestamp() Line 159  build_rmtimestamp()
159    
160  build_package()  build_package()
161  {  {
162   echo "Building Package ..."   echo -e "${COLBLUE}===${COLGREEN} building package tarball ...${COLDEFAULT}"
163   cd ${BUILDDIR}   cd ${BUILDDIR}
164   tar cvjf ${PKGNAME}.tar.bz2 ./${PKGNAME}   tar cvjf ${PKGNAME}.tar.bz2 ./${PKGNAME}
165   install -d ${PKGDIR}   install -d ${PKGDIR}

Legend:
Removed from v.439  
changed lines
  Added in v.440