Fixed the path in shell executable when DESTDIR isn't empty #575

Merged
yurivict merged 1 commits from install_issues into master 2013-12-21 20:33:41 +01:00
Showing only changes of commit 1763d803c7 - Show all commits

View File

@ -30,10 +30,10 @@ install:
install -m 644 desktop/icon24.png ${DESTDIR}${PREFIX}/share/icons/hicolor/24x24/apps/${APP}.png install -m 644 desktop/icon24.png ${DESTDIR}${PREFIX}/share/icons/hicolor/24x24/apps/${APP}.png
cp -rf src/* ${DESTDIR}${PREFIX}/share/${APP} cp -rf src/* ${DESTDIR}${PREFIX}/share/${APP}
echo '#!/bin/sh' > ${DESTDIR}${PREFIX}/bin/${APP} echo '#!/bin/sh' > ${DESTDIR}${PREFIX}/bin/${APP}
echo 'if [ -d /usr/local/share/${APP} ]; then' >> ${DESTDIR}${PREFIX}/bin/${APP} echo 'if [ -d ${DESTDIR}/usr/local/share/${APP} ]; then' >> ${DESTDIR}${PREFIX}/bin/${APP}
echo ' cd /usr/local/share/${APP}' >> ${DESTDIR}${PREFIX}/bin/${APP} echo ' cd ${DESTDIR}/usr/local/share/${APP}' >> ${DESTDIR}${PREFIX}/bin/${APP}
echo 'else' >> ${DESTDIR}${PREFIX}/bin/${APP} echo 'else' >> ${DESTDIR}${PREFIX}/bin/${APP}
echo ' cd /usr/share/pybitmessage' >> ${DESTDIR}${PREFIX}/bin/${APP} echo ' cd ${DESTDIR}/usr/share/pybitmessage' >> ${DESTDIR}${PREFIX}/bin/${APP}
echo 'fi' >> ${DESTDIR}${PREFIX}/bin/${APP} echo 'fi' >> ${DESTDIR}${PREFIX}/bin/${APP}
echo 'LD_LIBRARY_PATH="/opt/openssl-compat-bitcoin/lib/" exec python2 bitmessagemain.py' >> ${DESTDIR}${PREFIX}/bin/${APP} echo 'LD_LIBRARY_PATH="/opt/openssl-compat-bitcoin/lib/" exec python2 bitmessagemain.py' >> ${DESTDIR}${PREFIX}/bin/${APP}
chmod +x ${DESTDIR}${PREFIX}/bin/${APP} chmod +x ${DESTDIR}${PREFIX}/bin/${APP}