Makefile 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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}/webadmin
  24. mkdir -p ${DESTDIR}/usr/share/${APP}/utils
  25. mkdir -p ${DESTDIR}/usr/share/${APP}/avatars
  26. mkdir -p ${DESTDIR}/etc/${APP}
  27. cp src/${APP} ${DESTDIR}${PREFIX}/bin
  28. rm -f ${DESTDIR}${PREFIX}/bin/${APP}-*
  29. cp -r image_build/* ${DESTDIR}/etc/${APP}
  30. cp img/backgrounds/${APP}_*.png ${DESTDIR}${PREFIX}/share
  31. cp img/avatars/* ${DESTDIR}/usr/share/${APP}/avatars
  32. cp src/* ${DESTDIR}${PREFIX}/bin
  33. cp src/${APP}-mesh-batman ${DESTDIR}${PREFIX}/bin/batman
  34. cp src/${APP}-backup-local ${DESTDIR}${PREFIX}/bin/backup
  35. cp src/${APP}-backup-local ${DESTDIR}${PREFIX}/bin/backup2friends
  36. cp src/${APP}-restore-local ${DESTDIR}${PREFIX}/bin/restore
  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. cp -r webadmin/* ${DESTDIR}/usr/share/${APP}/webadmin
  51. chown -R root: /usr/share/${APP}
  52. chown root:root /usr/local/bin/${APP}*
  53. chmod -R +r /usr/share/${APP}
  54. # bash -c "./translate install"
  55. /usr/local/bin/${APP}-prepare-scripts
  56. uninstall:
  57. rm -f ${PREFIX}/share/${APP}_*.png
  58. rm -f ${PREFIX}/share/man/man1/backup.1.gz
  59. rm -f ${PREFIX}/share/man/man1/restore.1.gz
  60. rm -f ${PREFIX}/share/man/man1/${APP}*.1.gz
  61. rm -rf ${PREFIX}/share/${APP}
  62. rm -rf /usr/share/${APP}
  63. rm -f ${PREFIX}/bin/${APP}*
  64. rm -f ${PREFIX}/bin/meshavahi
  65. rm -f ${PREFIX}/bin/backup
  66. rm -f ${PREFIX}/bin/backup2friends
  67. rm -f ${PREFIX}/bin/restore
  68. rm -f ${PREFIX}/bin/restorefromfriend
  69. rm -f ${PREFIX}/bin/batman
  70. rm -rf /etc/${APP}
  71. rm -f ${PREFIX}/bin/control
  72. rm -f ${PREFIX}/bin/controluser
  73. rm -f ${PREFIX}/bin/addremove
  74. bash -c "./translate uninstall"
  75. clean:
  76. rm -f \#* \.#* debian/*.substvars debian/*.log src/*~
  77. rm -fr deb.* debian/${APP}
  78. rm -f ../${APP}*.deb ../${APP}*.changes ../${APP}*.asc ../${APP}*.dsc