Makefile 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. APP=freedombone
  2. VERSION=4.00
  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. rm -f \#* \.#* src/*~
  17. rm -fr deb.*
  18. rm -f ../${APP}*.deb ../${APP}*.changes ../${APP}*.asc ../${APP}*.dsc
  19. cd .. && mv ${APP} ${APP}-${VERSION} && tar -zcvf ${APP}_${VERSION}.orig.tar.gz --exclude .git ${APP}-${VERSION}/ && mv ${APP}-${VERSION} ${APP}
  20. install:
  21. mkdir -p ${DESTDIR}${PREFIX}/bin
  22. mkdir -p ${DESTDIR}/usr/share/${APP}/base
  23. mkdir -p ${DESTDIR}/usr/share/${APP}/apps
  24. mkdir -p ${DESTDIR}/usr/share/${APP}/android-app
  25. mkdir -p ${DESTDIR}/usr/share/${APP}/webadmin
  26. mkdir -p ${DESTDIR}/usr/share/${APP}/utils
  27. mkdir -p ${DESTDIR}/usr/share/${APP}/avatars
  28. mkdir -p ${DESTDIR}/etc/${APP}
  29. cp src/${APP} ${DESTDIR}${PREFIX}/bin
  30. rm -f ${DESTDIR}${PREFIX}/bin/${APP}-*
  31. cp -r image_build/* ${DESTDIR}/etc/${APP}
  32. cp img/backgrounds/${APP}_*.png ${DESTDIR}${PREFIX}/share
  33. cp img/avatars/* ${DESTDIR}/usr/share/${APP}/avatars
  34. cp src/view-x-face ${DESTDIR}${PREFIX}/bin
  35. cp src/muttquote-x-face ${DESTDIR}${PREFIX}/bin
  36. cp src/* ${DESTDIR}${PREFIX}/bin
  37. cp src/${APP}-mesh-batman ${DESTDIR}${PREFIX}/bin/batman
  38. cp src/${APP}-backup-local ${DESTDIR}${PREFIX}/bin/backup
  39. cp src/${APP}-backup-local ${DESTDIR}${PREFIX}/bin/backup2friends
  40. cp src/${APP}-restore-local ${DESTDIR}${PREFIX}/bin/restore
  41. rm -f ${DESTDIR}/usr/share/${APP}/base/*
  42. rm -f ${DESTDIR}/usr/share/${APP}/apps/*
  43. rm -f ${DESTDIR}/usr/share/${APP}/utils/*
  44. mv ${DESTDIR}${PREFIX}/bin/${APP}-base-* ${DESTDIR}/usr/share/${APP}/base
  45. mv ${DESTDIR}${PREFIX}/bin/${APP}-app-* ${DESTDIR}/usr/share/${APP}/apps
  46. mv ${DESTDIR}${PREFIX}/bin/${APP}-utils-* ${DESTDIR}/usr/share/${APP}/utils
  47. mkdir -m 755 -p ${DESTDIR}${PREFIX}/share/man/man1
  48. cp man/${APP}.1.gz ${DESTDIR}${PREFIX}/share/man/man1
  49. rm ${DESTDIR}${PREFIX}/share/man/man1/${APP}*.1.gz
  50. cp man/*.1.gz ${DESTDIR}${PREFIX}/share/man/man1
  51. cp man/${APP}-backup-local.1.gz ${DESTDIR}${PREFIX}/share/man/man1/backup.1.gz
  52. cp man/${APP}-restore-local.1.gz ${DESTDIR}${PREFIX}/share/man/man1/restore.1.gz
  53. cp img/android-app/*.png ${DESTDIR}/usr/share/${APP}/android-app
  54. cp -r webadmin/* ${DESTDIR}/usr/share/${APP}/webadmin
  55. chown -R root: /usr/share/${APP}
  56. chown root:root /usr/local/bin/${APP}*
  57. chmod -R +r /usr/share/${APP}
  58. # bash -c "./translate install"
  59. cp src/${APP}-email-remove-html /usr/bin/remove_html
  60. /usr/local/bin/${APP}-prepare-scripts
  61. uninstall:
  62. rm -f ${PREFIX}/share/${APP}_*.png
  63. rm -f ${PREFIX}/share/man/man1/backup.1.gz
  64. rm -f ${PREFIX}/share/man/man1/restore.1.gz
  65. rm -f ${PREFIX}/share/man/man1/${APP}*.1.gz
  66. rm -rf ${PREFIX}/share/${APP}
  67. rm -rf /usr/share/${APP}
  68. rm -f ${PREFIX}/bin/${APP}*
  69. rm -f ${PREFIX}/bin/meshavahi
  70. rm -f ${PREFIX}/bin/backup
  71. rm -f ${PREFIX}/bin/backup2friends
  72. rm -f ${PREFIX}/bin/restore
  73. rm -f ${PREFIX}/bin/restorefromfriend
  74. rm -f ${PREFIX}/bin/batman
  75. rm -rf /etc/${APP}
  76. rm -f ${PREFIX}/bin/control
  77. rm -f ${PREFIX}/bin/controluser
  78. rm -f ${PREFIX}/bin/addremove
  79. rm -f ${PREFIX}/bin/view-x-face
  80. rm -f ${PREFIX}/bin/muttquote-x-face
  81. rm -f /usr/bin/remove_html
  82. bash -c "./translate uninstall"
  83. clean:
  84. rm -f \#* \.#* src/*~
  85. rm -fr deb.*
  86. rm -f ../${APP}*.deb ../${APP}*.changes ../${APP}*.asc ../${APP}*.dsc