Bitmessage/PyBitmessage — pull request #749 by arcresu (2014-12-24 06:12:51+00:00)
Title: Revert "Fixed the path in shell executable when DESTDIR isn't empty"

I'm not sure what the original intention of this change was, but it breaks installation via debian packages. The `$DESTDIR` variable is [intended to facilitate staged installs](http://www.gnu.org/prep/standards/html_node/DESTDIR.html#DESTDIR), where the program is installed to a staging area before reaching its final destination. The staging area is not intended to stay around, and it will be deleted at some point after the files have been moved to their final destination.

Since the lines affected by this change are copied into the installation, this means that the staging path is left behind in the final shell script. The result is something like:

```
#!/bin/sh
if [ -d /tmp/tmp.TUTTv2xWvP/pybitmessage-0.4.4/debian/pybitmessage/usr/local/share/pybitmessage ]; then
cd /tmp/tmp.TUTTv2xWvP/pybitmessage-0.4.4/debian/pybitmessage/usr/local/share/pybitmessage
else
cd /tmp/tmp.TUTTv2xWvP/pybitmessage-0.4.4/debian/pybitmessage/usr/share/pybitmessage
fi
LD_LIBRARY_PATH="/opt/openssl-compat-bitcoin/lib/" exec python2 bitmessagemain.py
```

which means that the system-wide executable is actually launching the program from my temporary staging area and ignoring the files which were installed in the `/usr/share/` tree. This is not the intended effect; `$DESTDIR` should never be included anywhere in the files to be installed, by definition.