Группа :: Науки/Наука о земле
Пакет: grass
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: grass-6.2.3-alt-destdir.patch
Скачать
Скачать
--- grass-6.2.3/Makefile.orig 2007-11-27 23:33:13 +0300
+++ grass-6.2.3/Makefile 2008-01-05 17:57:08 +0300
@@ -196,18 +196,18 @@
echo " Installation aborted, exiting Make."; \
exit; \
fi; \
- INST_PATH=`dirname ${INST_DIR}`; \
+ INST_PATH=`dirname ${DESTDIR}${INST_DIR}`; \
while [ ! -d $$INST_PATH ]; do \
INST_PATH=`dirname $$INST_PATH`; \
done; \
- if [ ! -d "${INST_DIR}" -a ! -w "$$INST_PATH" ] ; then \
+ if [ ! -d "${DESTDIR}${INST_DIR}" -a ! -w "$$INST_PATH" ] ; then \
echo "ERROR: Directory $$INST_PATH is a parent directory of your"; \
echo " install directory ${INST_DIR} and is not writable."; \
echo " Perhaps you need root access."; \
echo " Installation aborted, exiting Make."; \
exit; \
fi; \
- if [ -d ${INST_DIR} -a ! -w "${INST_DIR}" ] ; then \
+ if [ -d ${DESTDIR}${INST_DIR} -a ! -w "${DESTDIR}${INST_DIR}" ] ; then \
echo "ERROR: Your install directory ${INST_DIR} is not writable."; \
echo " Perhaps you need root access."; \
echo " Installation aborted, exiting Make."; \
@@ -230,34 +230,34 @@
${MAKE} real-install
real-install: FORCE
- test -d ${INST_DIR} || ${MAKE_DIR_CMD} ${INST_DIR}
- @##### test -d ${INST_DIR}/dev || ${MAKE_DIR_CMD} ${INST_DIR}/dev
- test -d ${BINDIR} || ${MAKE_DIR_CMD} ${BINDIR}
- -sed -e "s#^GISBASE.*#GISBASE=${INST_DIR}#" ${ARCH_BINDIR}/grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR} > ${BINDIR}/grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}
- -chmod a+x ${BINDIR}/grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}
- -cd ${GISBASE} ; tar cBf - bin | (cd ${INST_DIR} ; tar xBf - ) 2>/dev/null
- -cd ${GISBASE} ; tar cBf - bwidget | (cd ${INST_DIR} ; tar xBf - ) 2>/dev/null
- -cd ${GISBASE} ; tar cBf - docs | (cd ${INST_DIR} ; tar xBf - ) 2>/dev/null
- -cd ${GISBASE} ; tar cBf - driver | (cd ${INST_DIR} ; tar xBf - ) 2>/dev/null
- -cd ${GISBASE} ; tar cBf - etc | (cd ${INST_DIR} ; tar xBf - ) 2>/dev/null
- -cd ${GISBASE} ; tar cBf - fonts | (cd ${INST_DIR} ; tar xBf - ) 2>/dev/null
- -cd ${GISBASE} ; tar cBf - man | (cd ${INST_DIR} ; tar xBf - ) 2>/dev/null
- -cd ${GISBASE} ; tar cBf - scripts | (cd ${INST_DIR} ; tar xBf - ) 2>/dev/null
- if [ ${LOCALE} -eq 1 ] ; then cd ${GISBASE} ; tar cBf - locale | (cd ${INST_DIR} ; tar xBf - ) 2>/dev/null ; fi
+ test -d ${DESTDIR}${INST_DIR} || ${MAKE_DIR_CMD} ${DESTDIR}${INST_DIR}
+ @##### test -d ${DESTDIR}${INST_DIR}/dev || ${MAKE_DIR_CMD} ${DESTDIR}${INST_DIR}/dev
+ test -d ${DESTDIR}${BINDIR} || ${MAKE_DIR_CMD} ${DESTDIR}${BINDIR}
+ -sed -e "s#^GISBASE.*#GISBASE=${INST_DIR}#" ${ARCH_BINDIR}/grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR} > ${DESTDIR}${BINDIR}/grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}
+ -chmod a+x ${DESTDIR}${BINDIR}/grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}
+ -cd ${GISBASE} ; tar cBf - bin | (cd ${DESTDIR}${INST_DIR} ; tar xBf - ) 2>/dev/null
+ -cd ${GISBASE} ; tar cBf - bwidget | (cd ${DESTDIR}${INST_DIR} ; tar xBf - ) 2>/dev/null
+ -cd ${GISBASE} ; tar cBf - docs | (cd ${DESTDIR}${INST_DIR} ; tar xBf - ) 2>/dev/null
+ -cd ${GISBASE} ; tar cBf - driver | (cd ${DESTDIR}${INST_DIR} ; tar xBf - ) 2>/dev/null
+ -cd ${GISBASE} ; tar cBf - etc | (cd ${DESTDIR}${INST_DIR} ; tar xBf - ) 2>/dev/null
+ -cd ${GISBASE} ; tar cBf - fonts | (cd ${DESTDIR}${INST_DIR} ; tar xBf - ) 2>/dev/null
+ -cd ${GISBASE} ; tar cBf - man | (cd ${DESTDIR}${INST_DIR} ; tar xBf - ) 2>/dev/null
+ -cd ${GISBASE} ; tar cBf - scripts | (cd ${DESTDIR}${INST_DIR} ; tar xBf - ) 2>/dev/null
+ if [ ${LOCALE} -eq 1 ] ; then cd ${GISBASE} ; tar cBf - locale | (cd ${DESTDIR}${INST_DIR} ; tar xBf - ) 2>/dev/null ; fi
@ # The man, include, and lib could go to ${PREFIX}/ BUT if this is
@ # done, then the corresponding uninstall instructions must delete
@ # the grass files BY FILENAME NOT DIRECTORY!! Otherwise there is a
@ # high risk of deleteing system files since PREFIX is defined by
@ # default to be /usr/local
- @##### -cd ${GISBASE} ; tar cBf - man | (cd ${INST_DIR} ; tar xBf - ) 2>/dev/null
- -cd ${GISBASE} ; tar cBf - include | (cd ${INST_DIR} ; tar xBf - ) 2>/dev/null
- -cd ${GISBASE} ; tar cBf - lib | (cd ${INST_DIR} ; tar xBf - ) 2>/dev/null
- -sed 's#'${GISBASE}'#'${INST_DIR}'#g' ${GISBASE}/etc/monitorcap > ${INST_DIR}/etc/monitorcap
- @##### -chmod -R 1777 ${INST_DIR}/locks 2>/dev/null
- -chmod -R a+rX ${INST_DIR} 2>/dev/null
+ @##### -cd ${GISBASE} ; tar cBf - man | (cd ${DESTDIR}${INST_DIR} ; tar xBf - ) 2>/dev/null
+ -cd ${GISBASE} ; tar cBf - include | (cd ${DESTDIR}${INST_DIR} ; tar xBf - ) 2>/dev/null
+ -cd ${GISBASE} ; tar cBf - lib | (cd ${DESTDIR}${INST_DIR} ; tar xBf - ) 2>/dev/null
+ -sed 's#'${GISBASE}'#'${INST_DIR}'#g' ${GISBASE}/etc/monitorcap > ${DESTDIR}${INST_DIR}/etc/monitorcap
+ @##### -chmod -R 1777 ${DESTDIR}${INST_DIR}/locks 2>/dev/null
+ -chmod -R a+rX ${DESTDIR}${INST_DIR} 2>/dev/null
#GEM installation
- -tar cBf - gem/skeleton | (cd ${INST_DIR}/etc ; tar xBf - ) 2>/dev/null
- -${INSTALL} gem/gem ${BINDIR} 2>/dev/null
+ -tar cBf - gem/skeleton | (cd ${DESTDIR}${INST_DIR}/etc ; tar xBf - ) 2>/dev/null
+ -${INSTALL} gem/gem ${DESTDIR}${BINDIR} 2>/dev/null
install-strip: FORCE