On 05/02/2011 10:43 PM, David C. Rankin wrote: > Baho - and others interested in packaging specifics, > > In the kdebase PKGBUILD, I handled packaging of kdmrc and the > Xsession file as follows: > > # set kdm directory > _kdmdir=${trinity_prefix}/share/config/kdm > [[ -d ${pkgdir}/${_kdmdir} ]] || install -d -m755 ${pkgdir}/${_kdmdir} > > # install kdmrc > [[ -f kdmrc ]] && install -m644 kdmrc ${pkgdir}/${_kdmdir} > > # update the Xsession file > [[ -f Xsession ]] && install -m755 Xsession ${pkgdir}/${_kdmdir} > > # create the starttrinity link > [[ -d ${pkgdir}/usr/bin ]] || mkdir -p ${pkgdir}/usr/bin > cd ${pkgdir}/usr/bin > ln -sf /opt/trinity/bin/startkde starttrinity > > You handled it slightly differently, primarily using cp and chmod > instead of install and adding the 'n' option to the link of starttrinity: > > _kdmdir=${_prefix}/share/config/kdm > [[ -d ${pkgdir}/${_kdmdir} ]] || install -d -m755 > ${pkgdir}/${_kdmdir} > [[ -f kdmrc ]] && cp -v kdmrc ${pkgdir}/${_kdmdir} > [[ -f ${scrdir}/Xsession ]] && { > cp -v ${scrdir}/Xsession ${pkgdir}/${_kdmdir} > chmod 0755 ${pkgdir}/${_kdmdir}/Xsession > } > [[ -d ${pkgdir}/usr/bin ]] || mkdir -p ${pkgdir}/usr/bin > ln -snf startkde ${pkgdir}/usr/bin/starttrinity > > What is the benefit of using cp + chmod instead of 'install -m'? Also, > why the 'ln -snf' on starttrinity instead of just 'ln -sf'? Just habit > or convention? On both, I'm just curious. If the cp + chmod is less > problematic, then that's the way I want to go, but I don't want to > just dismiss the use of install without understanding the benefit. > > What says the master? > still working on kdm so I don't have an answer as of now. man ln gives -s, --symbolic make symbolic links instead of hard links -f, --force remove existing destination files -n, --no-dereference treat destination that is a symlink to a directory as if it were a normal file