mk-local.mk 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. #! /usr/bin/make -f
  2. #* #ident "$Id: $"
  3. #* @author: rzr@gna.org - rev: $Author: rzr$
  4. #* Copyright: See README file that comes with this distribution
  5. #*****************************************************************************
  6. default: help
  7. package?=redak
  8. #version?=0.0.0
  9. version?=0.6.0
  10. #TODO: upgrade with yours
  11. #qtcreator?=/usr/local/opt/QtSDK/QtCreator/bin/qtcreator
  12. qtcreator?=qtcreator
  13. help:
  14. @echo "edit"
  15. edit: clean
  16. ${qtcreator} *.pro
  17. rule/android/edit: clean
  18. /usr/local/opt/necessitas/QtCreator/bin/necessitas \
  19. *.pro
  20. #TODO
  21. rule/android/configure:
  22. /usr/local/opt/android-sdk-linux/tools/android update project -t android-7 -p android
  23. clean:
  24. rm -rf ../redak-build-* *.o moc_*.cpp *~ Makefile
  25. -cat 'debian/clean' | while read t ; do rm -rv "$${t}" ; done
  26. distclean: clean
  27. cat debian/clean.txt | while read t ; do rm -rfv "$${t}" ; done
  28. rm -rvf *.user *.zip *.sis *~ *.so *.tmp
  29. rm -rvf obj ./android/bin android/assets/qml/redak android/libs/armeabi
  30. find . -iname "*~" -exec rm -v '{}' \;
  31. find . -iname "*.class" -exec rm -v '{}' \;
  32. find . -iname "*.apk" -exec rm -v '{}' \;
  33. chmod a-rx *.cpp *.h *.pro *.png *.svg *.spec *.txt
  34. chmod a-rx COPYING
  35. chmod -Rv a+rX .
  36. rm -fv *.pkg
  37. rm -fv *.autosave
  38. dist: distclean COPYING release rule/local/release
  39. rule/diff/common: qml/${package}/meego qml/${package}/common
  40. meld $^
  41. COPYING: /usr/share/common-licenses/GPL-3
  42. cp -a $< $@
  43. debian/diff: debian qtc_packaging/debian_harmattan
  44. meld $^
  45. diff: qml/${package}/meego qml/${package}/symbian
  46. meld $^
  47. install:
  48. -ls ../${package}*/*.sis
  49. -ls ../redak-build-remote/redak_qt-4_7_4_symbianBelle.sis
  50. ln -fs $(pwd)/../*/*.sis ~/public_html/pub/file/
  51. deploy:
  52. find ${CURDIR}-build-remote/ -type f -iname "*.sis" \
  53. | while read t ; do ln -fs $${t} ~/public_html/pub/file/ ; done
  54. all:
  55. qmake-qt4
  56. make CXXFLAGS=-fPIC
  57. run: qml/${package}/common/main.qml all
  58. qmlviewer -maximized -P ${CURDIR}/ $<
  59. run/py: ${package}.py
  60. ${<D}/${<F}
  61. test:distclean all run clean
  62. debuild:distclean
  63. fakeroot ./debian/rules binary
  64. dpkg --contents ../*.deb
  65. dep/desktop:
  66. ${sudo} apt-get install \
  67. libqt4-declarative-folderlistmodel libqt4-dev
  68. dep/harmattan:
  69. ${sudo} apt-get install \
  70. applauncherd-dev pkg-config make
  71. #%: rule/local/%
  72. release: distclean rule/local/release
  73. rule/version:
  74. # echo '${version}' | tee -a VERSION.txt
  75. sed -e "s/^var g_version.*/var g_version = \"${version}\" ;/g" -i 'qml/redak/common/script.js'
  76. sed -e "s/^[ ]*VERSION.*/VERSION=${version}/g" -i redak.pro
  77. sed -e "s/^Version:.*/Version: ${version}/g" -i redak.spec
  78. echo "# TODO: check debian/changelog *.changes *.pkg"
  79. check/release:
  80. @echo "# check version in script.js debian/changelog "
  81. grep -r -i 'g_version' qml/redak/common/script.js
  82. grep 'Version:' ${package}.spec
  83. rule/local/%:
  84. echo "todo: $@"
  85. redak64.png: redak.svg mk-local.mk
  86. convert -resize 64x64 $< $@
  87. convert/%: redak.svg mk-local.mk
  88. convert -resize ${@F}x${@F} $< tmp-${@F}.png
  89. icon.txt.tmp: redak.svg mk-local.mk
  90. convert -resize 26x26 $< tmp.png
  91. base64 < tmp.png | tr -d '\n' > $@
  92. wc $@
  93. rm -f tmp.png
  94. # custom rules
  95. rule/build/platform/symbian: qml
  96. grep -re "import Qt.labs.folderlistmodel 1.1" qml | grep -ve '[^:]*://' || echo "ok"
  97. @echo "todo: deploy ovi wizard"
  98. rule/install/platform/symbian: qml
  99. grep DEPLOY_TARGET bld.inf
  100. md5sum *.sis | tee -a README.txt
  101. @echo "todo: upload: redak_installer_unsigned.sis"
  102. @echo "todo: https://publish.nokia.com/download_items/show/475539#item"
  103. -include ~/bin/mk-local.mk