diff options
author | herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2000-12-27 17:51:29 +0000 |
---|---|---|
committer | herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2000-12-27 17:51:29 +0000 |
commit | 50457d3bf6aee2a49dd9c0acf7389b885178ea3f (patch) | |
tree | ad2ffda7f4fc17d01c84d28fff54a25ce7650f49 /distrib | |
parent | ba232d00408519083cf45992c06e71eae1c99310 (diff) |
Améliorations
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@1230 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'distrib')
-rw-r--r-- | distrib/Makefile | 11 | ||||
-rw-r--r-- | distrib/coq.spec | 13 |
2 files changed, 14 insertions, 10 deletions
diff --git a/distrib/Makefile b/distrib/Makefile index 7e1e69221..cc46418c6 100644 --- a/distrib/Makefile +++ b/distrib/Makefile @@ -160,20 +160,25 @@ ${COQRPMPACKAGE}.src.rpm: ${COQPACKAGE}.tar.gz cp -f petit-coq.gif ${RPMTOPDIR}/SOURCES cp -f ${COQPACKAGE}.tar.gz ${RPMTOPDIR}/SOURCES - mkdir ${RPMTOPDIR}/RPMS/${ARCH} + - rm ${RPMTOPDIR}/RPMS/${LOCALARCH} - ln -s ${RPMTOPDIR}/RPMS/${ARCH} ${RPMTOPDIR}/RPMS/${LOCALARCH} ${RPM} -ba coq.spec mv ${RPMTOPDIR}/SRPMS/${COQRPMPACKAGE}.src.rpm . (if [ -f ${RPMTOPDIR}/RPMS/${ARCH}/${COQRPMPACKAGE}.${LOCALARCH}.rpm ];\ - then mv ${RPMTOPDIR}/RPMS/${ARCH}/${COQRPMPACKAGE}.${LOCALARCH}.rpm ${RPMTOPDIR}/RPMS/${ARCH}/${COQRPMPACKAGE}.${ARCH}.rpm; + then mv ${RPMTOPDIR}/RPMS/${ARCH}/${COQRPMPACKAGE}.${LOCALARCH}.rpm ${RPMTOPDIR}/RPMS/${ARCH}/${COQRPMPACKAGE}.${ARCH}.rpm;\ + else mv ${RPMTOPDIR}/RPMS/${ARCH}/${COQRPMPACKAGE}.${ARCH}.rpm .;\ fi) - - mv ${RPMTOPDIR}/RPMS/${ARCH}/${COQRPMPACKAGE}.${ARCH}.rpm . # Sera déjà fait si le src.rpm vient d'être fait ${COQRPMPACKAGE}.${ARCH}.rpm: rpm-config ${COQRPMPACKAGE}.src.rpm - mkdir ${RPMTOPDIR}/RPMS/${ARCH} + - rm ${RPMTOPDIR}/RPMS/${LOCALARCH} - ln -s ${RPMTOPDIR}/RPMS/${ARCH} ${RPMTOPDIR}/RPMS/${LOCALARCH} ${RPM} --rebuild ${COQRPMPACKAGE}.src.rpm - mv ${RPMTOPDIR}/RPMS/${ARCH}/${COQRPMPACKAGE}.${ARCH}.rpm . + (if [ -f ${RPMTOPDIR}/RPMS/${ARCH}/${COQRPMPACKAGE}.${LOCALARCH}.rpm ];\ + then mv ${RPMTOPDIR}/RPMS/${ARCH}/${COQRPMPACKAGE}.${LOCALARCH}.rpm ${RPMTOPDIR}/RPMS/${ARCH}/${COQRPMPACKAGE}.${ARCH}.rpm;\ + else mv ${RPMTOPDIR}/RPMS/${ARCH}/${COQRPMPACKAGE}.${ARCH}.rpm .;\ + fi) ########## contrib-tag: diff --git a/distrib/coq.spec b/distrib/coq.spec index 4027c7e8c..19b35ce40 100644 --- a/distrib/coq.spec +++ b/distrib/coq.spec @@ -37,19 +37,18 @@ make -e COQINSTALLPREFIX=$RPM_BUILD_ROOT/ install # To install only locally the binaries compiled with absolute paths %post -# This is because the Coq Team usually build Coq with Ocaml in /usr/local +# This is a because the Coq Team usually build Coq with Ocaml in /usr/local # but ocaml is actually in /usr if coming from a rpm package -where=`ocamlc -v | tail -1 | sed -e 's/.*: \(.*\)/\1/'` -if [ ! "$where" = "/usr/local/lib/ocaml" ]; then - ln -s $where /usr/local/lib/ocaml +# This works only if ocaml has been installed by rpm +if [ ! -e /usr/local/lib/ocaml ]; then + ln -s /usr/lib/ocaml /usr/local/lib/ocaml || true fi %postun # This is because the Coq Team usually build Coq with Ocaml in /usr/local # but ocaml is actually in /usr if coming from a rpm package -where=`ocamlc -v | tail -1 | sed -e 's/.*: \(.*\)/\1/'` -if [ ! "$where" = "/usr/local/lib/ocaml" ]; then - rm $where /usr/local/lib/ocaml +if [ -L /usr/local/lib/ocaml ]; then + rm /usr/local/lib/ocaml fi %files |