1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. APP=freedombone
  2. VERSION=1.02
  3. RELEASE=1
  4. PREFIX?=/usr/local
  5. all:
  6. debug:
  7. translations:
  8. bash -c "./translate make"
  9. rmtranslations:
  10. bash -c "./translate remove"
  11. alltranslations:
  12. bash -c "./translate translations"
  13. tidy:
  14. ./tidyup src/*
  15. source:
  16. tar -cvf ../${APP}_${VERSION}.orig.tar ../${APP}-${VERSION} --exclude-vcs
  17. gzip -f9n ../${APP}_${VERSION}.orig.tar
  18. install:
  19. mkdir -p ${DESTDIR}${PREFIX}/bin
  20. mkdir -p ${DESTDIR}/usr/share/${APP}/base
  21. mkdir -p ${DESTDIR}/usr/share/${APP}/apps
  22. mkdir -p ${DESTDIR}/usr/share/${APP}/android-app
  23. mkdir -p ${DESTDIR}/usr/share/${APP}/utils
  24. mkdir -p ${DESTDIR}/usr/share/${APP}/avatars
  25. mkdir -p ${DESTDIR}/etc/${APP}
  26. cp src/${APP} ${DESTDIR}${PREFIX}/bin
  27. rm -f ${DESTDIR}${PREFIX}/bin/${APP}-*
  28. cp -r image_build/* ${DESTDIR}/etc/${APP}
  29. cp img/backgrounds/${APP}_*.png ${DESTDIR}${PREFIX}/share
  30. cp img/avatars/* ${DESTDIR}/usr/share/${APP}/avatars
  31. cp src/* ${DESTDIR}${PREFIX}/bin
  32. cp src/${APP}-mesh-batman ${DESTDIR}${PREFIX}/bin/batman
  33. cp src/${APP}-backup-local ${DESTDIR}${PREFIX}/bin/backup
  34. cp src/${APP}-backup-local ${DESTDIR}${PREFIX}/bin/backup2friends
  35. cp src/${APP}-restore-local ${DESTDIR}${PREFIX}/bin/restore
  36. cp src/${APP}-restore-remote ${DESTDIR}${PREFIX}/bin/restorefromfriend
  37. rm -f ${DESTDIR}/usr/share/${APP}/base/*
  38. rm -f ${DESTDIR}/usr/share/${APP}/apps/*
  39. rm -f ${DESTDIR}/usr/share/${APP}/utils/*
  40. mv ${DESTDIR}${PREFIX}/bin/${APP}-base-* ${DESTDIR}/usr/share/${APP}/base
  41. mv ${DESTDIR}${PREFIX}/bin/${APP}-app-* ${DESTDIR}/usr/share/${APP}/apps
  42. mv ${DESTDIR}${PREFIX}/bin/${APP}-utils-* ${DESTDIR}/usr/share/${APP}/utils
  43. mkdir -m 755 -p ${DESTDIR}${PREFIX}/share/man/man1
  44. cp man/${APP}.1.gz ${DESTDIR}${PREFIX}/share/man/man1
  45. rm ${DESTDIR}${PREFIX}/share/man/man1/${APP}*.1.gz
  46. cp man/*.1.gz ${DESTDIR}${PREFIX}/share/man/man1
  47. cp man/${APP}-backup-local.1.gz ${DESTDIR}${PREFIX}/share/man/man1/backup.1.gz
  48. cp man/${APP}-restore-local.1.gz ${DESTDIR}${PREFIX}/share/man/man1/restore.1.gz
  49. cp img/android-app/*.png ${DESTDIR}/usr/share/${APP}/android-app
  50. chown -R root: /usr/share/${APP}
  51. chmod -R +r /usr/share/${APP}
  52. # bash -c "./translate install"
  53. /usr/local/bin/${APP}-prepare-scripts
  54. uninstall:
  55. rm -f ${PREFIX}/share/${APP}_*.png
  56. rm -f ${PREFIX}/share/man/man1/backup.1.gz
  57. rm -f ${PREFIX}/share/man/man1/restore.1.gz
  58. rm -f ${PREFIX}/share/man/man1/${APP}*.1.gz
  59. rm -rf ${PREFIX}/share/${APP}
  60. rm -rf /usr/share/${APP}
  61. rm -f ${PREFIX}/bin/${APP}*
  62. rm -f ${PREFIX}/bin/meshavahi
  63. rm -f ${PREFIX}/bin/backup
  64. rm -f ${PREFIX}/bin/backup2friends
  65. rm -f ${PREFIX}/bin/restore
  66. rm -f ${PREFIX}/bin/restorefromfriend
  67. rm -f ${PREFIX}/bin/batman
  68. rm -rf /etc/${APP}
  69. rm -f ${PREFIX}/bin/control
  70. rm -f ${PREFIX}/bin/controluser
  71. rm -f ${PREFIX}/bin/addremove
  72. bash -c "./translate uninstall"
  73. clean:
  74. rm -f \#* \.#* debian/*.substvars debian/*.log src/*~
  75. rm -fr deb.* debian/${APP}
  76. rm -f ../${APP}*.deb ../${APP}*.changes ../${APP}*.asc ../${APP}*.dsc