RoundCube Webmail
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

89 lines
4.5 KiB

  1. #
  2. # This file is used by developers to build release packages
  3. #
  4. GITREMOTE=https://github.com/roundcube/roundcubemail.git
  5. GITBRANCH=release-1.6
  6. GPGKEY=devs@roundcube.net
  7. VERSION=1.6-git
  8. SEDI=sed -i
  9. PHP_VERSION=7.3
  10. UNAME_S := $(shell uname -s)
  11. ifeq ($(UNAME_S),Darwin)
  12. SEDI=sed -i ''
  13. endif
  14. all: clean complete dependent framework
  15. complete: roundcubemail-git
  16. cp -RH roundcubemail-git roundcubemail-$(VERSION)
  17. (cd roundcubemail-$(VERSION); cp composer.json-dist composer.json)
  18. (cd roundcubemail-$(VERSION); php /tmp/composer.phar config platform.php $(PHP_VERSION))
  19. (cd roundcubemail-$(VERSION); php /tmp/composer.phar require "kolab/net_ldap3:~1.1.1" --no-update --no-install)
  20. (cd roundcubemail-$(VERSION); php /tmp/composer.phar config --unset suggest.kolab/net_ldap3)
  21. (cd roundcubemail-$(VERSION); php /tmp/composer.phar config --unset require-dev)
  22. (cd roundcubemail-$(VERSION); php /tmp/composer.phar install --prefer-dist --no-dev --no-interaction)
  23. (cd roundcubemail-$(VERSION); php /tmp/composer.phar config --unset platform)
  24. (cd roundcubemail-$(VERSION); bin/install-jsdeps.sh --force)
  25. (cd roundcubemail-$(VERSION); bin/jsshrink.sh program/js/publickey.js; bin/jsshrink.sh plugins/managesieve/codemirror/lib/codemirror.js)
  26. (cd roundcubemail-$(VERSION); rm -f jsdeps.json bin/install-jsdeps.sh *.orig; rm -rf temp/js_cache)
  27. (cd roundcubemail-$(VERSION); rm -rf vendor/pear/*/tests vendor/*/*/.git* vendor/*/*/.travis* vendor/*/*/phpunit.xml.dist vendor/pear/console_commandline/docs vendor/pear/net_ldap2/doc vendor/bacon/bacon-qr-code/test vendor/dasprid/enum/test)
  28. (cd roundcubemail-$(VERSION); echo "// generated by Roundcube install $(VERSION)" >> vendor/autoload.php)
  29. tar czf roundcubemail-$(VERSION)-complete.tar.gz roundcubemail-$(VERSION)
  30. rm -rf roundcubemail-$(VERSION)
  31. dependent: roundcubemail-git
  32. cp -RH roundcubemail-git roundcubemail-$(VERSION)
  33. tar czf roundcubemail-$(VERSION).tar.gz roundcubemail-$(VERSION)
  34. rm -rf roundcubemail-$(VERSION)
  35. framework: roundcubemail-git /tmp/phpDocumentor.phar
  36. cp -r roundcubemail-git/program/lib/Roundcube roundcube-framework-$(VERSION)
  37. (cd roundcube-framework-$(VERSION); php /tmp/phpDocumentor.phar -d . -t ./doc --title="Roundcube Framework" --defaultpackagename="Framework" --template="clean")
  38. (cd roundcube-framework-$(VERSION); rm -rf doc/phpdoc-cache* .phpdoc)
  39. tar czf roundcube-framework-$(VERSION).tar.gz roundcube-framework-$(VERSION)
  40. rm -rf roundcube-framework-$(VERSION)
  41. sign:
  42. gpg -u $(GPGKEY) -a --detach-sig roundcubemail-$(VERSION).tar.gz
  43. gpg -u $(GPGKEY) -a --detach-sig roundcubemail-$(VERSION)-complete.tar.gz
  44. gpg -u $(GPGKEY) -a --detach-sig roundcube-framework-$(VERSION).tar.gz
  45. verify:
  46. gpg -v --verify roundcubemail-$(VERSION).tar.gz.asc roundcubemail-$(VERSION).tar.gz
  47. gpg -v --verify roundcubemail-$(VERSION)-complete.tar.gz.asc roundcubemail-$(VERSION)-complete.tar.gz
  48. gpg -v --verify roundcube-framework-$(VERSION).tar.gz.asc roundcube-framework-$(VERSION).tar.gz
  49. shasum:
  50. shasum -a 256 roundcubemail-$(VERSION).tar.gz roundcubemail-$(VERSION)-complete.tar.gz roundcube-framework-$(VERSION).tar.gz
  51. roundcubemail-git: buildtools
  52. git clone --branch=$(GITBRANCH) --depth=1 $(GITREMOTE) roundcubemail-git
  53. (cd roundcubemail-git; bin/jsshrink.sh; bin/updatecss.sh; bin/cssshrink.sh)
  54. (cd roundcubemail-git/skins/elastic; \
  55. lessc --clean-css="--s1 --advanced" styles/styles.less > styles/styles.min.css; \
  56. lessc --clean-css="--s1 --advanced" styles/print.less > styles/print.min.css; \
  57. lessc --clean-css="--s1 --advanced" styles/embed.less > styles/embed.min.css)
  58. (cd roundcubemail-git/bin; rm -f transifexpull.sh package2composer.sh)
  59. (cd roundcubemail-git; find . -name '.gitignore' | xargs rm -f)
  60. (cd roundcubemail-git; find . -name '.travis.yml' | xargs rm -f)
  61. (cd roundcubemail-git; rm -rf tests plugins/*/tests .git* .tx* .ci* .editorconfig* index-test.php Dockerfile Makefile)
  62. (cd roundcubemail-git; $(SEDI) 's/1.6-git/$(VERSION)/' index.php public_html/index.php installer/index.php program/include/iniset.php program/lib/Roundcube/bootstrap.php)
  63. (cd roundcubemail-git; $(SEDI) 's/# Unreleased/# Release $(VERSION)'/ CHANGELOG.md)
  64. buildtools: /tmp/composer.phar
  65. npm install uglify-js
  66. npm install lessc
  67. npm install less-plugin-clean-css
  68. npm install csso-cli
  69. /tmp/composer.phar:
  70. curl -sS https://getcomposer.org/installer | php -- --install-dir=/tmp/
  71. /tmp/phpDocumentor.phar:
  72. curl -sSL https://phpdoc.org/phpDocumentor.phar -o /tmp/phpDocumentor.phar
  73. clean:
  74. rm -rf roundcubemail-git
  75. rm -rf roundcubemail-$(VERSION)*