Makefile 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. APP=pybitmessage
  2. VERSION=0.3.5
  3. RELEASE=1
  4. ARCH_TYPE=`uname -m`
  5. PREFIX?=/usr/local
  6. all:
  7. debug:
  8. source:
  9. tar -cvzf ../${APP}_${VERSION}.orig.tar.gz ../${APP}-${VERSION} --exclude-vcs
  10. install:
  11. mkdir -p ${DESTDIR}/usr
  12. mkdir -p ${DESTDIR}${PREFIX}
  13. mkdir -p ${DESTDIR}${PREFIX}/bin
  14. mkdir -m 755 -p ${DESTDIR}${PREFIX}/share
  15. mkdir -m 755 -p ${DESTDIR}${PREFIX}/share/man
  16. mkdir -m 755 -p ${DESTDIR}${PREFIX}/share/man/man1
  17. install -m 644 man/${APP}.1.gz ${DESTDIR}${PREFIX}/share/man/man1
  18. mkdir -m 755 -p ${DESTDIR}${PREFIX}/share/${APP}
  19. mkdir -m 755 -p ${DESTDIR}${PREFIX}/share/applications
  20. mkdir -m 755 -p ${DESTDIR}${PREFIX}/share/pixmaps
  21. mkdir -m 755 -p ${DESTDIR}${PREFIX}/share/icons
  22. mkdir -m 755 -p ${DESTDIR}${PREFIX}/share/icons/hicolor
  23. mkdir -m 755 -p ${DESTDIR}${PREFIX}/share/icons/hicolor/scalable
  24. mkdir -m 755 -p ${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps
  25. mkdir -m 755 -p ${DESTDIR}${PREFIX}/share/icons/hicolor/24x24
  26. mkdir -m 755 -p ${DESTDIR}${PREFIX}/share/icons/hicolor/24x24/apps
  27. install -m 644 desktop/${APP}.desktop ${DESTDIR}${PREFIX}/share/applications/${APP}.desktop
  28. install -m 644 desktop/icon24.png ${DESTDIR}${PREFIX}/share/icons/hicolor/24x24/apps/${APP}.png
  29. cp -rf src/* ${DESTDIR}${PREFIX}/share/${APP}
  30. echo '#!/bin/sh' > ${DESTDIR}${PREFIX}/bin/${APP}
  31. echo 'if [ -d /usr/local/share/${APP} ]; then' >> ${DESTDIR}${PREFIX}/bin/${APP}
  32. echo ' cd /usr/local/share/${APP}' >> ${DESTDIR}${PREFIX}/bin/${APP}
  33. echo 'else' >> ${DESTDIR}${PREFIX}/bin/${APP}
  34. echo ' cd /usr/share/pybitmessage' >> ${DESTDIR}${PREFIX}/bin/${APP}
  35. echo 'fi' >> ${DESTDIR}${PREFIX}/bin/${APP}
  36. echo 'LD_LIBRARY_PATH="/opt/openssl-compat-bitcoin/lib/" exec python2 bitmessagemain.py' >> ${DESTDIR}${PREFIX}/bin/${APP}
  37. chmod +x ${DESTDIR}${PREFIX}/bin/${APP}
  38. uninstall:
  39. rm -f ${PREFIX}/share/man/man1/${APP}.1.gz
  40. rm -rf ${PREFIX}/share/${APP}
  41. rm -f ${PREFIX}/bin/${APP}
  42. rm -f ${PREFIX}/share/applications/${APP}.desktop
  43. rm -f ${PREFIX}/share/icons/hicolor/scalable/apps/${APP}.svg
  44. rm -f ${PREFIX}/share/pixmaps/${APP}.svg
  45. clean:
  46. rm -f ${APP} \#* \.#* gnuplot* *.png debian/*.substvars debian/*.log
  47. rm -fr deb.* debian/${APP} rpmpackage/${ARCH_TYPE}
  48. rm -f ../${APP}*.deb ../${APP}*.changes ../${APP}*.asc ../${APP}*.dsc
  49. rm -f rpmpackage/*.src.rpm archpackage/*.gz archpackage/*.xz
  50. rm -f puppypackage/*.gz puppypackage/*.pet slackpackage/*.txz