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.

96 lines
4.7 KiB

  1. #
  2. # This file is used by developers to build release packages
  3. #
  4. GITREMOTE=https://github.com/roundcube/roundcubemail.git
  5. GITBRANCH=master
  6. GPGKEY=devs@roundcube.net
  7. VERSION=1.7-git
  8. SEDI=sed -i
  9. PHP_VERSION=8.1
  10. PATH := $(PATH):$(PWD)/node_modules/.bin
  11. UNAME_S := $(shell uname -s)
  12. ifeq ($(UNAME_S),Darwin)
  13. SEDI=sed -i ''
  14. endif
  15. all: clean complete dependent framework
  16. complete: roundcubemail-git
  17. cp -RH roundcubemail-git roundcubemail-$(VERSION)
  18. (cd roundcubemail-$(VERSION); php /tmp/composer.phar config version $(VERSION))
  19. (cd roundcubemail-$(VERSION); php /tmp/composer.phar config platform.php $(PHP_VERSION))
  20. (cd roundcubemail-$(VERSION); php /tmp/composer.phar require "kolab/net_ldap3:~1.1.4" --no-update --no-install)
  21. (cd roundcubemail-$(VERSION); php /tmp/composer.phar config --unset suggest.kolab/net_ldap3)
  22. (cd roundcubemail-$(VERSION); php /tmp/composer.phar config --unset require-dev)
  23. (cd roundcubemail-$(VERSION); php /tmp/composer.phar config --unset autoload-dev)
  24. (cd roundcubemail-$(VERSION); php /tmp/composer.phar config --unset repositories)
  25. (cd roundcubemail-$(VERSION); php /tmp/composer.phar update --prefer-dist --no-dev --no-interaction)
  26. (cd roundcubemail-$(VERSION); php /tmp/composer.phar config --unset platform)
  27. (cd roundcubemail-$(VERSION); bin/install-jsdeps.sh --force)
  28. (cd roundcubemail-$(VERSION); bin/jsshrink.sh program/js/publickey.js; bin/jsshrink.sh plugins/managesieve/codemirror/lib/codemirror.js)
  29. (cd roundcubemail-$(VERSION); rm -f jsdeps.json bin/install-jsdeps.sh *.orig; rm -rf temp/js_cache)
  30. (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)
  31. (cd roundcubemail-$(VERSION); echo "// generated by Roundcube install $(VERSION)" >> vendor/autoload.php)
  32. tar czf roundcubemail-$(VERSION)-complete.tar.gz roundcubemail-$(VERSION)
  33. rm -rf roundcubemail-$(VERSION)
  34. dependent: roundcubemail-git
  35. cp -RH roundcubemail-git roundcubemail-$(VERSION)
  36. tar czf roundcubemail-$(VERSION).tar.gz roundcubemail-$(VERSION)
  37. rm -rf roundcubemail-$(VERSION)
  38. framework: roundcubemail-git /tmp/phpDocumentor.phar
  39. cp -r roundcubemail-git/program/lib/Roundcube roundcube-framework-$(VERSION)
  40. (cd roundcube-framework-$(VERSION); XDEBUG_MODE=off php /tmp/phpDocumentor.phar run -d . -t ./doc --title="Roundcube Framework" --defaultpackagename="Framework")
  41. (cd roundcube-framework-$(VERSION); rm -rf .phpdoc)
  42. tar czf roundcube-framework-$(VERSION).tar.gz roundcube-framework-$(VERSION)
  43. rm -rf roundcube-framework-$(VERSION)
  44. sign:
  45. gpg -u $(GPGKEY) -a --detach-sig roundcubemail-$(VERSION).tar.gz
  46. gpg -u $(GPGKEY) -a --detach-sig roundcubemail-$(VERSION)-complete.tar.gz
  47. gpg -u $(GPGKEY) -a --detach-sig roundcube-framework-$(VERSION).tar.gz
  48. verify:
  49. gpg -v --verify roundcubemail-$(VERSION).tar.gz.asc roundcubemail-$(VERSION).tar.gz
  50. gpg -v --verify roundcubemail-$(VERSION)-complete.tar.gz.asc roundcubemail-$(VERSION)-complete.tar.gz
  51. gpg -v --verify roundcube-framework-$(VERSION).tar.gz.asc roundcube-framework-$(VERSION).tar.gz
  52. shasum:
  53. shasum -a 256 roundcubemail-$(VERSION).tar.gz roundcubemail-$(VERSION)-complete.tar.gz roundcube-framework-$(VERSION).tar.gz
  54. roundcubemail-git: buildtools
  55. git clone --branch=$(GITBRANCH) --depth=1 $(GITREMOTE) roundcubemail-git
  56. (cd roundcubemail-git; bin/jsshrink.sh; bin/updatecss.sh; bin/cssshrink.sh)
  57. (cd roundcubemail-git/skins/elastic && make 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 package.json package-lock.json node_modules)
  62. (cd roundcubemail-git; rm -f .eslintrc.js .php-cs-fixer.dist.php phpstan.neon.dist CODE_OF_CONDUCT.md SOCIAL_WORK_GUIDELINES.md)
  63. (cd roundcubemail-git; $(SEDI) 's/1.7-git/$(VERSION)/' program/include/iniset.php program/lib/Roundcube/bootstrap.php)
  64. (cd roundcubemail-git; $(SEDI) 's/# Unreleased/# Release $(VERSION)'/ CHANGELOG.md)
  65. buildtools: /tmp/composer.phar npm-install
  66. npm-install:
  67. npm install --include=dev --omit=optional
  68. /tmp/composer.phar:
  69. curl -sS https://getcomposer.org/installer | php -- --install-dir=/tmp/
  70. /tmp/phpDocumentor.phar:
  71. curl -sSL https://phpdoc.org/phpDocumentor.phar -o /tmp/phpDocumentor.phar
  72. clean:
  73. rm -rf roundcubemail-git
  74. rm -rf roundcubemail-$(VERSION)*
  75. rm -f /tmp/composer.phar /tmp/phpDocumentor.phar
  76. clean-untracked-minified:
  77. git status -s | awk '/^\?\? .*.min.(js|css)/ { print $$2 }' | xargs rm -v
  78. css-elastic: npm-install
  79. cd skins/elastic && make css