├── .build.mk ├── .editorconfig ├── .gitattributes ├── .github └── workflows │ └── build-and-deploy.yml ├── .gitignore ├── .travis.mk ├── .travis.yml.old ├── CHANGELOG.md ├── LICENSE ├── README.md ├── build.tpl ├── build └── .gitignore ├── builder ├── check.mk ├── config.mk ├── ius.mk └── patching.mk ├── ci ├── export-buildtab.sh ├── install-php.sh ├── install-re2c.sh ├── install-zephir-parser.sh ├── install-zephir.sh ├── phalcon.ini ├── prepare-debian.sh ├── prepare-rpm.sh ├── regenerate-build.sh └── setup-build.sh ├── debian ├── changelog ├── compat ├── controls │ ├── legacy │ ├── php-7.0 │ ├── php-7.1 │ ├── php-7.2 │ ├── php-7.3 │ └── php-7.4 ├── copyright ├── phalcon.ini ├── postinsts │ ├── legacy │ ├── php-7.0 │ ├── php-7.1 │ ├── php-7.2 │ ├── php-7.3 │ └── php-7.4 ├── prebuild.sh ├── preinsts │ ├── legacy │ ├── php-7.0 │ ├── php-7.1 │ ├── php-7.2 │ ├── php-7.3 │ └── php-7.4 ├── rules ├── source.lintian-overrides └── source │ ├── format │ └── options ├── environment ├── gh-84.patch ├── gh-97.patch └── rpm └── specs ├── remi-php-5.5.spec ├── remi-php-5.6.spec ├── remi-php-7.0.spec ├── remi-php-7.1.spec ├── remi-php-7.2.spec ├── remi-php-7.3.spec └── remi-php-7.4.spec /.build.mk: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | # 3 | # This file is part of the Phalcon Builder. 4 | # 5 | # (c) Phalcon Team 6 | # 7 | # For the full copyright and license information, please view 8 | # the LICENSE file that was distributed with this source code. 9 | # 10 | # If you did not receive a copy of the license it is available 11 | # through the world-wide-web at the following url: 12 | # https://license.phalcon.io 13 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: http://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | [*] 7 | end_of_line = lf 8 | insert_final_newline = true 9 | indent_style = tab 10 | tab_width = 4 11 | charset = utf-8 12 | trim_trailing_whitespace = true 13 | 14 | [*.md] 15 | indent_style = space 16 | indent_size = 4 17 | trim_trailing_whitespace = false 18 | 19 | [.travis.yml] 20 | indent_style = space 21 | indent_size = 2 22 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.mk linguist-language=Makefile 2 | debian/rules linguist-language=Makefile 3 | 4 | environment linguist-language=Shell 5 | debian/postinsts/* linguist-language=Shell 6 | debian/preinsts/* linguist-language=Shell 7 | 8 | rpm/specs/*.spec linguist-language=RPM Spec 9 | -------------------------------------------------------------------------------- /.github/workflows/build-and-deploy.yml: -------------------------------------------------------------------------------- 1 | name: Build & deploy 2 | 3 | on: 4 | schedule: 5 | - cron: '0 2 * * *' # Daily at 02:00 runs only on default branch 6 | push: 7 | paths-ignore: 8 | - '**.md' 9 | - '**.txt' 10 | 11 | jobs: 12 | build: 13 | strategy: 14 | fail-fast: false 15 | matrix: 16 | os_dist: [ 17 | "ubuntu/trusty", "ubuntu/xenial", "ubuntu/bionic", "ubuntu/focal", 18 | "debian/stretch", "debian/buster", 19 | "el/7" 20 | ] 21 | php: [7.3, 7.4] 22 | branch: ["v4.1.2"] 23 | packagecloud_repo: ["stable-41"] 24 | 25 | exclude: 26 | - os_dist: "ubuntu/trusty" 27 | php: 7.4 28 | 29 | runs-on: ubuntu-18.04 30 | # continue-on-error: ${{ matrix.experimental }} 31 | 32 | name: ${{ matrix.os_dist }} - PHP${{ matrix.php }} with ${{ matrix.branch }} 33 | 34 | env: 35 | # OS: ${{ matrix.os }} 36 | # DIST: ${{ matrix.dist }} 37 | # PACKAGE: ${{ matrix.package }} 38 | CLONE_BRANCH: ${{ matrix.branch }} 39 | PHP_VERSION: ${{ matrix.php }} 40 | PACKAGECLOUD_REPO: ${{ matrix.packagecloud_repo }} 41 | PHP_EXTENSIONS: memcached, psr, redis 42 | 43 | # 44 | PRODUCT: "php-phalcon" 45 | PRODUCT_GIT: "https://github.com/phalcon/cphalcon.git" 46 | 47 | DOCKER_REPO: "phalconphp/build" 48 | 49 | TARGET: "package" 50 | RE2C_VERSION: "1.1.1" 51 | 52 | # To build 3.x branch use 53 | # ZEPHIR_VERSION >= 0.10.0 (for example 0.10.16) 54 | # ZEPHIR_PARSER_VERSION >= v1.1.x (for example v1.1.4) 55 | # To build 4.x branch use 56 | # ZEPHIR_VERSION >= 0.11.0 (for example 0.12.15) 57 | # ZEPHIR_PARSER_VERSION >= v1.2.x (for example v1.3.3) 58 | ZEPHIR_VERSION: "0.12.21" 59 | ZEPHIR_PARSER_VERSION: "v1.3.6" 60 | 61 | ZEND_BACKEND: "--backend=ZendEngine3" 62 | STABLE_BUILD_VERSION: "1" 63 | 64 | STABLE_BRANCH: "v3.4.5" 65 | MAINLINE_BRANCH: "v4.1.2" 66 | NIGHTLY_BRANCH: "4.1.x" 67 | 68 | PACKAGECLOUD_USER: "phalcon" 69 | 70 | PACKAGECLOUD_STABLE_REPO: "stable" 71 | PACKAGECLOUD_MAINLINE_REPO: "mainline" 72 | PACKAGECLOUD_NIGHTLY_REPO: "nightly" 73 | 74 | steps: 75 | - uses: actions/checkout@v2 76 | with: 77 | fetch-depth: 1 78 | 79 | # Setup PHP 80 | # - name: Setup cache environment 81 | # id: extcache 82 | # uses: shivammathur/cache-extensions@v1 83 | # with: 84 | # php-version: ${{ matrix.php }} 85 | # extensions: ${{ env.PHP_EXTENSIONS }} 86 | # key: "phalcon-packagecloud-v1" 87 | 88 | # - name: Cache extensions 89 | # uses: actions/cache@v2 90 | # with: 91 | # path: ${{ steps.extcache.outputs.dir }} 92 | # key: ${{ steps.extcache.outputs.key }} 93 | # restore-keys: ${{ steps.extcache.outputs.key }} 94 | 95 | - name: Setup PHP 96 | uses: shivammathur/setup-php@v2 97 | with: 98 | php-version: ${{ matrix.php }} 99 | extensions: ${{ env.PHP_EXTENSIONS }} 100 | 101 | - name: Declare extra environment variables 102 | run: | 103 | IFS=';' read -ra os_dist <<< $(echo ${{ matrix.os_dist }} | tr -s "/" ";") 104 | echo "OS=${os_dist[0]}" >> $GITHUB_ENV 105 | echo "DIST=${os_dist[1]}" >> $GITHUB_ENV 106 | 107 | echo "MAINLINE_BUILD_VERSION=${GITHUB_RUN_NUMBER}" >> $GITHUB_ENV 108 | echo "NIGHTLY_BUILD_VERSION=${GITHUB_RUN_NUMBER}" >> $GITHUB_ENV 109 | echo "SOURCEDIR=${GITHUB_WORKSPACE}/cphalcon" >> $GITHUB_ENV 110 | echo "PHP_FULL_VERSION=$(php-config --version)" >> $GITHUB_ENV 111 | echo "PHP_SEM_VERSION=$(php -r "echo current(explode('-', PHP_VERSION));")" >> $GITHUB_ENV 112 | 113 | - name: Prepare OS 114 | run: | 115 | if [ $OS != "el" ]; then 116 | echo "PACKAGE=deb" >> $GITHUB_ENV; 117 | ./ci/prepare-debian.sh; 118 | fi 119 | 120 | if [ $OS = "el" ]; then 121 | echo "PACKAGE=rpm" >> $GITHUB_ENV; 122 | echo "REPO_VENDOR=ius" >> $GITHUB_ENV; 123 | 124 | export REPO_VENDOR="ius"; 125 | ./ci/prepare-rpm.sh; 126 | fi 127 | 128 | - name: Clone cphalcon 129 | uses: actions/checkout@v2 130 | with: 131 | fetch-depth: 1 132 | repository: phalcon/cphalcon 133 | ref: ${{ env.CLONE_BRANCH }} 134 | path: cphalcon 135 | 136 | - run: ./ci/regenerate-build.sh 137 | 138 | - name: Install 139 | run: | 140 | ./ci/install-re2c.sh 141 | ./ci/install-zephir-parser.sh 142 | ./ci/install-zephir.sh 143 | 144 | - run: make -f .travis.mk ${{ env.TARGET }} 145 | 146 | - run: ls -la build/ 147 | 148 | - name: Push package to phalcon/${{ matrix.packagecloud_repo }}/${{ matrix.os_dist }} 149 | if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') 150 | run: | 151 | sudo gem install rake 152 | sudo gem install package_cloud 153 | package_cloud push phalcon/${{ matrix.packagecloud_repo }}/${{ matrix.os_dist }} build/*.${{ env.PACKAGE }} 154 | env: 155 | PACKAGECLOUD_TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }} 156 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Please do not use this ignore file to define platform specific files. 2 | # 3 | # For these purposes create a global .gitignore file, which is a list of rules 4 | # for ignoring files in every Git repository on your computer. 5 | # 6 | # https://help.github.com/articles/ignoring-files/#create-a-global-gitignore 7 | 8 | /packpack 9 | /cphalcon 10 | *.tmp 11 | -------------------------------------------------------------------------------- /.travis.mk: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | # -*- makefile -*- 3 | # 4 | # This file is part of the Phalcon Builder. 5 | # 6 | # (c) Phalcon Team 7 | # 8 | # For the full copyright and license information, please view 9 | # the LICENSE file that was distributed with this source code. 10 | # 11 | # If you did not receive a copy of the license it is available 12 | # through the world-wide-web at the following url: 13 | # https://license.phalcon.io 14 | 15 | SHELL := $(shell which bash) 16 | SCRIPTDIR := ${CURDIR} 17 | D_TARGETS = report prepare-build 18 | 19 | .EXPORT_ALL_VARIABLES: ; # send all vars to shell 20 | 21 | include $(SCRIPTDIR)/builder/config.mk 22 | include $(SCRIPTDIR)/builder/check.mk 23 | include $(SCRIPTDIR)/builder/patching.mk 24 | 25 | $(SCRIPTDIR)/packpack: 26 | $(shell git clone $(PACK_REPO) $(SCRIPTDIR)/packpack) 27 | $(shell cd $(SCRIPTDIR)/packpack && git checkout -qf $(PACK_COMMIT)) 28 | $(info -------------------------------------------------------------------) 29 | $(info Patching packpak...) 30 | $(shell cd $(SCRIPTDIR)/packpack && git apply $(SCRIPTDIR)/gh-84.patch) 31 | $(shell cd $(SCRIPTDIR)/packpack && git apply $(SCRIPTDIR)/gh-97.patch) 32 | 33 | .PHONY: source 34 | source: $(D_TARGETS) $(SCRIPTDIR)/packpack 35 | $(info Create tarball...) 36 | TARBALL_COMPRESSOR=gz $(SCRIPTDIR)/packpack/packpack tarball 37 | 38 | .PHONY: package 39 | package: $(D_TARGETS) $(SCRIPTDIR)/packpack 40 | $(info Build package...) 41 | $(SCRIPTDIR)/packpack/packpack 42 | 43 | .PHONY: report 44 | report: 45 | $(info ) 46 | $(info Product ............................: $(PRODUCT)) 47 | $(info ) 48 | $(info Source path ........................: $(SOURCEDIR)) 49 | $(info Build path .........................: $(BUILDDIR)) 50 | $(info Current path .......................: $(SCRIPTDIR)) 51 | $(info ) 52 | $(info Stable branch/tag ..................: $(STABLE_BRANCH)) 53 | $(info Mainline branch/tag ................: $(MAINLINE_BRANCH)) 54 | $(info Nightly branch/tag .................: $(NIGHTLY_BRANCH)) 55 | $(info Current working branch/tag .........: $(CLONE_BRANCH)) 56 | $(info Travis build number ................: $(TRAVIS_BUILD_NUMBER)) 57 | $(info ) 58 | $(info Zephir version .....................: $(ZEPHIR_VERSION)) 59 | $(info Zephir Parser version ..............: $(ZEPHIR_PARSER_VERSION)) 60 | $(info ) 61 | $(info Build release ......................: $(RELEASE)) 62 | $(info Revision ...........................: $(REVISION)) 63 | $(info Semantic version: ..................: $(VERSION)) 64 | $(info Full version name ..................: $(VERSION_FULL)) 65 | $(info ) 66 | $(info Used PHP version ...................: $(PHP_VERSION)) 67 | $(info PHP major version ..................: $(PHP_MAJOR)) 68 | $(info PHP full version ...................: $(PHP_FULL_VERSION)) 69 | $(info PHP semantic version ...............: $(PHP_SEM_VERSION)) 70 | $(info Zend Engine backend ................: $(ZEND_BACKEND)) 71 | $(info ) 72 | $(info Repo vendor ........................: $(REPO_VENDOR)) 73 | $(info OS .................................: $(OS)) 74 | $(info Build OS ...........................: $(BUILD_OS)) 75 | $(info Distrib. version ...................: $(DIST)) 76 | $(info ) 77 | $(info Packagecloud repo ..................: $(PACKAGECLOUD_REPO)) 78 | $(info Packagecloud user ..................: $(PACKAGECLOUD_USER)) 79 | $(info Docker repo ........................: $(DOCKER_REPO)) 80 | $(info Docker image .......................: $(DOCKER_IMAGE)) 81 | $(info Docker suffix ......................: $(DOCKER_SUFFIX)) 82 | $(info Fully qualified Docker image .......: $(DOCKER_TAG)) 83 | $(info Package type .......................: $(PACKAGE)) 84 | $(info Packaging target ...................: $(TARGET)) 85 | $(info ) 86 | $(info Changelog name .....................: $(CHANGELOG_NAME)) 87 | $(info Changelog email ....................: $(CHANGELOG_EMAIL)) 88 | $(info Changelog text .....................: $(CHANGELOG_TEXT)) 89 | $(info ) 90 | -------------------------------------------------------------------------------- /.travis.yml.old: -------------------------------------------------------------------------------- 1 | # This file is part of the Phalcon Builder. 2 | # 3 | # (c) Phalcon Team 4 | # 5 | # For the full copyright and license information, please view 6 | # the LICENSE file that was distributed with this source code. 7 | # 8 | # If you did not receive a copy of the license it is available 9 | # through the world-wide-web at the following url: 10 | # https://license.phalcon.io 11 | 12 | dist: trusty 13 | 14 | services: 15 | - docker 16 | 17 | language: generic 18 | 19 | git: 20 | depth: 1 21 | 22 | cache: 23 | timeout: 604800 24 | directories: 25 | - ${HOME}/.cache/re2c 26 | - ${HOME}/.cache/php 27 | - ${HOME}/.cache/zephir 28 | 29 | env: 30 | # The `BUILDTAB' variable contains descriptive information about the packages 31 | # the CI can build. This variable is only read by programs, and not written; 32 | # it is the duty of the maintainer to properly create and maintain this 33 | # variable. The order of records in `BUILDTAB' is important because build 34 | # programs sequentially iterate through `BUILDTAB' doing their thing. 35 | # 36 | # Each build in this matrix is described on a separate line in a format: 37 | # - BUILDTAB=" \ 38 | # " 39 | # Fields on each line are separated by tabs or spaces. 40 | # Lines starting with '#' are comments. Blank lines are ignored. 41 | matrix: 42 | # stable - ubuntu 43 | #- BUILDTAB="ubuntu trusty deb v4.1.2 7.2 stable -" 44 | - BUILDTAB="ubuntu trusty deb v4.1.2 7.3 stable -" 45 | #- BUILDTAB="ubuntu xenial deb v4.1.2 7.2 stable -" 46 | - BUILDTAB="ubuntu xenial deb v4.1.2 7.3 stable -" 47 | - BUILDTAB="ubuntu xenial deb v4.1.2 7.4 stable -" 48 | #- BUILDTAB="ubuntu bionic deb v4.1.2 7.2 stable -" 49 | - BUILDTAB="ubuntu bionic deb v4.1.2 7.3 stable -" 50 | - BUILDTAB="ubuntu bionic deb v4.1.2 7.4 stable -" 51 | #- BUILDTAB="ubuntu focal deb v4.1.2 7.2 stable -" 52 | - BUILDTAB="ubuntu focal deb v4.1.2 7.3 stable -" 53 | - BUILDTAB="ubuntu focal deb v4.1.2 7.4 stable -" 54 | #- BUILDTAB="ubuntu groovy deb v4.1.0 7.3 stable -" 55 | #- BUILDTAB="ubuntu groovy deb v4.1.0 7.4 stable -" 56 | 57 | # stable - debian 58 | #- BUILDTAB="debian stretch deb v4.1.2 7.2 stable -" 59 | - BUILDTAB="debian stretch deb v4.1.2 7.3 stable -" 60 | - BUILDTAB="debian stretch deb v4.1.2 7.4 stable -" 61 | - BUILDTAB="debian buster deb v4.1.2 7.3 stable -" 62 | - BUILDTAB="debian buster deb v4.1.2 7.4 stable -" 63 | 64 | # stable - centos 65 | #- BUILDTAB="el 7 rpm v4.1.2 7.2 stable ius" 66 | - BUILDTAB="el 7 rpm v4.1.2 7.3 stable ius" 67 | - BUILDTAB="el 7 rpm v4.1.2 7.4 stable ius" 68 | 69 | # mainline - ubuntu 70 | #- BUILDTAB="ubuntu trusty deb v4.0.0-rc.3 7.2 mainline -" 71 | #- BUILDTAB="ubuntu trusty deb v4.0.0-rc.3 7.3 mainline -" 72 | #- BUILDTAB="ubuntu xenial deb v4.0.0-rc.3 7.2 mainline -" 73 | #- BUILDTAB="ubuntu xenial deb v4.0.0-rc.3 7.3 mainline -" 74 | #- BUILDTAB="ubuntu xenial deb v4.0.0-rc.3 7.4 mainline -" 75 | #- BUILDTAB="ubuntu bionic deb v4.0.0-rc.3 7.2 mainline -" 76 | #- BUILDTAB="ubuntu bionic deb v4.0.0-rc.3 7.3 mainline -" 77 | #- BUILDTAB="ubuntu bionic deb v4.0.0-rc.3 7.4 mainline -" 78 | 79 | # mainline - debian 80 | #- BUILDTAB="debian stretch deb v4.0.0-rc.3 7.2 mainline -" 81 | #- BUILDTAB="debian stretch deb v4.0.0-rc.3 7.3 mainline -" 82 | #- BUILDTAB="debian stretch deb v4.0.0-rc.3 7.4 mainline -" 83 | #- BUILDTAB="debian buster deb v4.0.0-rc.3 7.3 mainline -" 84 | #- BUILDTAB="debian buster deb v4.0.0-rc.3 7.4 mainline -" 85 | 86 | # mainline - centos 87 | #- BUILDTAB="el 7 rpm v4.0.0-rc.3 7.2 mainline ius" 88 | #- BUILDTAB="el 7 rpm v4.0.0-rc.3 7.3 mainline ius" 89 | #- BUILDTAB="el 7 rpm v4.0.0-rc.3 7.4 mainline ius" 90 | 91 | # nightly - ubuntu 92 | #- BUILDTAB="ubuntu trusty deb 4.1.x 7.2 nightly -" 93 | - BUILDTAB="ubuntu trusty deb 4.1.x 7.3 nightly -" 94 | #- BUILDTAB="ubuntu xenial deb 4.1.x 7.2 nightly -" 95 | - BUILDTAB="ubuntu xenial deb 4.1.x 7.3 nightly -" 96 | - BUILDTAB="ubuntu xenial deb 4.1.x 7.4 nightly -" 97 | #- BUILDTAB="ubuntu bionic deb 4.1.x 7.2 nightly -" 98 | - BUILDTAB="ubuntu bionic deb 4.1.x 7.3 nightly -" 99 | - BUILDTAB="ubuntu bionic deb 4.1.x 7.4 nightly -" 100 | #- BUILDTAB="ubuntu focal deb 4.1.x 7.2 nightly -" 101 | - BUILDTAB="ubuntu focal deb 4.1.x 7.3 nightly -" 102 | - BUILDTAB="ubuntu focal deb 4.1.x 7.4 nightly -" 103 | #- BUILDTAB="ubuntu groovy deb 4.1.x 7.3 nightly -" 104 | #- BUILDTAB="ubuntu groovy deb 4.1.x 7.4 nightly -" 105 | 106 | # nightly - debian 107 | #- BUILDTAB="debian stretch deb 4.1.x 7.2 nightly -" 108 | - BUILDTAB="debian stretch deb 4.1.x 7.3 nightly -" 109 | - BUILDTAB="debian stretch deb 4.1.x 7.4 nightly -" 110 | - BUILDTAB="debian buster deb 4.1.x 7.3 nightly -" 111 | - BUILDTAB="debian buster deb 4.1.x 7.4 nightly -" 112 | 113 | # nightly - centos 114 | #- BUILDTAB="el 7 rpm 4.1.x 7.2 nightly ius" 115 | - BUILDTAB="el 7 rpm 4.1.x 7.3 nightly ius" 116 | - BUILDTAB="el 7 rpm 4.1.x 7.4 nightly ius" 117 | 118 | matrix: 119 | fast_finish: true 120 | allow_failures: 121 | #- env: BUILDTAB="ubuntu trusty deb 4.1.x 7.2 nightly -" 122 | - env: BUILDTAB="ubuntu trusty deb 4.1.x 7.3 nightly -" 123 | #- env: BUILDTAB="ubuntu xenial deb 4.1.x 7.2 nightly -" 124 | - env: BUILDTAB="ubuntu xenial deb 4.1.x 7.3 nightly -" 125 | - env: BUILDTAB="ubuntu xenial deb 4.1.x 7.4 nightly -" 126 | #- env: BUILDTAB="ubuntu bionic deb 4.1.x 7.2 nightly -" 127 | - env: BUILDTAB="ubuntu bionic deb 4.1.x 7.3 nightly -" 128 | - env: BUILDTAB="ubuntu bionic deb 4.1.x 7.4 nightly -" 129 | #- env: BUILDTAB="debian stretch deb 4.1.x 7.2 nightly -" 130 | - env: BUILDTAB="debian stretch deb 4.1.x 7.3 nightly -" 131 | - env: BUILDTAB="debian stretch deb 4.1.x 7.4 nightly -" 132 | - env: BUILDTAB="debian buster deb 4.1.x 7.3 nightly -" 133 | - env: BUILDTAB="debian buster deb 4.1.x 7.4 nightly -" 134 | #- env: BUILDTAB="el 7 rpm 4.1.x 7.2 nightly ius" 135 | - env: BUILDTAB="el 7 rpm 4.1.x 7.3 nightly ius" 136 | - env: BUILDTAB="el 7 rpm 4.1.x 7.4 nightly ius" 137 | 138 | before_install: 139 | - source environment 140 | - export $(cat environment | grep -v "^#\|^$" | cut -d= -f1) 141 | - source ci/export-buildtab.sh 142 | # Create daily builds only for nightly branch 143 | - if [ "${PACKAGECLOUD_REPO}${TRAVIS_EVENT_TYPE}" = "stablecron" ]; then travis_terminate 0 ; fi 144 | - if [ "${PACKAGECLOUD_REPO}${TRAVIS_EVENT_TYPE}" = "mainlinecron" ]; then travis_terminate 0 ; fi 145 | - if [ $OS != "el" ]; then ./ci/prepare-debian.sh; fi 146 | - if [ $OS = "el" ]; then ./ci/prepare-rpm.sh; fi 147 | - if [ $REPO_VENDOR == "-" ]; then unset REPO_VENDOR; fi 148 | 149 | install: 150 | - ./ci/install-php.sh || travis_terminate 1 151 | - source ./ci/setup-build.sh 152 | - ./ci/install-re2c.sh || travis_terminate 1 153 | - ./ci/install-zephir-parser.sh || travis_terminate 1 154 | - ./ci/install-zephir.sh || travis_terminate 1 155 | 156 | before_script: 157 | - git clone -b $CLONE_BRANCH --depth 1 -q $PRODUCT_GIT $SOURCEDIR 1>/dev/null 158 | - ./ci/regenerate-build.sh || travis_terminate 1 159 | 160 | script: 161 | - make -f .travis.mk ${TARGET} || travis_terminate 1 162 | 163 | before_deploy: 164 | - ls -l build/ 165 | 166 | deploy: 167 | - provider: packagecloud 168 | username: "${PACKAGECLOUD_USER}" 169 | repository: "${PACKAGECLOUD_REPO}" 170 | token: "${PACKAGECLOUD_TOKEN}" 171 | dist: "${OS}/${DIST}" 172 | package_glob: build/*.{rpm,deb,dsc} 173 | skip_cleanup: true 174 | on: 175 | branch: "master" 176 | condition: -n "${OS}" && -n "${DIST}" && -n "${PACKAGECLOUD_TOKEN}" 177 | 178 | notifications: 179 | email: false 180 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | All notable changes to this project will be documented in this file. 3 | 4 | The format is based on [Keep a Changelog](http://keepachangelog.com/) 5 | and this project adheres to [Semantic Versioning](http://semver.org/). 6 | 7 | ## [Unreleased] 8 | ### Added 9 | - Install missed PHP extensions on non-stable branches to regenerate C-code 10 | - Added Debian Buster support 11 | [#47](https://github.com/phalcongelist/packagecloud/issues/47) 12 | 13 | ## [1.5.0] - 2019-02-31 14 | ### Added 15 | - Added PHP 7.3 support 16 | - The rpm spec files were divided regarding PHP versions 17 | 18 | ## [1.4.0] - 2019-01-06 19 | ### Added 20 | - Added https://packagecloud.io/phalcon/mainline support 21 | 22 | ### Changed 23 | - Fully refactored build matrix to allow build Phalcon 3.x and 4.x 24 | 25 | ## [1.3.0] - 2018-07-28 26 | ### Added 27 | - Added ability to build packages for Ubuntu 18.04 28 | - [phalcongelist/packagecloud#27](https://github.com/phalcongelist/packagecloud/issues/27) 29 | - [phalcon/cphalcon#13376](https://github.com/phalcon/cphalcon/issues/13376) 30 | - Added a common Debian/Ubuntu `prebuild.sh` script 31 | 32 | ### Changed 33 | - Freezed packpack version to make sure that we use the same packpack always 34 | 35 | ### Fixed 36 | - Added `TMPDIR` variable to the build container [packpack/packpack#97](https://github.com/packpack/packpack/issues/97) 37 | 38 | ## [1.2.3] - 2018-03-10 39 | ### Fixed 40 | - Patching packpack due to [packpack/packpack#84](https://github.com/packpack/packpack/pull/84#issuecomment-371755389) 41 | 42 | ## [1.2.2] - 2017-07-10 43 | ### Changed 44 | - Removed no longer needed `patching-sources` target 45 | 46 | ## [1.2.1] - 2017-06-21 47 | ### Changed 48 | - Improved RPM-spec by removing hardcoded virtual provides specific things 49 | - Use stable Zephir Parser 50 | - Updated license path 51 | - Patching `zend_error_noreturn` usage [phalcon/cphalcon#12909](https://github.com/phalcon/cphalcon/issues/12909) 52 | 53 | ## [1.2.0] - 2017-04-06 54 | ### Added 55 | - Added ability to build PHP 7.1 packages 56 | 57 | ### Changed 58 | - Used latest Zephir and Zephir Parser to generate nighly builds 59 | - Cleaned not needed changelogs 60 | - Improved debian rules to correct handle PHP 7.1 61 | 62 | ## Fixed 63 | - Fixed file package file name to be able release a few versions for one distro 64 | 65 | ## [1.1.0] - 2017-03-22 66 | ### Changed 67 | - Improved preparing build 68 | - Used original https://github.com/packpack/packpack.git repo to build packages 69 | - Removed patching headers target 70 | - Renamed debug symbols for Debain/Ubuntu 71 | 72 | ## 1.0.0 - 2017-03-14 73 | ### Added 74 | - Initial stable release. Added ability to build packages for 75 | Ubuntu 14.04-16.04, Debian 8.5-9 and CentOS 7.2 by using 76 | [Packpack](https://github.com/packpack/packpack). 77 | 78 | [Unreleased]: https://github.com/phalcongelist/packagecloud/compare/v1.5.0...HEAD 79 | [1.5.0]: https://github.com/phalcongelist/packagecloud/compare/v1.4.0...v1.5.0 80 | [1.4.0]: https://github.com/phalcongelist/packagecloud/compare/v1.3.0...v1.4.0 81 | [1.3.0]: https://github.com/phalcongelist/packagecloud/compare/v1.2.3...v1.3.0 82 | [1.2.3]: https://github.com/phalcongelist/packagecloud/compare/v1.2.2...v1.2.3 83 | [1.2.2]: https://github.com/phalcongelist/packagecloud/compare/v1.2.1...v1.2.2 84 | [1.2.1]: https://github.com/phalcongelist/packagecloud/compare/v1.2.0...v1.2.1 85 | [1.2.0]: https://github.com/phalcongelist/packagecloud/compare/v1.1.0...v1.2.0 86 | [1.1.0]: https://github.com/phalcongelist/packagecloud/compare/v1.0.0...v1.1.0 87 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | BSD 3-Clause License 2 | 3 | Copyright (c) 2011-present, Phalcon Team 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | * Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | * Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | * Neither the name of the copyright holder nor the names of its 17 | contributors may be used to endorse or promote products derived from 18 | this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | Phalcon Builder 3 |

4 | 5 |

6 | 7 | Build Status 8 | 9 |

10 | 11 | Phalcon Builder - is a packaging system that make it easy and quick to build [Phalcon][1] packages such 12 | as rpms, debs, etc. Phalcon's distribution that hosted at [PackageCloud][2]. 13 | 14 | Installation Instructions 15 | ------------------------- 16 | 17 | How the Phalcon Team will schedule framework releases in the future: 18 | 19 | - **Stable** versions correspond to Phalcon release tags and should be used in production 20 | - **Mainline** versions correspond to Phalcon release tags which _are not stable_. 21 | Сan be used _with care_ by experienced users 22 | - **Nightly** versions are built daily and _should not_ be used in production 23 | 24 | Installation/configuration details for each version and operating system can be found below: 25 | 26 | Supported Operating Systems 27 | --------------------------- 28 | 29 | - Ubuntu 14.04 LTS (Trusty) (up to PHP 7.3) 30 | - Ubuntu 16.04 LTS (Xenial) 31 | - Ubuntu 18.04 LTS (Bionic) 32 | - Ubuntu 20.04 LTS (Focal) 33 | - Ubuntu 20.10 (Groovy) 34 | - Debian 9 LTS (Stretch) 35 | - Debian 10 (Buster) 36 | - CentOS 7.2 LTS (Core) 37 | 38 | Configuration 39 | ------------- 40 | 41 | **DEB packages** 42 | 43 | ```sh 44 | # Stable releases 45 | curl -s https://packagecloud.io/install/repositories/phalcon/stable/script.deb.sh | sudo bash 46 | 47 | # Mainline releases 48 | curl -s https://packagecloud.io/install/repositories/phalcon/mainline/script.deb.sh | sudo bash 49 | 50 | # Nightly releases 51 | curl -s https://packagecloud.io/install/repositories/phalcon/nightly/script.deb.sh | sudo bash 52 | ``` 53 | 54 | **RPM packages** 55 | 56 | ```sh 57 | # Stable releases 58 | curl -s https://packagecloud.io/install/repositories/phalcon/stable/script.rpm.sh | sudo bash 59 | 60 | # Mainline releases 61 | curl -s https://packagecloud.io/install/repositories/phalcon/mainline/script.rpm.sh | sudo bash 62 | 63 | # Nightly releases 64 | curl -s https://packagecloud.io/install/repositories/phalcon/nightly/script.rpm.sh | sudo bash 65 | ``` 66 | 67 | **Programmatic way** 68 | 69 | ```bash 70 | export BASE_URI=https://packagecloud.io/install/repositories 71 | export PRODUCT=phalcon 72 | export BRANCH=mainline 73 | export PACKAGE=rpm 74 | 75 | curl -s "${BASE_URI}/${PRODUCT}/${BRANCH}/script.${PACKAGE}.sh" | sudo bash 76 | ``` 77 | 78 | Installation 79 | ------------ 80 | 81 | Select the required package from the list using the command as follows: 82 | 83 | **DEB packages** 84 | 85 | ```sh 86 | # Phalcon PHP framework 87 | apt-cache search phalcon | grep "High performance PHP framework" 88 | 89 | # Debug symbols for Phalcon 90 | apt-cache search phalcon-dbgsym 91 | ``` 92 | 93 | **RPM packages** 94 | 95 | ```sh 96 | # Phalcon PHP framework 97 | yum search phalcon | grep "High performance PHP framework" 98 | 99 | # Debug symbols for Phalcon 100 | yum search phalcon | grep "Debug information for package" 101 | ``` 102 | 103 | Download packages manually 104 | -------------------------- 105 | 106 | * Packages for [stable version][3] 107 | * Packages for [mainline version][4] 108 | * Packages for [nightly version][5] 109 | 110 | License 111 | ------- 112 | 113 | Phalcon Builder licensed under the BSD 3-Clause License. See the [LICENSE][8] file for more information. 114 | 115 | [1]: https://phalcon.io 116 | [2]: https://packagecloud.io/phalcon 117 | [3]: https://packagecloud.io/phalcon/stable 118 | [4]: https://packagecloud.io/phalcon/mainline 119 | [5]: https://packagecloud.io/phalcon/nightly 120 | [8]: https://github.com/phalcon/zephir/blob/master/LICENSE 121 | -------------------------------------------------------------------------------- /build.tpl: -------------------------------------------------------------------------------- 1 | # This file is part of the Phalcon. 2 | # 3 | # (c) Phalcon Team 4 | # 5 | # For the full copyright and license information, please view 6 | # the LICENSE.txt file that was distributed with this source code. 7 | # 8 | # If you did not receive a copy of the license it is available 9 | # through the world-wide-web at the following url: 10 | # https://license.phalcon.io 11 | -------------------------------------------------------------------------------- /build/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /builder/check.mk: -------------------------------------------------------------------------------- 1 | # This file is part of the Phalcon. 2 | # 3 | # (c) Phalcon Team 4 | # 5 | # For the full copyright and license information, please view 6 | # the LICENSE.txt file that was distributed with this source code. 7 | # 8 | # If you did not receive a copy of the license it is available 9 | # through the world-wide-web at the following url: 10 | # https://license.phalcon.io 11 | 12 | ifndef SOURCEDIR 13 | $(error SOURCEDIR is undefined) 14 | endif 15 | 16 | ifeq ($(PHP_VERSION),) 17 | $(error PHP_VERSION is undefined) 18 | endif 19 | 20 | ifndef CLONE_BRANCH 21 | $(error CLONE_BRANCH is undefined) 22 | endif 23 | 24 | ifndef STABLE_BRANCH 25 | $(error STABLE_BRANCH is undefined) 26 | endif 27 | 28 | ifndef NIGHTLY_BRANCH 29 | $(error NIGHTLY_BRANCH is undefined) 30 | endif 31 | 32 | ifndef OS 33 | $(error OS is undefined) 34 | endif 35 | 36 | ifndef DIST 37 | $(error DIST is undefined) 38 | endif 39 | 40 | ifndef PACKAGE 41 | $(error PACKAGE is undefined) 42 | endif 43 | -------------------------------------------------------------------------------- /builder/config.mk: -------------------------------------------------------------------------------- 1 | # This file is part of the Phalcon. 2 | # 3 | # (c) Phalcon Team 4 | # 5 | # For the full copyright and license information, please view 6 | # the LICENSE.txt file that was distributed with this source code. 7 | # 8 | # If you did not receive a copy of the license it is available 9 | # through the world-wide-web at the following url: 10 | # https://license.phalcon.io 11 | 12 | CHANGELOG_NAME=Phalcon Team 13 | CHANGELOG_EMAIL=team@phalcon.io 14 | CHANGELOG_TEXT=Automated build. See details at release page https://github.com/phalcon/cphalcon/releases 15 | 16 | PACK_REPO=https://github.com/packpack/packpack.git 17 | PACK_COMMIT=30ff7b51654c19b8919d01ca8d4aa480e87e8241 18 | 19 | DOCKER_REPO=phalconphp/build 20 | 21 | # Use -vv to display debugging information 22 | RPMBUILD_FLAGS=-vv 23 | 24 | PHP_VERSION?= 25 | PHP_MAJOR=$(shell echo "$(PHP_VERSION)" | cut -d '.' -f 1,2) 26 | 27 | ZEND_BACKEND?= 28 | REPO_VENDOR?= 29 | RELEASE= 30 | PRODUCT?=php-phalcon 31 | 32 | STABLE_BUILD_VERSION?=1 33 | MAINLINE_BUILD_VERSION?=1 34 | NIGHTLY_BUILD_VERSION?=1 35 | 36 | # List of supported OS 37 | FEDORA:=fedora-rawhide fedora24 fedora23 38 | CENTOS:=centos7 centos6 39 | DEBIAN:=debian-sid debian-buster debian-stretch debian-wheezy 40 | UBUNTU:=ubuntu-bionic ubuntu-xenial ubuntu-trusty ubuntu-focal ubuntu-groovy 41 | 42 | DEBS:=$(DEBIAN) $(UBUNTU) 43 | RPMS:=$(FEDORA) $(CENTOS) 44 | 45 | SUPPORTED_PACKAGES=rpm deb 46 | SUPPORTED_VENDORS=ius 47 | 48 | ifeq (el,$(OS)) 49 | BUILD_OS=centos 50 | else 51 | BUILD_OS=$(OS) 52 | endif 53 | 54 | ifneq ($(shell echo "$(DIST)" | grep '^[0-9]\+$$'),) 55 | # Non-numeric dist, e.g. debian-sid, ubuntu-precise, etc. 56 | OSDIST=$(BUILD_OS)$(DIST) 57 | else 58 | # Numeric dist, e.g. centos7 or fedora23 59 | OSDIST=$(BUILD_OS)-$(DIST) 60 | endif 61 | 62 | ifeq ($(filter $(OSDIST),$(DEBS) $(RPMS)),) 63 | $(error $(OSDIST) does not exist in supported OS) 64 | endif 65 | 66 | ifeq ($(filter $(PACKAGE), $(SUPPORTED_PACKAGES)),) 67 | $(error $(PACKAGE) does not exist in supported package types) 68 | endif 69 | 70 | ifeq ($(CLONE_BRANCH), $(STABLE_BRANCH)) 71 | PACKAGECLOUD_REPO=$(PACKAGECLOUD_STABLE_REPO) 72 | RELEASE:=$(STABLE_BUILD_VERSION) 73 | else ifeq ($(CLONE_BRANCH), $(MAINLINE_BRANCH)) 74 | PACKAGECLOUD_REPO=$(PACKAGECLOUD_MAINLINE_REPO) 75 | RELEASE:=$(MAINLINE_BUILD_VERSION) 76 | else 77 | PACKAGECLOUD_REPO=$(PACKAGECLOUD_NIGHTLY_REPO) 78 | RELEASE:=$(NIGHTLY_BUILD_VERSION) 79 | endif 80 | 81 | DOCKER_SUFFIX= 82 | VENDOR_MK=$(filter $(REPO_VENDOR),$(SUPPORTED_VENDORS)) 83 | 84 | ifneq ($(filter $(VENDOR_MK),$(SUPPORTED_VENDORS)),) 85 | include $(SCRIPTDIR)/builder/$(VENDOR_MK).mk 86 | endif 87 | 88 | ifneq ($(PHP_VERSION),) 89 | ifneq ($(filter $(OSDIST),$(DEBS)),) 90 | temp=$(RELEASE) 91 | RELEASE:=$(temp)+php$(PHP_VERSION) 92 | endif 93 | endif 94 | 95 | ifeq ($(PHP_VERSION),7.0) 96 | ifneq (,$(filter $(DIST),trusty)) 97 | DOCKER_SUFFIX=-7.0 98 | endif 99 | endif 100 | 101 | ifeq ($(PHP_VERSION),7.1) 102 | ifneq (,$(filter $(DIST),stretch trusty xenial)) 103 | DOCKER_SUFFIX=-7.1 104 | endif 105 | endif 106 | 107 | ifeq ($(PHP_VERSION),7.2) 108 | ifneq (,$(filter $(DIST),stretch trusty xenial focal groovy)) 109 | DOCKER_SUFFIX=-7.2 110 | endif 111 | endif 112 | 113 | ifeq ($(PHP_VERSION),7.3) 114 | ifneq (,$(filter $(DIST),buster stretch trusty xenial bionic focal groovy)) 115 | DOCKER_SUFFIX=-7.3 116 | endif 117 | endif 118 | 119 | ifeq ($(PHP_VERSION),7.4) 120 | ifneq (,$(filter $(DIST),buster stretch trusty xenial bionic focal groovy)) 121 | DOCKER_SUFFIX=-7.4 122 | endif 123 | endif 124 | 125 | REVISION=$(shell cd $(SOURCEDIR); git rev-parse --short=8 HEAD) 126 | ifeq (el,$(OS)) 127 | VERSION?=$(shell cat "$(SOURCEDIR)/config.json" | grep version | head -1 | sed -E 's|[\", ]||g' | cut -d ':' -f 2 | tr -s '-' | tr '-' '_') 128 | else 129 | VERSION?=$(shell cat "$(SOURCEDIR)/config.json" | grep version | head -1 | sed -E 's|[\", ]||g' | cut -d ':' -f 2) 130 | endif 131 | VERSION_FULL=$(VERSION)-$(RELEASE)-$(REVISION) 132 | DOCKER_IMAGE=$(OSDIST)$(DOCKER_SUFFIX) 133 | DOCKER_TAG=$(DOCKER_REPO):$(OSDIST)$(DOCKER_SUFFIX) 134 | BUILDDIR=$(SCRIPTDIR)/build 135 | TARBALL_EXTRA_ARGS=--exclude=.github --exclude=.editorconfig --exclude=.gitattributes 136 | -------------------------------------------------------------------------------- /builder/ius.mk: -------------------------------------------------------------------------------- 1 | # This file is part of the Phalcon. 2 | # 3 | # (c) Phalcon Team 4 | # 5 | # For the full copyright and license information, please view 6 | # the LICENSE.txt file that was distributed with this source code. 7 | # 8 | # If you did not receive a copy of the license it is available 9 | # through the world-wide-web at the following url: 10 | # https://license.phalcon.io 11 | 12 | SUPPORTED_IUS_VERSIONS=5.5 5.6 7.0 7.1 7.2 7.3 7.4 13 | 14 | ifeq ($(filter $(PHP_MAJOR),$(SUPPORTED_IUS_VERSIONS)),) 15 | $(error The $(PHP_MAJOR) is unsupported PHP version for $(REPO_VENDOR)) 16 | endif 17 | 18 | ifeq ($(PHP_MAJOR),5.5) 19 | PHP_VERSION=php55u 20 | DOCKER_SUFFIX=-ius55 21 | endif 22 | 23 | ifeq ($(PHP_MAJOR),5.6) 24 | PHP_VERSION=php56u 25 | DOCKER_SUFFIX=-ius56 26 | endif 27 | 28 | ifeq ($(PHP_MAJOR),7.0) 29 | PHP_VERSION=php70u 30 | DOCKER_SUFFIX=-ius70 31 | endif 32 | 33 | ifeq ($(PHP_MAJOR),7.1) 34 | PHP_VERSION=php71u 35 | DOCKER_SUFFIX=-ius71 36 | endif 37 | 38 | ifeq ($(PHP_MAJOR),7.2) 39 | PHP_VERSION=php72u 40 | DOCKER_SUFFIX=-ius72 41 | endif 42 | 43 | ifeq ($(PHP_MAJOR),7.3) 44 | PHP_VERSION=php73u 45 | DOCKER_SUFFIX=-ius73 46 | endif 47 | 48 | ifeq ($(PHP_MAJOR),7.4) 49 | PHP_VERSION=php74u 50 | DOCKER_SUFFIX=-ius74 51 | endif 52 | -------------------------------------------------------------------------------- /builder/patching.mk: -------------------------------------------------------------------------------- 1 | # This file is part of the Phalcon. 2 | # 3 | # (c) Phalcon Team 4 | # 5 | # For the full copyright and license information, please view 6 | # the LICENSE.txt file that was distributed with this source code. 7 | # 8 | # If you did not receive a copy of the license it is available 9 | # through the world-wide-web at the following url: 10 | # https://license.phalcon.io 11 | 12 | 13 | DEB_SPEC=$(SCRIPTDIR)/debian/rules 14 | 15 | RPM_SPEC=$(SCRIPTDIR)/rpm/php-phalcon.spec 16 | RPM_PRODUCT= 17 | 18 | .PHONY: prepare-build 19 | prepare-build: prepare-$(PACKAGE)-spec 20 | $(info -------------------------------------------------------------------) 21 | $(info Prepare .build.mk) 22 | $(info -------------------------------------------------------------------) 23 | @cp $(SCRIPTDIR)/build.tpl $@.tmp 24 | ifneq ($(REPO_VENDOR),) 25 | @echo "RELEASE=$(RELEASE).$(REPO_VENDOR)" >> $@.tmp 26 | endif 27 | @mv -f $@.tmp $(SOURCEDIR)/.build.mk 28 | $(info ) 29 | 30 | .PHONY: prepare-deb-spec 31 | prepare-deb-spec: $(DEB_SPEC) 32 | $(info -------------------------------------------------------------------) 33 | $(info Patching $<) 34 | $(info -------------------------------------------------------------------) 35 | @cp $< $@.tmp 36 | @cp -r $(SCRIPTDIR)/debian $(SOURCEDIR)/debian 37 | @mv -f $@.tmp $(SOURCEDIR)/debian/rules 38 | $(info ) 39 | 40 | .PHONY: prepare-rpm-spec 41 | prepare-rpm-spec: $(RPM_SPEC) 42 | $(info -------------------------------------------------------------------) 43 | $(info Prepare $<) 44 | $(info -------------------------------------------------------------------) 45 | @mkdir -p $(SOURCEDIR)/rpm 46 | @cp -f $< $(SOURCEDIR)/rpm/php-phalcon.spec 47 | $(info ) 48 | -------------------------------------------------------------------------------- /ci/export-buildtab.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # This file is part of the Phalcon Builder. 4 | # 5 | # (c) Phalcon Team 6 | # 7 | # For the full copyright and license information, please view 8 | # the LICENSE file that was distributed with this source code. 9 | # 10 | # If you did not receive a copy of the license it is available 11 | # through the world-wide-web at the following url: 12 | # https://license.phalcon.io 13 | 14 | # Ensure that this is being run inside a CI container 15 | if [ "${CI}" != "true" ]; 16 | then 17 | (>&2 echo "This script is designed to run inside a CI container only.") 18 | (>&2 echo "Aborting.") 19 | exit 1 20 | fi 21 | 22 | if [ -z ${BUILDTAB+x} ]; 23 | then 24 | (>&2 echo "The BUILDTAB is absent or empty.") 25 | (>&2 echo "Aborting.") 26 | exit 1 27 | fi 28 | 29 | # Expected format is: 30 | # 31 | IFS=';' read -ra build_conf <<< $(echo $BUILDTAB | tr -s "[:blank:]" ";") 32 | 33 | if [ "${#build_conf[@]}" -ne "7" ]; 34 | then 35 | (>&2 echo "Invalid BUILDTAB format: \"${BUILDTAB}\".") 36 | (>&2 echo "Aborting.") 37 | exit 1 38 | fi 39 | 40 | #export OS="${build_conf[0]}" 41 | #export DIST="${build_conf[1]}" 42 | #export PACKAGE="${build_conf[2]}" 43 | #export CLONE_BRANCH="${build_conf[3]}" 44 | #export PHP_VERSION="${build_conf[4]}" 45 | #export PACKAGECLOUD_REPO="${build_conf[5]}" 46 | #export REPO_VENDOR="${build_conf[6]}" 47 | 48 | echo "OS=${build_conf[0]}" >> $GITHUB_ENV 49 | echo "DIST=${build_conf[1]}" >> $GITHUB_ENV 50 | echo "PACKAGE=${build_conf[2]}" >> $GITHUB_ENV 51 | echo "CLONE_BRANCH=${build_conf[3]}" >> $GITHUB_ENV 52 | echo "PHP_VERSION=${build_conf[4]}" >> $GITHUB_ENV 53 | echo "PACKAGECLOUD_REPO=${build_conf[5]}" >> $GITHUB_ENV 54 | echo "REPO_VENDOR=${build_conf[6]}" >> $GITHUB_ENV 55 | -------------------------------------------------------------------------------- /ci/install-php.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # This file is part of the Phalcon Builder. 4 | # 5 | # (c) Phalcon Team 6 | # 7 | # For the full copyright and license information, please view 8 | # the LICENSE file that was distributed with this source code. 9 | # 10 | # If you did not receive a copy of the license it is available 11 | # through the world-wide-web at the following url: 12 | # https://license.phalcon.io 13 | 14 | # -e Exit immediately if a command exits with a non-zero status. 15 | # -u Treat unset variables as an error when substituting. 16 | # -o This setting prevents errors in a pipeline from being masked. 17 | set -euo pipefail 18 | 19 | # Ensure that this is being run inside a CI container 20 | if [ "${CI}" != "true" ]; 21 | then 22 | (>&2 echo "This script is designed to run inside a CI container only.") 23 | (>&2 echo "Aborting.") 24 | exit 1 25 | fi 26 | 27 | if [ -z ${PHP_VERSION+x} ]; 28 | then 29 | (>&2 echo "The PHP_VERSION variable is absent or empty.") 30 | (>&2 echo "Aborting.") 31 | exit 1 32 | fi 33 | 34 | if [ -z ${PACKAGECLOUD_REPO+x} ]; 35 | then 36 | (>&2 echo "The PACKAGECLOUD_REPO variable is absent or empty.") 37 | (>&2 echo "Aborting.") 38 | exit 1 39 | fi 40 | 41 | function install_memcached() { 42 | local php_confd="$(phpenv root)/versions/$(phpenv version-name)/etc/conf.d" 43 | local php_extd="$(`phpenv which php-config` --extension-dir)" 44 | 45 | if [ ! -f "$php_extd/memcached.so" ]; 46 | then 47 | cd /tmp 48 | phpenv local "${PHP_VERSION}" 1>/dev/null && phpenv rehash 49 | 50 | rm -rf memcached-latest && mkdir memcached-latest 51 | pecl download memcached 1> /dev/null 52 | tar -xf memcached-*.tgz -C ./memcached-latest --strip-components=1 53 | 54 | cd memcached-latest 55 | phpenv local "${PHP_VERSION}" 1>/dev/null && phpenv rehash 56 | 57 | phpize 1> /dev/null 58 | 59 | # TODO: Looks like "--disable-memcached-sasl" is required on Ubuntu 14.04 60 | ./configure \ 61 | --with-libmemcached-dir=/usr \ 62 | --with-zlib-dir=/usr \ 63 | --with-system-fastlz=no \ 64 | --with-php-config=$(phpenv which php-config) \ 65 | --enable-memcached-igbinary=no \ 66 | --enable-memcached-msgpack=no \ 67 | --enable-memcached \ 68 | --enable-memcached-protocol=no \ 69 | --enable-memcached-json=yes \ 70 | --enable-memcached-session=yes \ 71 | --disable-memcached-sasl \ 72 | 1>/dev/null 73 | 74 | make --silent -j"$(getconf _NPROCESSORS_ONLN)" 1>/dev/null 75 | make --silent install 1>/dev/null 76 | fi 77 | 78 | ls $php_extd | grep memcached.so 1> /dev/null 79 | echo extension=memcached.so > "$php_confd/memcached.ini" 80 | } 81 | 82 | function install_exts() { 83 | # We'll need to regenerate C-code on non-stable branches. 84 | # This is why we need to install missed extensions. 85 | if [ "$PACKAGECLOUD_REPO" = "nightly" ] 86 | then 87 | (>&1 echo "Installing PHP extensions...") 88 | case "$PHP_VERSION" in 89 | 7.[0-9]) 90 | (>&1 echo " * psr") 91 | printf "\n" | pecl install --force psr 1> /dev/null 92 | 93 | (>&1 echo " * redis") 94 | printf "\n" | pecl install --force redis 1> /dev/null 95 | 96 | (>&1 echo " * memcached") 97 | install_memcached 98 | 99 | # will exit with 1 in case of extension absence 100 | php -m | grep psr 1> /dev/null 101 | php -m | grep redis 1> /dev/null 102 | php -m | grep memcached 1> /dev/null 103 | ;; 104 | *) 105 | (>&2 echo "PHP v${PHP_VERSION} is not supported by Phalcon ${PACKAGECLOUD_REPO}.") 106 | (>&2 echo "Aborting.") 107 | exit 1 108 | ;; 109 | esac 110 | fi 111 | } 112 | 113 | # Travis creates symbolic links to the real version like: 114 | # ~/.phpenv/versions/7.2 -> ~/.phpenv/versions/7.2.13 115 | if [ -L "${HOME}/.phpenv/versions/${PHP_VERSION}" ]; 116 | then 117 | phpenv global "${PHP_VERSION}" 118 | phpenv rehash 119 | php -v 120 | 121 | install_exts 122 | exit 0 123 | fi 124 | 125 | os_version=14.04 126 | pkgname=php 127 | source="https://s3.amazonaws.com/travis-php-archives/binaries/ubuntu/${os_version}/x86_64/${pkgname}-${PHP_VERSION}.tar.bz2" 128 | downloaddir="${HOME}/.cache/${pkgname}/ubuntu-${os_version}" 129 | downloadfile="${pkgname}-${PHP_VERSION}.tar.bz2" 130 | 131 | if [ ! -f "${downloaddir}/${downloadfile}" ]; 132 | then 133 | (>&1 echo "Downloading archive: ${source}") 134 | mkdir -p "${downloaddir}" && cd "${downloaddir}" 135 | curl -s -o $downloadfile "${source}" 136 | fi 137 | 138 | if [ ! -f "${downloaddir}/${downloadfile}" ]; 139 | then 140 | (>&2 echo "Unable to locate ${downloadfile} file.") 141 | (>&2 echo "Aborting.") 142 | exit 1 143 | fi 144 | 145 | (>&1 echo "${PHP_VERSION} is not pre-installed; installing") 146 | cd "${downloaddir}" 147 | tar xjf "${downloadfile}" --directory / 148 | 149 | phpenv global "${PHP_VERSION}" 150 | phpenv rehash 151 | php -v 152 | 153 | install_exts 154 | 155 | unset os_version pkgname source downloaddir downloadfile 156 | -------------------------------------------------------------------------------- /ci/install-re2c.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # This file is part of the Phalcon Builder. 4 | # 5 | # (c) Phalcon Team 6 | # 7 | # For the full copyright and license information, please view 8 | # the LICENSE file that was distributed with this source code. 9 | # 10 | # If you did not receive a copy of the license it is available 11 | # through the world-wide-web at the following url: 12 | # https://license.phalcon.io 13 | 14 | # -e Exit immediately if a command exits with a non-zero status. 15 | # -u Treat unset variables as an error when substituting. 16 | # -o This setting prevents errors in a pipeline from being masked. 17 | set -euo pipefail 18 | 19 | # Ensure that this is being run inside a CI container 20 | if [ "${CI}" != "true" ]; 21 | then 22 | (>&2 echo "This script is designed to run inside a CI container only.") 23 | (>&2 echo "Aborting.") 24 | exit 1 25 | fi 26 | 27 | if [ -z ${RE2C_VERSION+x} ]; 28 | then 29 | (>&2 echo "The RE2C_VERSION is absent or empty.") 30 | (>&2 echo "Aborting.") 31 | exit 1 32 | fi 33 | 34 | if [ "${RE2C_VERSION}" == "system" ]; 35 | then 36 | (>&1 echo "Use system re2c.") 37 | (>&1 echo "Skip installing re2c.") 38 | exit 0 39 | fi 40 | 41 | if [ "${CLONE_BRANCH}" != "${NIGHTLY_BRANCH}" ]; 42 | then 43 | (>&1 echo "re2c is needed only on '${NIGHTLY_BRANCH}' branch.") 44 | (>&1 echo "Current branch is: '${CLONE_BRANCH}'.") 45 | (>&1 echo "Skip installing re2c.") 46 | exit 0 47 | fi 48 | 49 | pkgname=re2c 50 | source="https://github.com/skvadrik/${pkgname}/releases/download/${RE2C_VERSION}/${pkgname}-${RE2C_VERSION}.tar.gz" 51 | downloaddir="${HOME}/.cache/${pkgname}/${pkgname}-${RE2C_VERSION}" 52 | prefix="${HOME}/.local/opt/${pkgname}/${pkgname}-${RE2C_VERSION}" 53 | bindir="${prefix}/bin" 54 | 55 | if [ ! -f "${bindir}/re2c" ]; 56 | then 57 | if [ ! -d `dirname ${downloaddir}` ]; 58 | then 59 | mkdir -p `dirname ${downloaddir}` 60 | fi 61 | 62 | cd `dirname ${downloaddir}` 63 | 64 | if [ ! -f "${pkgname}-${RE2C_VERSION}.tar.gz" ]; 65 | then 66 | (>&1 echo "Downloading archive: ${source}") 67 | curl -sSL "$source" -o "${pkgname}-${RE2C_VERSION}.tar.gz" 68 | fi 69 | 70 | if [ ! -f "${pkgname}-${RE2C_VERSION}.tar.gz" ]; 71 | then 72 | (>&2 echo "Unable to locate ${pkgname}-${RE2C_VERSION}.tar.gz file.") 73 | (>&2 echo "Aborting.") 74 | exit 1 75 | fi 76 | 77 | if [ ! -d "${downloaddir}" ]; 78 | then 79 | mkdir -p "${downloaddir}" 80 | tar -zxf "${pkgname}-${RE2C_VERSION}.tar.gz" 81 | fi 82 | 83 | if [ ! -d "${downloaddir}" ]; 84 | then 85 | (>&2 echo "Unable to locate re2c source.") 86 | (>&2 echo "Aborting.") 87 | exit 1 88 | fi 89 | 90 | if [ ! -d "${prefix}" ]; 91 | then 92 | mkdir -p "${prefix}" 93 | fi 94 | 95 | cd "${downloaddir}" 96 | ./configure --silent --prefix="${prefix}" 97 | 98 | make --silent -j"$(getconf _NPROCESSORS_ONLN)" 99 | make --silent install 100 | fi 101 | 102 | if [ ! -x "${bindir}/re2c" ]; 103 | then 104 | (>&2 echo "Unable to locate re2c executable.") 105 | (>&2 echo "Aborting.") 106 | exit 1 107 | fi 108 | 109 | mkdir -p ${HOME}/bin 110 | ln -s "${bindir}/re2c" ${HOME}/bin/re2c 111 | 112 | re2c --version 113 | exit 0 114 | -------------------------------------------------------------------------------- /ci/install-zephir-parser.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # This file is part of the Phalcon Builder. 4 | # 5 | # (c) Phalcon Team 6 | # 7 | # For the full copyright and license information, please view 8 | # the LICENSE file that was distributed with this source code. 9 | # 10 | # If you did not receive a copy of the license it is available 11 | # through the world-wide-web at the following url: 12 | # https://license.phalcon.io 13 | 14 | # -e Exit immediately if a command exits with a non-zero status. 15 | # -u Treat unset variables as an error when substituting. 16 | # -o This setting prevents errors in a pipeline from being masked. 17 | set -euo pipefail 18 | 19 | # Ensure that this is being run inside a CI container 20 | if [ "${CI}" != "true" ]; 21 | then 22 | (>&2 echo "This script is designed to run inside a CI container only.") 23 | (>&2 echo "Aborting.") 24 | exit 1 25 | fi 26 | 27 | if [ -z ${ZEPHIR_PARSER_VERSION+x} ]; 28 | then 29 | (>&2 echo "The ZEPHIR_PARSER_VERSION is absent or empty.") 30 | (>&2 echo "Aborting.") 31 | exit 1 32 | fi 33 | 34 | if [ "${CLONE_BRANCH}" != "${NIGHTLY_BRANCH}" ]; 35 | then 36 | (>&1 echo "Zephir Parser is needed only on '${NIGHTLY_BRANCH}' branch.") 37 | (>&1 echo "Current branch is: '${CLONE_BRANCH}'.") 38 | (>&1 echo "Skip installing Zephir Parser.") 39 | exit 0 40 | fi 41 | 42 | source=https://github.com/phalcon/php-zephir-parser.git 43 | 44 | (>&1 echo "Cloning source: ${source}") 45 | git clone --depth=1 -q "${source}" -b "${ZEPHIR_PARSER_VERSION}" 1>/dev/null 46 | 47 | cd php-zephir-parser 48 | 49 | $(phpenv which phpize) 50 | ./configure --with-php-config=$(phpenv which php-config) --enable-zephir_parser 1>/dev/null 51 | make --silent -j"$(getconf _NPROCESSORS_ONLN)" 1>/dev/null 52 | make --silent install 1>/dev/null 53 | 54 | echo "extension=zephir_parser.so" >> $(phpenv root)/versions/$(phpenv version-name)/etc/conf.d/travis.ini 55 | $(phpenv which php) --ri 'Zephir Parser' 56 | -------------------------------------------------------------------------------- /ci/install-zephir.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # This file is part of the Phalcon Builder. 4 | # 5 | # (c) Phalcon Team 6 | # 7 | # For the full copyright and license information, please view 8 | # the LICENSE file that was distributed with this source code. 9 | # 10 | # If you did not receive a copy of the license it is available 11 | # through the world-wide-web at the following url: 12 | # https://license.phalcon.io 13 | 14 | # -e Exit immediately if a command exits with a non-zero status. 15 | # -u Treat unset variables as an error when substituting. 16 | # -o This setting prevents errors in a pipeline from being masked. 17 | set -euo pipefail 18 | 19 | # Ensure that this is being run inside a CI container 20 | if [ "${CI}" != "true" ]; 21 | then 22 | (>&2 echo "This script is designed to run inside a CI container only.") 23 | (>&2 echo "Aborting.") 24 | exit 1 25 | fi 26 | 27 | if [ -z ${ZEPHIR_VERSION+x} ]; 28 | then 29 | (>&2 echo "The ZEPHIR_VERSION is absent or empty.") 30 | (>&2 echo "Aborting.") 31 | exit 1 32 | fi 33 | 34 | if [ -z ${PHP_VERSION+x} ]; 35 | then 36 | (>&2 echo "The PHP_VERSION is absent or empty.") 37 | (>&2 echo "Aborting.") 38 | exit 1 39 | fi 40 | 41 | if [ "${CLONE_BRANCH}" != "${NIGHTLY_BRANCH}" ]; 42 | then 43 | (>&1 echo "Zephir is needed only on '${NIGHTLY_BRANCH}' branch.") 44 | (>&1 echo "Current branch is: '${CLONE_BRANCH}'.") 45 | (>&1 echo "Skip installing Zephir.") 46 | exit 0 47 | fi 48 | 49 | pkgname=zephir 50 | downloaddir="${HOME}/.cache/${pkgname}" 51 | downloadfile="${pkgname}-${ZEPHIR_VERSION}.phar" 52 | repo="https://github.com/phalcon/${pkgname}" 53 | source="${repo}/releases/download/${ZEPHIR_VERSION}/${pkgname}.phar" 54 | major_version="$(echo $PHP_VERSION | cut -d '.' -f 1)" 55 | 56 | if [ "$major_version" -eq "7" ]; 57 | then 58 | if [ ! -f "${downloaddir}/${downloadfile}" ]; 59 | then 60 | (>&1 echo "Downloading archive: ${source}") 61 | mkdir -p "${downloaddir}" 62 | wget --quiet --no-clobber -O "${downloaddir}/${downloadfile}" "${source}" 63 | fi 64 | 65 | if [ ! -f "${downloaddir}/${downloadfile}" ]; 66 | then 67 | (>&2 echo "Unable to locate ${downloadfile} file.") 68 | (>&2 echo "Aborting.") 69 | exit 1 70 | fi 71 | 72 | chmod +x "${downloaddir}/${downloadfile}" 73 | ln -s "${downloaddir}/${downloadfile}" "${HOME}/bin/zephir" 74 | else 75 | (>&1 echo "Downloading source: ${repo}.git") 76 | git clone -q --depth=1 "${repo}.git" -b ${ZEPHIR_VERSION} /tmp/zephir &> /dev/null 77 | cd /tmp/zephir 78 | 79 | ZEPHIRDIR="$( cd "$( dirname . )" && pwd )" 80 | sed "s#%ZEPHIRDIR%#$ZEPHIRDIR#g" bin/zephir > bin/zephir-cmd 81 | chmod 755 bin/zephir-cmd 82 | 83 | mkdir -p $HOME/bin 84 | 85 | cp bin/zephir-cmd $HOME/bin/zephir 86 | rm bin/zephir-cmd 87 | 88 | cd $HOME 89 | fi 90 | 91 | zephir 92 | -------------------------------------------------------------------------------- /ci/phalcon.ini: -------------------------------------------------------------------------------- 1 | ; This file is part of the Phalcon. 2 | ; 3 | ; (c) Phalcon Team 4 | ; 5 | ; For the full copyright and license information, please view 6 | ; the LICENSE.txt file that was distributed with this source code. 7 | ; 8 | ; If you did not receive a copy of the license it is available 9 | ; through the world-wide-web at the following url: 10 | ; https://license.phalcon.io 11 | 12 | [phalcon] 13 | extension = phalcon.so 14 | 15 | ; ----- Options to use the Phalcon Framework 16 | 17 | ; phalcon.db.escape_identifiers = On 18 | ; phalcon.db.force_casting = Off 19 | 20 | ; phalcon.orm.events = On 21 | ; phalcon.orm.virtual_foreign_keys = On 22 | ; phalcon.orm.column_renaming = On 23 | ; phalcon.orm.not_null_validations = On 24 | ; phalcon.orm.exception_on_failed_save = Off 25 | ; phalcon.orm.enable_literals = On 26 | ; phalcon.orm.late_state_binding = Off 27 | ; phalcon.orm.enable_implicit_joins = On 28 | ; phalcon.orm.cast_on_hydrate = Off 29 | ; phalcon.orm.ignore_unknown_columns = Off 30 | ; phalcon.orm.update_snapshot_on_save = On 31 | ; phalcon.orm.disable_assign_setters = Off 32 | -------------------------------------------------------------------------------- /ci/prepare-debian.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # This file is part of the Phalcon Builder. 4 | # 5 | # (c) Phalcon Team 6 | # 7 | # For the full copyright and license information, please view 8 | # the LICENSE file that was distributed with this source code. 9 | # 10 | # If you did not receive a copy of the license it is available 11 | # through the world-wide-web at the following url: 12 | # https://license.phalcon.io 13 | 14 | # -e Exit immediately if a command exits with a non-zero status. 15 | # -u Treat unset variables as an error when substituting. 16 | # -o This setting prevents errors in a pipeline from being masked. 17 | set -euo pipefail 18 | 19 | # Ensure that this is being run inside a CI container 20 | if [ "${CI}" != "true" ]; 21 | then 22 | (>&2 echo "This script is designed to run inside a CI container only.") 23 | (>&2 echo "Aborting.") 24 | exit 1 25 | fi 26 | 27 | case "$PHP_VERSION" in 28 | "5.5" | "5.6") 29 | cp debian/controls/legacy debian/control 30 | cp debian/postinsts/legacy debian/php5-phalcon.postinst 31 | cp debian/preinsts/legacy debian/php5-phalcon.preinst 32 | ;; 33 | "7.0" | "7.1"| "7.2" | "7.3" | "7.4") 34 | cp "debian/controls/php-${PHP_VERSION}" debian/control 35 | cp "debian/postinsts/php-${PHP_VERSION}" "debian/php${PHP_VERSION}-phalcon.postinst" 36 | cp "debian/preinsts/php-${PHP_VERSION}" "debian/php${PHP_VERSION}-phalcon.preinst" 37 | ;; 38 | *) 39 | (>&2 echo "Unsopported PHP version: ${PHP_VERSION}") 40 | (>&2 echo "Aborting.") 41 | exit 1 42 | ;; 43 | esac 44 | -------------------------------------------------------------------------------- /ci/prepare-rpm.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # This file is part of the Phalcon Builder. 4 | # 5 | # (c) Phalcon Team 6 | # 7 | # For the full copyright and license information, please view 8 | # the LICENSE file that was distributed with this source code. 9 | # 10 | # If you did not receive a copy of the license it is available 11 | # through the world-wide-web at the following url: 12 | # https://license.phalcon.io 13 | 14 | # -e Exit immediately if a command exits with a non-zero status. 15 | # -u Treat unset variables as an error when substituting. 16 | # -o This setting prevents errors in a pipeline from being masked. 17 | set -euo pipefail 18 | 19 | # Ensure that this is being run inside a CI container 20 | if [ "${CI}" != "true" ]; 21 | then 22 | (>&2 echo "This script is designed to run inside a CI container only.") 23 | (>&2 echo "Aborting.") 24 | exit 1 25 | fi 26 | 27 | # Ensure that this is being run for an expected rpm maintainer 28 | if [ "${REPO_VENDOR}" != "ius" ]; 29 | then 30 | (>&2 echo "Currently, only IUS (remi) package creation is supported.") 31 | (>&2 echo "Aborting.") 32 | exit 1 33 | fi 34 | 35 | case "$PHP_VERSION" in 36 | "5.5" | "5.6" | "7.0" | "7.1"| "7.2" | "7.3" | "7.4" ) 37 | cp "rpm/specs/remi-php-${PHP_VERSION}.spec" rpm/php-phalcon.spec 38 | ;; 39 | *) 40 | (>&2 echo "Unsopported PHP version: ${PHP_VERSION}") 41 | (>&2 echo "Aborting.") 42 | exit 1 43 | ;; 44 | esac 45 | 46 | (find rpm -mindepth 1 -maxdepth 1 -name php-phalcon.spec -type f | egrep '.*' 2>&1 >/dev/null) || \ 47 | (>&2 echo "Can't find RPM spec in rpm/ directory."; >&2 echo "Aborting."; exit 1) 48 | -------------------------------------------------------------------------------- /ci/regenerate-build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # This file is part of the Phalcon Builder. 4 | # 5 | # (c) Phalcon Team 6 | # 7 | # For the full copyright and license information, please view 8 | # the LICENSE file that was distributed with this source code. 9 | # 10 | # If you did not receive a copy of the license it is available 11 | # through the world-wide-web at the following url: 12 | # https://license.phalcon.io 13 | 14 | # -e Exit immediately if a command exits with a non-zero status. 15 | # -u Treat unset variables as an error when substituting. 16 | # -o This setting prevents errors in a pipeline from being masked. 17 | set -euo pipefail 18 | 19 | # Remove a Makefile desired for local development only 20 | [ -f "$SOURCEDIR/Makefile" ] && echo '' > "$SOURCEDIR/Makefile" 21 | 22 | if [ "${CLONE_BRANCH}" != "${NIGHTLY_BRANCH}" ]; 23 | then 24 | (>&1 echo "Phalcon C code need to regenerated only on '${NIGHTLY_BRANCH}' branch.") 25 | (>&1 echo "Current branch is: '${CLONE_BRANCH}'.") 26 | (>&1 echo "Skip regenerate C code.") 27 | exit 0 28 | fi 29 | 30 | cd "$SOURCEDIR" || exit 1 31 | 32 | zephir fullclean 33 | zephir generate "$ZEND_BACKEND" 34 | 35 | cd "$SOURCEDIR/build" || exit 1 36 | "$(phpenv which php)" gen-build.php 37 | -------------------------------------------------------------------------------- /ci/setup-build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # This file is part of the Phalcon Builder. 4 | # 5 | # (c) Phalcon Team 6 | # 7 | # For the full copyright and license information, please view 8 | # the LICENSE file that was distributed with this source code. 9 | # 10 | # If you did not receive a copy of the license it is available 11 | # through the world-wide-web at the following url: 12 | # https://license.phalcon.io 13 | 14 | # Ensure that this is being run inside a CI container 15 | if [ "${CI}" != "true" ]; 16 | then 17 | (>&2 echo "This script is designed to run inside a CI container only.") 18 | (>&2 echo "Aborting.") 19 | exit 1 20 | fi 21 | 22 | if [ -z ${PHP_VERSION+x} ]; 23 | then 24 | (>&2 echo "The PHP_VERSION is absent or empty.") 25 | (>&2 echo "Aborting.") 26 | exit 1 27 | fi 28 | 29 | phpenv config-rm xdebug.ini || true 30 | 31 | major_version="$(echo $PHP_VERSION | cut -d '.' -f 1)" 32 | if [ "$major_version" -eq "5" ]; 33 | then 34 | export ZEPHIR_VERSION="0.10.14" 35 | export ZEPHIR_PARSER_VERSION="v1.1.3" 36 | export ZEND_BACKEND="--backend=ZendEngine2" 37 | fi 38 | -------------------------------------------------------------------------------- /debian/changelog: -------------------------------------------------------------------------------- 1 | php-phalcon (3.1.0-1) stable; urgency=low 2 | 3 | * Automated build. See details at release page 4 | https://github.com/phalcon/cphalcon/releases 5 | 6 | -- Serghei Iakovlev Wed, 22 Mar 2017 21:30:00 +0300 7 | -------------------------------------------------------------------------------- /debian/compat: -------------------------------------------------------------------------------- 1 | 9 2 | -------------------------------------------------------------------------------- /debian/controls/legacy: -------------------------------------------------------------------------------- 1 | Source: php-phalcon 2 | Section: php 3 | Priority: optional 4 | Maintainer: Serghei Iakovlev 5 | Build-Depends: debhelper (>= 9), dpkg-dev (>= 1.16.1~), build-essential, re2c, php5-dev, php5-json, libpcre3-dev, libfile-fcntllock-perl 6 | Standards-Version: 3.9.6 7 | Vcs-Git: git://github.com/phalcon/cphalcon.git 8 | Vcs-Browser: https://github.com/phalcon/cphalcon 9 | 10 | Package: php5-phalcon 11 | Architecture: any 12 | Priority: optional 13 | Pre-Depends: dpkg (>= 1.15.7.2) 14 | Depends: ucf, ${shlibs:Depends}, ${php:Depends}, ${misc:Depends} 15 | Suggests: php5-mysql, php5-sqlite, php5-pgsql, php5-mongo, php5-memcached 16 | Description: High performance PHP framework 17 | Phalcon is an open source web framework delivered as a C extension for 18 | the PHP language providing high performance and lower resource consumption. 19 | . 20 | This package provides the Phalcon PHP extension. 21 | 22 | Package: php5-phalcon-dbgsym 23 | Depends: ucf, ${misc:Depends}, php5-phalcon (= ${binary:Version}) 24 | Recommends: gdb 25 | Replaces: php5-phalcon-dbg (<< 3.1.0) 26 | Suggests: php5-dbg 27 | Section: debug 28 | Priority: extra 29 | Architecture: any 30 | Description: Debug symbols for php5-phalcon 31 | Phalcon is an open source web framework delivered as a C extension for 32 | the PHP language providing high performance and lower resource consumption. 33 | . 34 | This package provides the debug symbols for Phalcon PHP extension 35 | needed for properly debugging errors with gdb. 36 | -------------------------------------------------------------------------------- /debian/controls/php-7.0: -------------------------------------------------------------------------------- 1 | Source: php-phalcon 2 | Section: php 3 | Priority: optional 4 | Maintainer: Serghei Iakovlev 5 | Build-Depends: debhelper (>= 9), dpkg-dev (>= 1.16.1~), build-essential, re2c, php7.0-dev, php7.0-json, libpcre3-dev, libfile-fcntllock-perl 6 | Standards-Version: 3.9.7 7 | Vcs-Git: git://github.com/phalcon/cphalcon.git 8 | Vcs-Browser: https://github.com/phalcon/cphalcon 9 | 10 | Package: php7.0-phalcon 11 | Architecture: any 12 | Priority: optional 13 | Pre-Depends: dpkg (>= 1.15.7.2) 14 | Depends: ucf, ${shlibs:Depends}, ${php:Depends}, ${misc:Depends} 15 | Suggests: php7.0-mysql, php7.0-sqlite3, php7.0-pgsql, php7.0-memcached 16 | Description: High performance PHP framework 17 | Phalcon is an open source web framework delivered as a C extension for 18 | the PHP language providing high performance and lower resource consumption. 19 | . 20 | This package provides the Phalcon PHP extension. 21 | 22 | Package: php7.0-phalcon-dbgsym 23 | Depends: ucf, ${misc:Depends}, php7.0-phalcon (= ${binary:Version}) 24 | Recommends: gdb 25 | Replaces: php7.0-phalcon-dbg (<< 3.1.0) 26 | Suggests: php7.0-common-dbgsym 27 | Section: debug 28 | Priority: extra 29 | Architecture: any 30 | Description: Debug symbols for php7.0-phalcon 31 | Phalcon is an open source web framework delivered as a C extension for 32 | the PHP language providing high performance and lower resource consumption. 33 | . 34 | This package provides the debug symbols for Phalcon PHP extension 35 | needed for properly debugging errors with gdb. 36 | -------------------------------------------------------------------------------- /debian/controls/php-7.1: -------------------------------------------------------------------------------- 1 | Source: php-phalcon 2 | Section: php 3 | Priority: optional 4 | Maintainer: Serghei Iakovlev 5 | Build-Depends: debhelper (>= 9), dpkg-dev (>= 1.16.1~), build-essential, re2c, php7.1-dev, php7.1-json, libpcre3-dev, libfile-fcntllock-perl 6 | Standards-Version: 3.9.7 7 | Vcs-Git: git://github.com/phalcon/cphalcon.git 8 | Vcs-Browser: https://github.com/phalcon/cphalcon 9 | 10 | Package: php7.1-phalcon 11 | Architecture: any 12 | Priority: optional 13 | Pre-Depends: dpkg (>= 1.15.7.2) 14 | Depends: ucf, ${shlibs:Depends}, ${php:Depends}, ${misc:Depends} 15 | Suggests: php7.1-mysql, php7.1-sqlite3, php7.1-pgsql, php7.1-memcached 16 | Description: High performance PHP framework 17 | Phalcon is an open source web framework delivered as a C extension for 18 | the PHP language providing high performance and lower resource consumption. 19 | . 20 | This package provides the Phalcon PHP extension. 21 | 22 | Package: php7.1-phalcon-dbgsym 23 | Depends: ucf, ${misc:Depends}, php7.1-phalcon (= ${binary:Version}) 24 | Recommends: gdb 25 | Replaces: php7.1-phalcon-dbg (<< 3.1.0) 26 | Suggests: php7.1-common-dbgsym 27 | Section: debug 28 | Priority: extra 29 | Architecture: any 30 | Description: Debug symbols for php7.1-phalcon 31 | Phalcon is an open source web framework delivered as a C extension for 32 | the PHP language providing high performance and lower resource consumption. 33 | . 34 | This package provides the debug symbols for Phalcon PHP extension 35 | needed for properly debugging errors with gdb. 36 | -------------------------------------------------------------------------------- /debian/controls/php-7.2: -------------------------------------------------------------------------------- 1 | Source: php-phalcon 2 | Section: php 3 | Priority: optional 4 | Maintainer: Serghei Iakovlev 5 | Build-Depends: debhelper (>= 9), dpkg-dev (>= 1.16.1~), build-essential, re2c, php7.2-dev, php7.2-json, libpcre3-dev, libfile-fcntllock-perl 6 | Standards-Version: 3.9.7 7 | Vcs-Git: git://github.com/phalcon/cphalcon.git 8 | Vcs-Browser: https://github.com/phalcon/cphalcon 9 | 10 | Package: php7.2-phalcon 11 | Architecture: any 12 | Priority: optional 13 | Pre-Depends: dpkg (>= 1.15.7.2) 14 | Depends: ucf, ${shlibs:Depends}, ${php:Depends}, ${misc:Depends} 15 | Suggests: php7.2-mysql, php7.2-sqlite3, php7.2-pgsql, php7.2-memcached 16 | Description: High performance PHP framework 17 | Phalcon is an open source web framework delivered as a C extension for 18 | the PHP language providing high performance and lower resource consumption. 19 | . 20 | This package provides the Phalcon PHP extension. 21 | 22 | Package: php7.2-phalcon-dbgsym 23 | Depends: ucf, ${misc:Depends}, php7.2-phalcon (= ${binary:Version}) 24 | Recommends: gdb 25 | Replaces: php7.2-phalcon-dbg (<< 3.1.0) 26 | Suggests: php7.2-common-dbgsym 27 | Section: debug 28 | Priority: extra 29 | Architecture: any 30 | Description: Debug symbols for php7.2-phalcon 31 | Phalcon is an open source web framework delivered as a C extension for 32 | the PHP language providing high performance and lower resource consumption. 33 | . 34 | This package provides the debug symbols for Phalcon PHP extension 35 | needed for properly debugging errors with gdb. 36 | -------------------------------------------------------------------------------- /debian/controls/php-7.3: -------------------------------------------------------------------------------- 1 | Source: php-phalcon 2 | Section: php 3 | Priority: optional 4 | Maintainer: Serghei Iakovlev 5 | Build-Depends: debhelper (>= 9), dpkg-dev (>= 1.16.1~), build-essential, re2c, php7.3-dev, php7.3-json, libpcre3-dev, libfile-fcntllock-perl 6 | Standards-Version: 3.9.7 7 | Vcs-Git: git://github.com/phalcon/cphalcon.git 8 | Vcs-Browser: https://github.com/phalcon/cphalcon 9 | 10 | Package: php7.3-phalcon 11 | Architecture: any 12 | Priority: optional 13 | Pre-Depends: dpkg (>= 1.15.7.2) 14 | Depends: ucf, ${shlibs:Depends}, ${php:Depends}, ${misc:Depends}, php7.3-psr 15 | Suggests: php7.3-mysql, php7.3-sqlite3, php7.3-pgsql, php7.3-memcached 16 | Description: High performance PHP framework 17 | Phalcon is an open source web framework delivered as a C extension for 18 | the PHP language providing high performance and lower resource consumption. 19 | . 20 | This package provides the Phalcon PHP extension. 21 | 22 | Package: php7.3-phalcon-dbgsym 23 | Depends: ucf, ${misc:Depends}, php7.3-phalcon (= ${binary:Version}) 24 | Recommends: gdb 25 | Replaces: php7.3-phalcon-dbg (<< 3.1.0) 26 | Suggests: php7.3-common-dbgsym 27 | Section: debug 28 | Priority: extra 29 | Architecture: any 30 | Description: Debug symbols for php7.3-phalcon 31 | Phalcon is an open source web framework delivered as a C extension for 32 | the PHP language providing high performance and lower resource consumption. 33 | . 34 | This package provides the debug symbols for Phalcon PHP extension 35 | needed for properly debugging errors with gdb. 36 | -------------------------------------------------------------------------------- /debian/controls/php-7.4: -------------------------------------------------------------------------------- 1 | Source: php-phalcon 2 | Section: php 3 | Priority: optional 4 | Maintainer: Serghei Iakovlev 5 | Build-Depends: debhelper (>= 9), dpkg-dev (>= 1.16.1~), build-essential, re2c, php7.4-dev, php7.4-json, libpcre3-dev 6 | Standards-Version: 3.9.7 7 | Vcs-Git: git://github.com/phalcon/cphalcon.git 8 | Vcs-Browser: https://github.com/phalcon/cphalcon 9 | 10 | Package: php7.4-phalcon 11 | Architecture: any 12 | Priority: optional 13 | Pre-Depends: dpkg (>= 1.15.7.2) 14 | Depends: ucf, ${shlibs:Depends}, ${php:Depends}, ${misc:Depends}, php7.4-psr 15 | Suggests: php7.4-mysql, php7.4-sqlite3, php7.4-pgsql, php7.4-memcached 16 | Description: High performance PHP framework 17 | Phalcon is an open source web framework delivered as a C extension for 18 | the PHP language providing high performance and lower resource consumption. 19 | . 20 | This package provides the Phalcon PHP extension. 21 | 22 | Package: php7.4-phalcon-dbgsym 23 | Depends: ucf, ${misc:Depends}, php7.4-phalcon (= ${binary:Version}) 24 | Recommends: gdb 25 | Replaces: php7.4-phalcon-dbg (<< 3.1.0) 26 | Suggests: php7.4-common-dbgsym 27 | Section: debug 28 | Priority: extra 29 | Architecture: any 30 | Description: Debug symbols for php7.4-phalcon 31 | Phalcon is an open source web framework delivered as a C extension for 32 | the PHP language providing high performance and lower resource consumption. 33 | . 34 | This package provides the debug symbols for Phalcon PHP extension 35 | needed for properly debugging errors with gdb. 36 | -------------------------------------------------------------------------------- /debian/copyright: -------------------------------------------------------------------------------- 1 | Format: http://dep.debian.net/deps/dep5/ 2 | Debianized-By: Serghei Iakovlev 3 | Upstream-Name: php-phalcon 4 | Upstream-Contact: Phalcon Team 5 | Source: https://github.com/phalcon/cphalcon 6 | 7 | Files: * 8 | Copyright: Copyright (c) 2011-present Phalcon Team 9 | License: BSD-3-clause 10 | Copyright (c) 2011-present, Phalcon Team 11 | All rights reserved. 12 | . 13 | Redistribution and use in source and binary forms, with or without 14 | modification, are permitted provided that the following conditions 15 | are met: 16 | . 17 | 1. Redistributions of source code must retain the above copyright 18 | notice, this list of conditions and the following disclaimer. 19 | . 20 | 2. Redistributions in binary form must reproduce the above copyright 21 | notice, this list of conditions and the following disclaimer in 22 | the documentation and/or other materials provided with 23 | the distribution. 24 | . 25 | 3. Neither the name of the Phalcon nor the names of its 26 | contributors may be used to endorse or promote products derived 27 | from this software without specific prior written permission. 28 | . 29 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 30 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 31 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 32 | FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 33 | THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 34 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 35 | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 36 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 37 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 38 | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY 39 | WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 40 | POSSIBILITY OF SUCH DAMAGE. 41 | -------------------------------------------------------------------------------- /debian/phalcon.ini: -------------------------------------------------------------------------------- 1 | ; This file is part of the Phalcon. 2 | ; 3 | ; (c) Phalcon Team 4 | ; 5 | ; For the full copyright and license information, please view 6 | ; the LICENSE.txt file that was distributed with this source code. 7 | ; 8 | ; If you did not receive a copy of the license it is available 9 | ; through the world-wide-web at the following url: 10 | ; https://license.phalcon.io 11 | 12 | ; configuration for php phalcon module 13 | ; priority=50 14 | [phalcon] 15 | extension = phalcon.so 16 | 17 | ; ----- Options to use the Phalcon Framework 18 | 19 | ; phalcon.db.escape_identifiers = On 20 | ; phalcon.db.force_casting = Off 21 | 22 | ; phalcon.orm.events = On 23 | ; phalcon.orm.virtual_foreign_keys = On 24 | ; phalcon.orm.column_renaming = On 25 | ; phalcon.orm.not_null_validations = On 26 | ; phalcon.orm.exception_on_failed_save = Off 27 | ; phalcon.orm.enable_literals = On 28 | ; phalcon.orm.late_state_binding = Off 29 | ; phalcon.orm.enable_implicit_joins = On 30 | ; phalcon.orm.cast_on_hydrate = Off 31 | ; phalcon.orm.ignore_unknown_columns = Off 32 | ; phalcon.orm.update_snapshot_on_save = On 33 | ; phalcon.orm.disable_assign_setters = Off 34 | ; phalcon.orm.resultset_prefetch_records = Off 35 | ; phalcon.orm.cast_last_insert_id_to_int = Off 36 | -------------------------------------------------------------------------------- /debian/postinsts/legacy: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | #EXTRA# 6 | 7 | if [ "$1" = "configure" ]; then 8 | # Install the new versioned configuration 9 | inidir=/etc/php5/mods-available 10 | 11 | if [ -e /usr/share/php5/php5-maintscript-helper ] ; then 12 | . /usr/share/php5/php5-maintscript-helper 13 | 14 | # Register new conffile with UCF 15 | ucf /usr/share/php5/php5-phalcon/phalcon/phalcon.ini ${inidir}/phalcon.ini 16 | ucfr --force php5-phalcon ${inidir}/phalcon.ini 17 | 18 | # Move pre-extension manager conffile 19 | dpkg-maintscript-helper mv_conffile /etc/php5/conf.d/phalcon.ini ${inidir}/phalcon.ini 3.0.0 -- "$@"; 20 | 21 | if [ -f "${inidir}/phalcon.ini.dpkg-new" ]; then 22 | md5sum="$(md5sum ${inidir}/phalcon.ini.dpkg-new | sed -e 's/ .*//')" 23 | old_md5sum="$(md5sum ${inidir}/phalcon.ini | sed -e 's/ .*//')" 24 | if [ "$md5sum" = "$old_md5sum" ]; then 25 | mv "${inidir}/phalcon.ini.dpkg-new" "${inidir}/phalcon.ini" 26 | fi 27 | fi 28 | 29 | php5_invoke enmod ALL phalcon 30 | fi 31 | fi 32 | 33 | #DEBHELPER# 34 | 35 | exit 0 36 | -------------------------------------------------------------------------------- /debian/postinsts/php-7.0: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | #EXTRA# 6 | 7 | if [ "$1" = "configure" ]; then 8 | # Install the new versioned configuration 9 | inidir=/etc/php/7.0/mods-available 10 | 11 | if [ -e /usr/lib/php/php-maintscript-helper ] ; then 12 | . /usr/lib/php/php-maintscript-helper 13 | 14 | # Register new conffile with UCF 15 | ucf /usr/share/php7.0-phalcon/phalcon/phalcon.ini ${inidir}/phalcon.ini 16 | ucfr --force php7.0-phalcon ${inidir}/phalcon.ini 17 | 18 | if [ -f "${inidir}/phalcon.ini.dpkg-new" ]; then 19 | md5sum="$(md5sum ${inidir}/phalcon.ini.dpkg-new | sed -e 's/ .*//')" 20 | old_md5sum="$(md5sum ${inidir}/phalcon.ini | sed -e 's/ .*//')" 21 | 22 | if [ "$md5sum" = "$old_md5sum" ]; then 23 | mv "${inidir}/phalcon.ini.dpkg-new" "${inidir}/phalcon.ini" 24 | fi 25 | fi 26 | 27 | php_invoke enmod 7.0 ALL phalcon 28 | fi 29 | fi 30 | 31 | #DEBHELPER# 32 | 33 | exit 0 34 | -------------------------------------------------------------------------------- /debian/postinsts/php-7.1: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | #EXTRA# 6 | 7 | if [ "$1" = "configure" ]; then 8 | # Install the new versioned configuration 9 | inidir=/etc/php/7.1/mods-available 10 | 11 | if [ -e /usr/lib/php/php-maintscript-helper ] ; then 12 | . /usr/lib/php/php-maintscript-helper 13 | 14 | # Register new conffile with UCF 15 | ucf /usr/share/php7.1-phalcon/phalcon/phalcon.ini ${inidir}/phalcon.ini 16 | ucfr --force php7.1-phalcon ${inidir}/phalcon.ini 17 | 18 | if [ -f "${inidir}/phalcon.ini.dpkg-new" ]; then 19 | md5sum="$(md5sum ${inidir}/phalcon.ini.dpkg-new | sed -e 's/ .*//')" 20 | old_md5sum="$(md5sum ${inidir}/phalcon.ini | sed -e 's/ .*//')" 21 | 22 | if [ "$md5sum" = "$old_md5sum" ]; then 23 | mv "${inidir}/phalcon.ini.dpkg-new" "${inidir}/phalcon.ini" 24 | fi 25 | fi 26 | 27 | php_invoke enmod 7.1 ALL phalcon 28 | fi 29 | fi 30 | 31 | #DEBHELPER# 32 | 33 | exit 0 34 | -------------------------------------------------------------------------------- /debian/postinsts/php-7.2: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | #EXTRA# 6 | 7 | if [ "$1" = "configure" ]; then 8 | # Install the new versioned configuration 9 | inidir=/etc/php/7.2/mods-available 10 | 11 | if [ -e /usr/lib/php/php-maintscript-helper ] ; then 12 | . /usr/lib/php/php-maintscript-helper 13 | 14 | # Register new conffile with UCF 15 | ucf /usr/share/php7.2-phalcon/phalcon/phalcon.ini ${inidir}/phalcon.ini 16 | ucfr --force php7.2-phalcon ${inidir}/phalcon.ini 17 | 18 | if [ -f "${inidir}/phalcon.ini.dpkg-new" ]; then 19 | md5sum="$(md5sum ${inidir}/phalcon.ini.dpkg-new | sed -e 's/ .*//')" 20 | old_md5sum="$(md5sum ${inidir}/phalcon.ini | sed -e 's/ .*//')" 21 | 22 | if [ "$md5sum" = "$old_md5sum" ]; then 23 | mv "${inidir}/phalcon.ini.dpkg-new" "${inidir}/phalcon.ini" 24 | fi 25 | fi 26 | 27 | php_invoke enmod 7.2 ALL phalcon 28 | fi 29 | fi 30 | 31 | #DEBHELPER# 32 | 33 | exit 0 34 | -------------------------------------------------------------------------------- /debian/postinsts/php-7.3: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | #EXTRA# 6 | 7 | if [ "$1" = "configure" ]; then 8 | # Install the new versioned configuration 9 | inidir=/etc/php/7.3/mods-available 10 | 11 | if [ -e /usr/lib/php/php-maintscript-helper ] ; then 12 | . /usr/lib/php/php-maintscript-helper 13 | 14 | # Register new conffile with UCF 15 | ucf /usr/share/php7.3-phalcon/phalcon/phalcon.ini ${inidir}/phalcon.ini 16 | ucfr --force php7.3-phalcon ${inidir}/phalcon.ini 17 | 18 | if [ -f "${inidir}/phalcon.ini.dpkg-new" ]; then 19 | md5sum="$(md5sum ${inidir}/phalcon.ini.dpkg-new | sed -e 's/ .*//')" 20 | old_md5sum="$(md5sum ${inidir}/phalcon.ini | sed -e 's/ .*//')" 21 | 22 | if [ "$md5sum" = "$old_md5sum" ]; then 23 | mv "${inidir}/phalcon.ini.dpkg-new" "${inidir}/phalcon.ini" 24 | fi 25 | fi 26 | 27 | php_invoke enmod 7.3 ALL phalcon 28 | fi 29 | fi 30 | 31 | #DEBHELPER# 32 | 33 | exit 0 34 | -------------------------------------------------------------------------------- /debian/postinsts/php-7.4: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | #EXTRA# 6 | 7 | if [ "$1" = "configure" ]; then 8 | # Install the new versioned configuration 9 | inidir=/etc/php/7.4/mods-available 10 | 11 | if [ -e /usr/lib/php/php-maintscript-helper ] ; then 12 | . /usr/lib/php/php-maintscript-helper 13 | 14 | # Register new conffile with UCF 15 | ucf /usr/share/php7.4-phalcon/phalcon/phalcon.ini ${inidir}/phalcon.ini 16 | ucfr --force php7.4-phalcon ${inidir}/phalcon.ini 17 | 18 | if [ -f "${inidir}/phalcon.ini.dpkg-new" ]; then 19 | md5sum="$(md5sum ${inidir}/phalcon.ini.dpkg-new | sed -e 's/ .*//')" 20 | old_md5sum="$(md5sum ${inidir}/phalcon.ini | sed -e 's/ .*//')" 21 | 22 | if [ "$md5sum" = "$old_md5sum" ]; then 23 | mv "${inidir}/phalcon.ini.dpkg-new" "${inidir}/phalcon.ini" 24 | fi 25 | fi 26 | 27 | php_invoke enmod 7.4 ALL phalcon 28 | fi 29 | fi 30 | 31 | #DEBHELPER# 32 | 33 | exit 0 34 | -------------------------------------------------------------------------------- /debian/prebuild.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # This line instructs debconf to store in its database an answer for 4 | # the program debconf. If (the running program) debconf later asks 5 | # (the database of answers) debconf what is my frontend the answer 6 | # will be frontend is Noninteractive. 7 | # 8 | # It has nothing to do with the interactivity of bash. 9 | echo 'debconf debconf/frontend select Noninteractive' | sudo debconf-set-selections 10 | -------------------------------------------------------------------------------- /debian/preinsts/legacy: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | #EXTRA# 6 | 7 | dpkg-maintscript-helper mv_conffile /etc/php5/conf.d/phalcon.ini /etc/php5/mods-available/phalcon.ini 3.0.0 -- "$@" 8 | 9 | #DEBHELPER# 10 | 11 | exit 0 12 | -------------------------------------------------------------------------------- /debian/preinsts/php-7.0: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | #EXTRA# 6 | 7 | if [ "$1" = "upgrade" ]; then 8 | inidir=/etc/php/7.0/mods-available 9 | 10 | # First purge the old unversioned configuration 11 | if [ -e ${inidir}/phalcon.ini ]; then 12 | for ext in '~' '%' .bak .ucf-new .ucf-old .ucf-dist; do 13 | rm -f ${inidir}/phalcon.ini${ext} 14 | done 15 | 16 | rm -f ${inidir}/phalcon.ini 17 | 18 | if which ucf >/dev/null; then 19 | ucf --purge ${inidir}/phalcon.ini >/dev/null || true 20 | fi 21 | 22 | if which ucfr >/dev/null; then 23 | ucfr --force --purge php7.0-phalcon ${inidir}/phalcon.ini >/dev/null || true 24 | fi 25 | fi 26 | 27 | # Cleanup of the old symlinks (including broken symlinks) 28 | find /etc/php/7.0/ -type l | 29 | while read symlink; do 30 | if [ "$(readlink $symlink)" = "${inidir}/phalcon.ini" ]; then 31 | rm -f "${symlink}" 32 | fi 33 | done 34 | fi 35 | 36 | #DEBHELPER# 37 | 38 | exit 0 39 | -------------------------------------------------------------------------------- /debian/preinsts/php-7.1: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | #EXTRA# 6 | 7 | if [ "$1" = "upgrade" ]; then 8 | inidir=/etc/php/7.1/mods-available 9 | 10 | # First purge the old unversioned configuration 11 | if [ -e ${inidir}/phalcon.ini ]; then 12 | for ext in '~' '%' .bak .ucf-new .ucf-old .ucf-dist; do 13 | rm -f ${inidir}/phalcon.ini${ext} 14 | done 15 | 16 | rm -f ${inidir}/phalcon.ini 17 | 18 | if which ucf >/dev/null; then 19 | ucf --purge ${inidir}/phalcon.ini >/dev/null || true 20 | fi 21 | 22 | if which ucfr >/dev/null; then 23 | ucfr --force --purge php7.1-phalcon ${inidir}/phalcon.ini >/dev/null || true 24 | fi 25 | fi 26 | 27 | # Cleanup of the old symlinks (including broken symlinks) 28 | find /etc/php/7.1/ -type l | 29 | while read symlink; do 30 | if [ "$(readlink $symlink)" = "${inidir}/phalcon.ini" ]; then 31 | rm -f "${symlink}" 32 | fi 33 | done 34 | fi 35 | 36 | #DEBHELPER# 37 | 38 | exit 0 39 | -------------------------------------------------------------------------------- /debian/preinsts/php-7.2: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | #EXTRA# 6 | 7 | if [ "$1" = "upgrade" ]; then 8 | inidir=/etc/php/7.2/mods-available 9 | 10 | # First purge the old unversioned configuration 11 | if [ -e ${inidir}/phalcon.ini ]; then 12 | for ext in '~' '%' .bak .ucf-new .ucf-old .ucf-dist; do 13 | rm -f ${inidir}/phalcon.ini${ext} 14 | done 15 | 16 | rm -f ${inidir}/phalcon.ini 17 | 18 | if which ucf >/dev/null; then 19 | ucf --purge ${inidir}/phalcon.ini >/dev/null || true 20 | fi 21 | 22 | if which ucfr >/dev/null; then 23 | ucfr --force --purge php7.2-phalcon ${inidir}/phalcon.ini >/dev/null || true 24 | fi 25 | fi 26 | 27 | # Cleanup of the old symlinks (including broken symlinks) 28 | find /etc/php/7.2/ -type l | 29 | while read symlink; do 30 | if [ "$(readlink $symlink)" = "${inidir}/phalcon.ini" ]; then 31 | rm -f "${symlink}" 32 | fi 33 | done 34 | fi 35 | 36 | #DEBHELPER# 37 | 38 | exit 0 39 | -------------------------------------------------------------------------------- /debian/preinsts/php-7.3: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | #EXTRA# 6 | 7 | if [ "$1" = "upgrade" ]; then 8 | inidir=/etc/php/7.3/mods-available 9 | 10 | # First purge the old unversioned configuration 11 | if [ -e ${inidir}/phalcon.ini ]; then 12 | for ext in '~' '%' .bak .ucf-new .ucf-old .ucf-dist; do 13 | rm -f ${inidir}/phalcon.ini${ext} 14 | done 15 | 16 | rm -f ${inidir}/phalcon.ini 17 | 18 | if which ucf >/dev/null; then 19 | ucf --purge ${inidir}/phalcon.ini >/dev/null || true 20 | fi 21 | 22 | if which ucfr >/dev/null; then 23 | ucfr --force --purge php7.3-phalcon ${inidir}/phalcon.ini >/dev/null || true 24 | fi 25 | fi 26 | 27 | # Cleanup of the old symlinks (including broken symlinks) 28 | find /etc/php/7.3/ -type l | 29 | while read symlink; do 30 | if [ "$(readlink $symlink)" = "${inidir}/phalcon.ini" ]; then 31 | rm -f "${symlink}" 32 | fi 33 | done 34 | fi 35 | 36 | #DEBHELPER# 37 | 38 | exit 0 39 | -------------------------------------------------------------------------------- /debian/preinsts/php-7.4: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | #EXTRA# 6 | 7 | if [ "$1" = "upgrade" ]; then 8 | inidir=/etc/php/7.4/mods-available 9 | 10 | # First purge the old unversioned configuration 11 | if [ -e ${inidir}/phalcon.ini ]; then 12 | for ext in '~' '%' .bak .ucf-new .ucf-old .ucf-dist; do 13 | rm -f ${inidir}/phalcon.ini${ext} 14 | done 15 | 16 | rm -f ${inidir}/phalcon.ini 17 | 18 | if which ucf >/dev/null; then 19 | ucf --purge ${inidir}/phalcon.ini >/dev/null || true 20 | fi 21 | 22 | if which ucfr >/dev/null; then 23 | ucfr --force --purge php7.4-phalcon ${inidir}/phalcon.ini >/dev/null || true 24 | fi 25 | fi 26 | 27 | # Cleanup of the old symlinks (including broken symlinks) 28 | find /etc/php/7.4/ -type l | 29 | while read symlink; do 30 | if [ "$(readlink $symlink)" = "${inidir}/phalcon.ini" ]; then 31 | rm -f "${symlink}" 32 | fi 33 | done 34 | fi 35 | 36 | #DEBHELPER# 37 | 38 | exit 0 39 | -------------------------------------------------------------------------------- /debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | # -*- makefile -*- 3 | # 4 | # This file is part of the Phalcon. 5 | # 6 | # (c) Phalcon Team 7 | # 8 | # For the full copyright and license information, please view 9 | # the LICENSE.txt file that was distributed with this source code. 10 | # 11 | # If you did not receive a copy of the license it is available 12 | # through the world-wide-web at the following url: 13 | # https://license.phalcon.io 14 | 15 | # Uncomment this to turn on verbose mode. 16 | export DH_VERBOSE=1 17 | 18 | # This has to be exported to make some magic below work. 19 | export DH_OPTIONS 20 | 21 | # enable dpkg build flags 22 | export DEB_BUILD_MAINT_OPTIONS = hardening=+all 23 | DPKG_EXPORT_BUILDFLAGS=1 24 | 25 | include /usr/share/dpkg/default.mk 26 | 27 | export DEB_HOST_MULTIARCH 28 | 29 | PHP_VERSION:= 30 | PROPOSED_PHP_VERSION=$(PHP_VERSION) 31 | 32 | ifeq ($(strip $(PROPOSED_PHP_VERSION)),) 33 | PHP_FULL_VERSION=$(shell php-config --version 2> /dev/null || php-config5 --version 2> /dev/null) 34 | PHP_MAJOR_VERSION=$(shell echo $(PHP_FULL_VERSION) | head -c 1) 35 | else 36 | PHP_MAJOR_VERSION=$(shell echo $(PROPOSED_PHP_VERSION) | head -c 1) 37 | endif 38 | 39 | ifeq ($(PHP_MAJOR_VERSION),$(filter $(PHP_MAJOR_VERSION),5)) 40 | PACKAGE=php5-phalcon 41 | BUILD=$(CURDIR)/debian/$(PACKAGE) 42 | PHALCON_SHARE_PATH=php5/$(PACKAGE) 43 | PHP_API_VERSION=$(shell php-config5 --phpapi) 44 | else 45 | PHP_MINOR_VERSION=$(shell php-config --version | cut -f1,2 -d.) 46 | PACKAGE=php$(PHP_MINOR_VERSION)-phalcon 47 | BUILD=$(CURDIR)/debian/$(PACKAGE) 48 | PHALCON_SHARE_PATH=$(PACKAGE) 49 | PHP_API_VERSION=$(shell php-config --phpapi) 50 | endif 51 | 52 | PHALCON_SUBSTVARS=$(PACKAGE).substvars 53 | SOURCEDIR=build/php$(PHP_MAJOR_VERSION)/safe 54 | DEB_HOST_ARCH?=$(shell dpkg-architecture -qDEB_HOST_ARCH) 55 | 56 | ifeq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH),i386)) 57 | SOURCEDIR=build/php$(PHP_MAJOR_VERSION)/32bits 58 | endif 59 | 60 | ifeq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH),amd64)) 61 | SOURCEDIR=build/php$(PHP_MAJOR_VERSION)/64bits 62 | endif 63 | 64 | CFLAGS+=-g3 -fvisibility=hidden -DPHALCON_RELEASE 65 | LDFLAGS+=-Wl,--as-needed -Wl,-Bsymbolic-functions 66 | 67 | ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) 68 | CFLAGS+=-O0 69 | else 70 | CFLAGS+=-O2 -fomit-frame-pointer -finline-functions 71 | endif 72 | 73 | %: 74 | dh $@ 75 | 76 | prepare-files-stamp: 77 | mkdir -p debian/usr/share/$(PHALCON_SHARE_PATH)/phalcon/; \ 78 | cp debian/phalcon.ini debian/usr/share/$(PHALCON_SHARE_PATH)/phalcon/phalcon.ini; \ 79 | echo "debian/usr/share/$(PHALCON_SHARE_PATH)/phalcon/phalcon.ini usr/share/$(PHALCON_SHARE_PATH)/phalcon/" >> debian/$(PACKAGE).install; 80 | touch prepare-files-stamp 81 | 82 | override_dh_auto_configure: 83 | cd $(SOURCEDIR); \ 84 | phpize; \ 85 | ./configure --enable-phalcon=shared 86 | 87 | override_dh_auto_build: 88 | $(MAKE) -C $(SOURCEDIR) 89 | 90 | override_dh_auto_clean: 91 | dh_auto_clean 92 | ( \ 93 | cd $(SOURCEDIR); \ 94 | [ -f Makefile ] && $(MAKE) distclean; \ 95 | phpize --clean; \ 96 | rm -f tmp-php.ini; \ 97 | ) 98 | 99 | override_dh_installdirs: prepare-files-stamp 100 | dh_installdirs 101 | 102 | override_dh_auto_install: 103 | INSTALL_ROOT=$(BUILD) $(MAKE) -C $(SOURCEDIR) install 104 | 105 | override_dh_strip: 106 | dh_strip -s --dbg-package=$(PACKAGE)-dbgsym 107 | 108 | override_dh_gencontrol: 109 | echo "php:Depends=phpapi-$(PHP_API_VERSION)" >> debian/$(PHALCON_SUBSTVARS) 110 | dh_gencontrol 111 | -------------------------------------------------------------------------------- /debian/source.lintian-overrides: -------------------------------------------------------------------------------- 1 | php-phalcon source: license-problem-json-evil * 2 | -------------------------------------------------------------------------------- /debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (quilt) 2 | -------------------------------------------------------------------------------- /debian/source/options: -------------------------------------------------------------------------------- 1 | # Don't store changes on autogenerated files 2 | extend-diff-ignore = "(^|/)(config\.sub|config\.guess|Makefile)$" 3 | -------------------------------------------------------------------------------- /environment: -------------------------------------------------------------------------------- 1 | PRODUCT="php-phalcon" 2 | PRODUCT_GIT="https://github.com/phalcon/cphalcon.git" 3 | 4 | DOCKER_REPO="phalconphp/build" 5 | SOURCEDIR="${TRAVIS_BUILD_DIR}/cphalcon" 6 | 7 | TARGET="package" 8 | RE2C_VERSION="1.1.1" 9 | 10 | # To build 3.x branch use 11 | # ZEPHIR_VERSION >= 0.10.0 (for example 0.10.16) 12 | # ZEPHIR_PARSER_VERSION >= v1.1.x (for example v1.1.4) 13 | # To build 4.x branch use 14 | # ZEPHIR_VERSION >= 0.11.0 (for example 0.12.15) 15 | # ZEPHIR_PARSER_VERSION >= v1.2.x (for example v1.3.3) 16 | ZEPHIR_VERSION="0.12.21" 17 | ZEPHIR_PARSER_VERSION="v1.3.6" 18 | 19 | ZEND_BACKEND="--backend=ZendEngine3" 20 | STABLE_BUILD_VERSION="1" 21 | MAINLINE_BUILD_VERSION="${TRAVIS_BUILD_NUMBER}" 22 | NIGHTLY_BUILD_VERSION="${TRAVIS_BUILD_NUMBER}" 23 | 24 | STABLE_BRANCH="v3.4.5" 25 | MAINLINE_BRANCH="v4.1.2" 26 | NIGHTLY_BRANCH="4.1.x" 27 | 28 | PACKAGECLOUD_USER="phalcon" 29 | 30 | PACKAGECLOUD_STABLE_REPO="stable" 31 | PACKAGECLOUD_MAINLINE_REPO="mainline" 32 | PACKAGECLOUD_NIGHTLY_REPO="nightly" 33 | -------------------------------------------------------------------------------- /gh-84.patch: -------------------------------------------------------------------------------- 1 | diff --git a/pack/rpm.mk b/pack/rpm.mk 2 | index 053af96..8c9e5a1 100644 3 | --- a/pack/rpm.mk 4 | +++ b/pack/rpm.mk 5 | @@ -10,13 +10,7 @@ $(info Using $(RPMSPECIN) file) 6 | 7 | EXTRA_SOURCE_FILES := $(filter-out $(RPMSPECIN),$(wildcard rpm/*)) 8 | 9 | -RPMSPEC_AVAIL := $(shell command -v rpmspec 2> /dev/null) 10 | - 11 | -ifndef RPMSPEC_AVAIL 12 | RPMNAME := $(shell sed -n -e 's/Name:\([\ \t]*\)\(.*\)/\2/p' $(RPMSPECIN)) 13 | -else 14 | -RPMNAME := $(shell rpmspec -P $(RPMSPECIN) | sed -n -e 's/Name:\([\ \t]*\)\(.*\)/\2/p') 15 | -endif 16 | 17 | RPMDIST := $(shell rpm -E "%{dist}") 18 | PKGVERSION := $(VERSION)-$(RELEASE)$(RPMDIST) 19 | -------------------------------------------------------------------------------- /gh-97.patch: -------------------------------------------------------------------------------- 1 | diff --git a/packpack b/packpack 2 | index 6f4c80f..1659773 100755 3 | --- a/packpack 4 | +++ b/packpack 5 | @@ -155,6 +155,7 @@ docker run \ 6 | --entrypoint=/build/userwrapper.sh \ 7 | -e XDG_CACHE_HOME=/cache \ 8 | -e CCACHE_DIR=/cache/ccache \ 9 | + -e TMPDIR=/tmp \ 10 | --volume "${CACHE_DIR}:/cache" \ 11 | ${DOCKER_REPO}:${DOCKER_IMAGE} \ 12 | make -f /pack/Makefile -C /source BUILDDIR=/build -j "$@" 13 | -------------------------------------------------------------------------------- /rpm/specs/remi-php-5.5.spec: -------------------------------------------------------------------------------- 1 | # This file is part of the Phalcon Builder. 2 | # 3 | # (c) Phalcon Team 4 | # 5 | # For the full copyright and license information, please view 6 | # the LICENSE file that was distributed with this source code. 7 | # 8 | # If you did not receive a copy of the license it is available 9 | # through the world-wide-web at the following url: 10 | # https://license.phalcon.io 11 | 12 | %global with_zts 0%{?__ztsphp:1} 13 | %global with_tests %{?_with_tests:1}%{!?_with_tests:0} 14 | %global php_apiver %((rpm -E %php_core_api | cut -d '-' -f 1) | tail -1) 15 | %global zend_apiver %((rpm -E %php_zend_api | cut -d '-' -f 1) | tail -1) 16 | 17 | # after 40-json.ini, 20-pdo.ini and 40-prs.ini (if any) 18 | %global ini_name 50-phalcon.ini 19 | 20 | %global src_dir build/php5/safe 21 | %if %{__isa_bits} == 32 22 | %global src_dir build/php5/32bits 23 | %endif 24 | %if %{__isa_bits} == 64 25 | %global src_dir build/php5/64bits 26 | %endif 27 | 28 | %if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 29 | %global with_libpcre 1 30 | %else 31 | %global with_libpcre 0 32 | %endif 33 | 34 | %global phalcon_major %((rpm -E %version | cut -d. -f1) | tail -1) 35 | 36 | %{!?zts_php_extdir: %{expand: %%define zts_php_extdir %(zts-php-config --extension-dir)}} 37 | 38 | Name: php55u-phalcon 39 | Version: %{version} 40 | Release: 1.ius%{?dist} 41 | Summary: High performance PHP framework 42 | Group: Development/Libraries 43 | Packager: Phalcon Team 44 | License: BSD 3-Clause 45 | URL: https://phalcon.io 46 | Source0: phalcon-php-%{version}.tar.gz 47 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 48 | BuildRequires: php55u-pecl-jsonc-devel%{?_isa} 49 | BuildRequires: php55u-devel%{?_isa} 50 | %if %{with_libpcre} 51 | BuildRequires: pcre-devel%{?_isa} >= 8.20 52 | %endif 53 | 54 | BuildRequires: re2c%{?_isa} 55 | 56 | %if "%{phalcon_major}" == "4" 57 | Requires: php-pecl-psr%{?_isa} 58 | BuildRequires: php-pecl-psr%{?_isa} 59 | BuildRequires: php-pecl-psr-devel%{?_isa} 60 | %endif 61 | 62 | Requires: php55u-pdo%{?_isa} 63 | Requires: php55u-common%{?_isa} 64 | Requires: php(zend-abi) = %{php_zend_api} 65 | Requires: php(api) = %{php_core_api} 66 | 67 | %description 68 | High performance PHP framework. 69 | 70 | Phalcon is an open source web framework delivered as a C extension for 71 | the PHP language providing high performance and lower resource consumption. 72 | 73 | This package provides the Phalcon PHP extension. 74 | 75 | Documentation: https://docs.phalcon.io 76 | 77 | %prep 78 | %setup -q -n phalcon-php-%{version} 79 | 80 | %{__cat} > %{ini_name} << 'EOF' 81 | ; 82 | ; This file is part of the Phalcon. 83 | ; 84 | ; (c) Phalcon Team 85 | ; 86 | ; For the full copyright and license information, please view 87 | ; the LICENSE.txt file that was distributed with this source code. 88 | ; 89 | ; If you did not receive a copy of the license it is available 90 | ; through the world-wide-web at the following url: 91 | ; https://license.phalcon.io 92 | 93 | ; %{summary} 94 | [phalcon] 95 | extension = phalcon.so 96 | 97 | ; ----- Options to use the Phalcon Framework 98 | 99 | ; phalcon.db.escape_identifiers = On 100 | ; phalcon.db.force_casting = Off 101 | 102 | ; phalcon.orm.events = On 103 | ; phalcon.orm.virtual_foreign_keys = On 104 | ; phalcon.orm.column_renaming = On 105 | ; phalcon.orm.not_null_validations = On 106 | ; phalcon.orm.exception_on_failed_save = Off 107 | ; phalcon.orm.enable_literals = On 108 | ; phalcon.orm.late_state_binding = Off 109 | ; phalcon.orm.enable_implicit_joins = On 110 | ; phalcon.orm.cast_on_hydrate = Off 111 | ; phalcon.orm.ignore_unknown_columns = Off 112 | ; phalcon.orm.update_snapshot_on_save = On 113 | ; phalcon.orm.disable_assign_setters = Off 114 | 115 | EOF 116 | 117 | %build 118 | extconf() { 119 | %configure \ 120 | --enable-phalcon \ 121 | --with-libdir=%{_lib} \ 122 | --with-php-config=$1 123 | } 124 | 125 | : Generate the SAFE sources 126 | 127 | CFLAGS+="-O2 -fvisibility=hidden -finline-functions" 128 | LDFLAGS+="-Wl,--as-needed -Wl,-Bsymbolic-functions" 129 | 130 | export CC="gcc" 131 | export LDFLAGS 132 | export CFLAGS 133 | export CPPFLAGS="-DPHALCON_RELEASE" 134 | 135 | %{__mv} %{src_dir} build/NTS 136 | 137 | %if %{with_zts} 138 | : Duplicate source tree for NTS / ZTS build 139 | %{__cp} -r build/NTS build/ZTS 140 | %endif 141 | 142 | : Build NTS extension 143 | cd build/NTS 144 | %{_bindir}/phpize 145 | extconf %{_bindir}/php-config 146 | %{__make} %{?_smp_mflags} 147 | 148 | %if %{with_zts} 149 | : Build ZTS extension 150 | cd ../ZTS 151 | %{_bindir}/zts-phpize 152 | extconf %{_bindir}/zts-php-config 153 | %{__make} %{?_smp_mflags} 154 | %endif 155 | 156 | %install 157 | %{__rm} -rf ${buildroot} 158 | %{__make} -C build/NTS install INSTALL_ROOT=%{buildroot} 159 | %{__install} -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name} 160 | 161 | %if %{with_zts} 162 | %{__make} -C build/ZTS install INSTALL_ROOT=%{buildroot} 163 | %{__install} -Dpm644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} 164 | %endif 165 | 166 | %check 167 | %{__cc} --version 168 | %{__php} --version 169 | 170 | : Get needed extensions for NTS check 171 | modules="" 172 | for mod in json pdo; do 173 | if [ -f %{php_extdir}/${mod}.so ]; then 174 | modules="$modules -d extension=${mod}.so" 175 | fi 176 | done 177 | 178 | %if "%{phalcon_major}" == "4" 179 | if [ -f "%{php_extdir}/psr.so" ]; then 180 | modules="$modules -d extension=psr.so" 181 | fi 182 | %endif 183 | 184 | : Minimal load test for NTS extension 185 | %{__php} --no-php-ini \ 186 | $modules \ 187 | -d extension=%{buildroot}%{php_extdir}/phalcon.so \ 188 | --ri phalcon 189 | 190 | %if %{with_tests} 191 | : Upstream test suite NTS extension 192 | cd build/NTS 193 | SKIP_ONLINE_TESTS=1 \ 194 | TEST_PHP_EXECUTABLE=%{__php} \ 195 | TEST_PHP_ARGS="-n $modules -d extension=$PWD/modules/phalcon.so" \ 196 | NO_INTERACTION=1 \ 197 | REPORT_EXIT_STATUS=1 \ 198 | %{__php} -n run-tests.php --show-diff 199 | %endif 200 | 201 | : Get needed extensions for ZTS check 202 | modules="" 203 | for mod in json pdo; do 204 | if [ -f %{zts_php_extdir}/${mod}.so ]; then 205 | modules="$modules -d extension=${mod}.so" 206 | fi 207 | done 208 | 209 | %if "%{phalcon_major}" == "4" 210 | if [ -f "%{zts_php_extdir}/psr.so" ]; then 211 | modules="$modules -d extension=psr.so" 212 | fi 213 | %endif 214 | 215 | %if %{with_zts} 216 | : Minimal load test for ZTS extension 217 | %{__ztsphp} --no-php-ini \ 218 | $modules \ 219 | -d extension=%{buildroot}%{php_ztsextdir}/phalcon.so \ 220 | --ri phalcon 221 | %endif 222 | 223 | %clean 224 | extclean() { 225 | [ -f Makefile ] && %{__make} distclean; \ 226 | %{_bindir}/$1 --clean; \ 227 | %{__rm} -f tmp-php.ini 228 | } 229 | 230 | cd build/NTS 231 | extclean phpize 232 | 233 | %if %{with_zts} 234 | cd ../ZTS 235 | extclean zts-phpize 236 | %endif 237 | 238 | %{__rm} -rf ${buildroot} 239 | 240 | %files 241 | %defattr(-,root,root,-) 242 | %{!?_licensedir:%global license %%doc} 243 | %license LICENSE.txt 244 | %if "%{phalcon_major}" == "4" 245 | %doc CHANGELOG-4.1.md 246 | %endif 247 | %doc BACKERS.md 248 | %doc CHANGELOG.md 249 | %doc CONTRIBUTING.md 250 | %doc README.md 251 | 252 | %{php_extdir}/phalcon.so 253 | %config(noreplace) %{php_inidir}/%{ini_name} 254 | %{php_incldir}/ext/phalcon/php_phalcon.h 255 | 256 | %if %{with_zts} 257 | %{php_ztsextdir}/phalcon.so 258 | %config(noreplace) %{php_ztsinidir}/%{ini_name} 259 | %{php_ztsincldir}/ext/phalcon/php_phalcon.h 260 | %endif 261 | 262 | %changelog 263 | -------------------------------------------------------------------------------- /rpm/specs/remi-php-5.6.spec: -------------------------------------------------------------------------------- 1 | # This file is part of the Phalcon Builder. 2 | # 3 | # (c) Phalcon Team 4 | # 5 | # For the full copyright and license information, please view 6 | # the LICENSE file that was distributed with this source code. 7 | # 8 | # If you did not receive a copy of the license it is available 9 | # through the world-wide-web at the following url: 10 | # https://license.phalcon.io 11 | 12 | %global with_zts 0%{?__ztsphp:1} 13 | %global with_tests %{?_with_tests:1}%{!?_with_tests:0} 14 | %global php_apiver %((rpm -E %php_core_api | cut -d '-' -f 1) | tail -1) 15 | %global zend_apiver %((rpm -E %php_zend_api | cut -d '-' -f 1) | tail -1) 16 | 17 | # after 40-json.ini, 20-pdo.ini and 40-prs.ini (if any) 18 | %global ini_name 50-phalcon.ini 19 | 20 | %global src_dir build/php5/safe 21 | %if %{__isa_bits} == 32 22 | %global src_dir build/php5/32bits 23 | %endif 24 | %if %{__isa_bits} == 64 25 | %global src_dir build/php5/64bits 26 | %endif 27 | 28 | %if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 29 | %global with_libpcre 1 30 | %else 31 | %global with_libpcre 0 32 | %endif 33 | 34 | %global phalcon_major %((rpm -E %version | cut -d. -f1) | tail -1) 35 | 36 | %{!?zts_php_extdir: %{expand: %%define zts_php_extdir %(zts-php-config --extension-dir)}} 37 | 38 | Name: php56u-phalcon 39 | Version: %{version} 40 | Release: 1.ius%{?dist} 41 | Summary: High performance PHP framework 42 | Group: Development/Libraries 43 | Packager: Phalcon Team 44 | License: BSD 3-Clause 45 | URL: https://phalcon.io 46 | Source0: phalcon-php-%{version}.tar.gz 47 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 48 | BuildRequires: php56u-pecl-jsonc-devel%{?_isa} 49 | BuildRequires: php56u-devel%{?_isa} 50 | %if %{with_libpcre} 51 | BuildRequires: pcre-devel%{?_isa} >= 8.20 52 | %endif 53 | 54 | BuildRequires: re2c%{?_isa} 55 | 56 | %if "%{phalcon_major}" == "4" 57 | Requires: php-pecl-psr%{?_isa} 58 | BuildRequires: php-pecl-psr%{?_isa} 59 | BuildRequires: php-pecl-psr-devel%{?_isa} 60 | %endif 61 | 62 | Requires: php56u-pdo%{?_isa} 63 | Requires: php56u-common%{?_isa} 64 | Requires: php(zend-abi) = %{php_zend_api} 65 | Requires: php(api) = %{php_core_api} 66 | 67 | %description 68 | High performance PHP framework. 69 | 70 | Phalcon is an open source web framework delivered as a C extension for 71 | the PHP language providing high performance and lower resource consumption. 72 | 73 | This package provides the Phalcon PHP extension. 74 | 75 | Documentation: https://docs.phalcon.io 76 | 77 | %prep 78 | %setup -q -n phalcon-php-%{version} 79 | 80 | %{__cat} > %{ini_name} << 'EOF' 81 | ; 82 | ; This file is part of the Phalcon. 83 | ; 84 | ; (c) Phalcon Team 85 | ; 86 | ; For the full copyright and license information, please view 87 | ; the LICENSE.txt file that was distributed with this source code. 88 | ; 89 | ; If you did not receive a copy of the license it is available 90 | ; through the world-wide-web at the following url: 91 | ; https://license.phalcon.io 92 | 93 | ; %{summary} 94 | [phalcon] 95 | extension = phalcon.so 96 | 97 | ; ----- Options to use the Phalcon Framework 98 | 99 | ; phalcon.db.escape_identifiers = On 100 | ; phalcon.db.force_casting = Off 101 | 102 | ; phalcon.orm.events = On 103 | ; phalcon.orm.virtual_foreign_keys = On 104 | ; phalcon.orm.column_renaming = On 105 | ; phalcon.orm.not_null_validations = On 106 | ; phalcon.orm.exception_on_failed_save = Off 107 | ; phalcon.orm.enable_literals = On 108 | ; phalcon.orm.late_state_binding = Off 109 | ; phalcon.orm.enable_implicit_joins = On 110 | ; phalcon.orm.cast_on_hydrate = Off 111 | ; phalcon.orm.ignore_unknown_columns = Off 112 | ; phalcon.orm.update_snapshot_on_save = On 113 | ; phalcon.orm.disable_assign_setters = Off 114 | 115 | EOF 116 | 117 | %build 118 | extconf() { 119 | %configure \ 120 | --enable-phalcon \ 121 | --with-libdir=%{_lib} \ 122 | --with-php-config=$1 123 | } 124 | 125 | : Generate the SAFE sources 126 | 127 | CFLAGS+="-O2 -fvisibility=hidden -finline-functions" 128 | LDFLAGS+="-Wl,--as-needed -Wl,-Bsymbolic-functions" 129 | 130 | export CC="gcc" 131 | export LDFLAGS 132 | export CFLAGS 133 | export CPPFLAGS="-DPHALCON_RELEASE" 134 | 135 | %{__mv} %{src_dir} build/NTS 136 | 137 | %if %{with_zts} 138 | : Duplicate source tree for NTS / ZTS build 139 | %{__cp} -r build/NTS build/ZTS 140 | %endif 141 | 142 | : Build NTS extension 143 | cd build/NTS 144 | %{_bindir}/phpize 145 | extconf %{_bindir}/php-config 146 | %{__make} %{?_smp_mflags} 147 | 148 | %if %{with_zts} 149 | : Build ZTS extension 150 | cd ../ZTS 151 | %{_bindir}/zts-phpize 152 | extconf %{_bindir}/zts-php-config 153 | %{__make} %{?_smp_mflags} 154 | %endif 155 | 156 | %install 157 | %{__rm} -rf ${buildroot} 158 | %{__make} -C build/NTS install INSTALL_ROOT=%{buildroot} 159 | %{__install} -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name} 160 | 161 | %if %{with_zts} 162 | %{__make} -C build/ZTS install INSTALL_ROOT=%{buildroot} 163 | %{__install} -Dpm644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} 164 | %endif 165 | 166 | %check 167 | %{__cc} --version 168 | %{__php} --version 169 | 170 | : Get needed extensions for NTS check 171 | modules="" 172 | for mod in json pdo; do 173 | if [ -f %{php_extdir}/${mod}.so ]; then 174 | modules="$modules -d extension=${mod}.so" 175 | fi 176 | done 177 | 178 | %if "%{phalcon_major}" == "4" 179 | if [ -f "%{php_extdir}/psr.so" ]; then 180 | modules="$modules -d extension=psr.so" 181 | fi 182 | %endif 183 | 184 | : Minimal load test for NTS extension 185 | %{__php} --no-php-ini \ 186 | $modules \ 187 | -d extension=%{buildroot}%{php_extdir}/phalcon.so \ 188 | --ri phalcon 189 | 190 | %if %{with_tests} 191 | : Upstream test suite NTS extension 192 | cd build/NTS 193 | SKIP_ONLINE_TESTS=1 \ 194 | TEST_PHP_EXECUTABLE=%{__php} \ 195 | TEST_PHP_ARGS="-n $modules -d extension=$PWD/modules/phalcon.so" \ 196 | NO_INTERACTION=1 \ 197 | REPORT_EXIT_STATUS=1 \ 198 | %{__php} -n run-tests.php --show-diff 199 | %endif 200 | 201 | : Get needed extensions for ZTS check 202 | modules="" 203 | for mod in json pdo; do 204 | if [ -f %{zts_php_extdir}/${mod}.so ]; then 205 | modules="$modules -d extension=${mod}.so" 206 | fi 207 | done 208 | 209 | %if "%{phalcon_major}" == "4" 210 | if [ -f "%{zts_php_extdir}/psr.so" ]; then 211 | modules="$modules -d extension=psr.so" 212 | fi 213 | %endif 214 | 215 | %if %{with_zts} 216 | : Minimal load test for ZTS extension 217 | %{__ztsphp} --no-php-ini \ 218 | $modules \ 219 | -d extension=%{buildroot}%{php_ztsextdir}/phalcon.so \ 220 | --ri phalcon 221 | %endif 222 | 223 | %clean 224 | extclean() { 225 | [ -f Makefile ] && %{__make} distclean; \ 226 | %{_bindir}/$1 --clean; \ 227 | %{__rm} -f tmp-php.ini 228 | } 229 | 230 | cd build/NTS 231 | extclean phpize 232 | 233 | %if %{with_zts} 234 | cd ../ZTS 235 | extclean zts-phpize 236 | %endif 237 | 238 | %{__rm} -rf ${buildroot} 239 | 240 | %files 241 | %defattr(-,root,root,-) 242 | %{!?_licensedir:%global license %%doc} 243 | %license LICENSE.txt 244 | %if "%{phalcon_major}" == "4" 245 | %doc CHANGELOG-4.1.md 246 | %endif 247 | %doc BACKERS.md 248 | %doc CHANGELOG.md 249 | %doc CONTRIBUTING.md 250 | %doc README.md 251 | 252 | %{php_extdir}/phalcon.so 253 | %config(noreplace) %{php_inidir}/%{ini_name} 254 | %{php_incldir}/ext/phalcon/php_phalcon.h 255 | 256 | %if %{with_zts} 257 | %{php_ztsextdir}/phalcon.so 258 | %config(noreplace) %{php_ztsinidir}/%{ini_name} 259 | %{php_ztsincldir}/ext/phalcon/php_phalcon.h 260 | %endif 261 | 262 | %changelog 263 | -------------------------------------------------------------------------------- /rpm/specs/remi-php-7.0.spec: -------------------------------------------------------------------------------- 1 | # This file is part of the Phalcon Builder. 2 | # 3 | # (c) Phalcon Team 4 | # 5 | # For the full copyright and license information, please view 6 | # the LICENSE file that was distributed with this source code. 7 | # 8 | # If you did not receive a copy of the license it is available 9 | # through the world-wide-web at the following url: 10 | # https://license.phalcon.io 11 | 12 | %global with_zts 0%{?__ztsphp:1} 13 | %global with_tests %{?_with_tests:1}%{!?_with_tests:0} 14 | %global php_apiver %((rpm -E %php_core_api | cut -d '-' -f 1) | tail -1) 15 | %global zend_apiver %((rpm -E %php_zend_api | cut -d '-' -f 1) | tail -1) 16 | 17 | # after 40-json.ini, 20-pdo.ini and 40-prs.ini (if any) 18 | %global ini_name 50-phalcon.ini 19 | 20 | %global src_dir build/php7/safe 21 | %if %{__isa_bits} == 32 22 | %global src_dir build/php7/32bits 23 | %endif 24 | %if %{__isa_bits} == 64 25 | %global src_dir build/php7/64bits 26 | %endif 27 | 28 | %if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 29 | %global with_libpcre 1 30 | %else 31 | %global with_libpcre 0 32 | %endif 33 | 34 | %global phalcon_major %((rpm -E %version | cut -d. -f1) | tail -1) 35 | 36 | %{!?zts_php_extdir: %{expand: %%define zts_php_extdir %(zts-php-config --extension-dir)}} 37 | 38 | Name: php70u-phalcon 39 | Version: %{version} 40 | # will be replaced by the automated script 41 | Release: 1.ius%{?dist} 42 | Summary: High performance PHP framework 43 | Group: Development/Libraries 44 | Packager: Phalcon Team 45 | License: BSD 3-Clause 46 | URL: https://phalcon.io 47 | Source0: phalcon-php-%{version}.tar.gz 48 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 49 | BuildRequires: php70u-devel%{?_isa} 50 | %if %{with_libpcre} 51 | BuildRequires: pcre-devel%{?_isa} >= 8.20 52 | %endif 53 | 54 | %if "%{phalcon_major}" == "4" 55 | Requires: php-pecl-psr%{?_isa} 56 | BuildRequires: php-pecl-psr%{?_isa} 57 | BuildRequires: php-pecl-psr-devel%{?_isa} 58 | %endif 59 | 60 | BuildRequires: re2c%{?_isa} 61 | 62 | Requires: php70u-pdo%{?_isa} 63 | Requires: php70u-common%{?_isa} 64 | Requires: php(zend-abi) = %{php_zend_api} 65 | Requires: php(api) = %{php_core_api} 66 | 67 | %description 68 | High performance PHP framework. 69 | 70 | Phalcon is an open source web framework delivered as a C extension for 71 | the PHP language providing high performance and lower resource consumption. 72 | 73 | This package provides the Phalcon PHP extension. 74 | 75 | Documentation: https://docs.phalcon.io 76 | 77 | %prep 78 | %setup -q -n phalcon-php-%{version} 79 | 80 | %{__cat} > %{ini_name} << 'EOF' 81 | ; 82 | ; This file is part of the Phalcon. 83 | ; 84 | ; (c) Phalcon Team 85 | ; 86 | ; For the full copyright and license information, please view 87 | ; the LICENSE.txt file that was distributed with this source code. 88 | ; 89 | ; If you did not receive a copy of the license it is available 90 | ; through the world-wide-web at the following url: 91 | ; https://license.phalcon.io 92 | 93 | ; %{summary} 94 | [phalcon] 95 | extension = phalcon.so 96 | 97 | ; ----- Options to use the Phalcon Framework 98 | 99 | ; phalcon.db.escape_identifiers = On 100 | ; phalcon.db.force_casting = Off 101 | 102 | ; phalcon.orm.events = On 103 | ; phalcon.orm.virtual_foreign_keys = On 104 | ; phalcon.orm.column_renaming = On 105 | ; phalcon.orm.not_null_validations = On 106 | ; phalcon.orm.exception_on_failed_save = Off 107 | ; phalcon.orm.enable_literals = On 108 | ; phalcon.orm.late_state_binding = Off 109 | ; phalcon.orm.enable_implicit_joins = On 110 | ; phalcon.orm.cast_on_hydrate = Off 111 | ; phalcon.orm.ignore_unknown_columns = Off 112 | ; phalcon.orm.update_snapshot_on_save = On 113 | ; phalcon.orm.disable_assign_setters = Off 114 | 115 | EOF 116 | 117 | %build 118 | extconf() { 119 | %configure \ 120 | --enable-phalcon \ 121 | --with-libdir=%{_lib} \ 122 | --with-php-config=$1 123 | } 124 | 125 | : Generate the SAFE sources 126 | 127 | CFLAGS+="-O2 -fvisibility=hidden -finline-functions" 128 | LDFLAGS+="-Wl,--as-needed -Wl,-Bsymbolic-functions" 129 | 130 | export CC="gcc" 131 | export LDFLAGS 132 | export CFLAGS 133 | export CPPFLAGS="-DPHALCON_RELEASE" 134 | 135 | %{__mv} %{src_dir} build/NTS 136 | 137 | %if %{with_zts} 138 | : Duplicate source tree for NTS / ZTS build 139 | %{__cp} -r build/NTS build/ZTS 140 | %endif 141 | 142 | : Build NTS extension 143 | cd build/NTS 144 | %{_bindir}/phpize 145 | extconf %{_bindir}/php-config 146 | %{__make} %{?_smp_mflags} 147 | 148 | %if %{with_zts} 149 | : Build ZTS extension 150 | cd ../ZTS 151 | %{_bindir}/zts-phpize 152 | extconf %{_bindir}/zts-php-config 153 | %{__make} %{?_smp_mflags} 154 | %endif 155 | 156 | %install 157 | %{__rm} -rf ${buildroot} 158 | %{__make} -C build/NTS install INSTALL_ROOT=%{buildroot} 159 | %{__install} -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name} 160 | 161 | %if %{with_zts} 162 | %{__make} -C build/ZTS install INSTALL_ROOT=%{buildroot} 163 | %{__install} -Dpm644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} 164 | %endif 165 | 166 | %check 167 | %{__cc} --version 168 | %{__php} --version 169 | 170 | : Get needed extensions for NTS check 171 | modules="" 172 | for mod in json pdo; do 173 | if [ -f %{php_extdir}/${mod}.so ]; then 174 | modules="$modules -d extension=${mod}.so" 175 | fi 176 | done 177 | 178 | %if "%{phalcon_major}" == "4" 179 | if [ -f "%{php_extdir}/psr.so" ]; then 180 | modules="$modules -d extension=psr.so" 181 | fi 182 | %endif 183 | 184 | : Minimal load test for NTS extension 185 | %{__php} --no-php-ini \ 186 | $modules \ 187 | -d extension=%{buildroot}%{php_extdir}/phalcon.so \ 188 | --ri phalcon 189 | 190 | %if %{with_tests} 191 | : Upstream test suite NTS extension 192 | cd build/NTS 193 | SKIP_ONLINE_TESTS=1 \ 194 | TEST_PHP_EXECUTABLE=%{__php} \ 195 | TEST_PHP_ARGS="-n $modules -d extension=$PWD/modules/phalcon.so" \ 196 | NO_INTERACTION=1 \ 197 | REPORT_EXIT_STATUS=1 \ 198 | %{__php} -n run-tests.php --show-diff 199 | %endif 200 | 201 | : Get needed extensions for ZTS check 202 | modules="" 203 | for mod in json pdo; do 204 | if [ -f %{zts_php_extdir}/${mod}.so ]; then 205 | modules="$modules -d extension=${mod}.so" 206 | fi 207 | done 208 | 209 | %if "%{phalcon_major}" == "4" 210 | if [ -f "%{zts_php_extdir}/psr.so" ]; then 211 | modules="$modules -d extension=psr.so" 212 | fi 213 | %endif 214 | 215 | %if %{with_zts} 216 | : Minimal load test for ZTS extension 217 | %{__ztsphp} --no-php-ini \ 218 | $modules \ 219 | -d extension=%{buildroot}%{php_ztsextdir}/phalcon.so \ 220 | --ri phalcon 221 | %endif 222 | 223 | %clean 224 | extclean() { 225 | [ -f Makefile ] && %{__make} distclean; \ 226 | %{_bindir}/$1 --clean; \ 227 | %{__rm} -f tmp-php.ini 228 | } 229 | 230 | cd build/NTS 231 | extclean phpize 232 | 233 | %if %{with_zts} 234 | cd ../ZTS 235 | extclean zts-phpize 236 | %endif 237 | 238 | %{__rm} -rf ${buildroot} 239 | 240 | %files 241 | %defattr(-,root,root,-) 242 | %{!?_licensedir:%global license %%doc} 243 | %license LICENSE.txt 244 | %if "%{phalcon_major}" == "4" 245 | %doc CHANGELOG-4.1.md 246 | %endif 247 | %doc BACKERS.md 248 | %doc CHANGELOG.md 249 | %doc CONTRIBUTING.md 250 | %doc README.md 251 | 252 | %{php_extdir}/phalcon.so 253 | %config(noreplace) %{php_inidir}/%{ini_name} 254 | %{php_incldir}/ext/phalcon/php_phalcon.h 255 | 256 | %if %{with_zts} 257 | %{php_ztsextdir}/phalcon.so 258 | %config(noreplace) %{php_ztsinidir}/%{ini_name} 259 | %{php_ztsincldir}/ext/phalcon/php_phalcon.h 260 | %endif 261 | 262 | %changelog 263 | -------------------------------------------------------------------------------- /rpm/specs/remi-php-7.1.spec: -------------------------------------------------------------------------------- 1 | # This file is part of the Phalcon Builder. 2 | # 3 | # (c) Phalcon Team 4 | # 5 | # For the full copyright and license information, please view 6 | # the LICENSE file that was distributed with this source code. 7 | # 8 | # If you did not receive a copy of the license it is available 9 | # through the world-wide-web at the following url: 10 | # https://license.phalcon.io 11 | 12 | %global with_zts 0%{?__ztsphp:1} 13 | %global with_tests %{?_with_tests:1}%{!?_with_tests:0} 14 | %global php_apiver %((rpm -E %php_core_api | cut -d '-' -f 1) | tail -1) 15 | %global zend_apiver %((rpm -E %php_zend_api | cut -d '-' -f 1) | tail -1) 16 | 17 | # after 40-json.ini, 20-pdo.ini and 40-prs.ini (if any) 18 | %global ini_name 50-phalcon.ini 19 | 20 | %global src_dir build/php7/safe 21 | %if %{__isa_bits} == 32 22 | %global src_dir build/php7/32bits 23 | %endif 24 | %if %{__isa_bits} == 64 25 | %global src_dir build/php7/64bits 26 | %endif 27 | 28 | %if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 29 | %global with_libpcre 1 30 | %else 31 | %global with_libpcre 0 32 | %endif 33 | 34 | %global phalcon_major %((rpm -E %version | cut -d. -f1) | tail -1) 35 | 36 | %{!?zts_php_extdir: %{expand: %%define zts_php_extdir %(zts-php-config --extension-dir)}} 37 | 38 | Name: php71u-phalcon 39 | Version: %{version} 40 | # will be replaced by the automated script 41 | Release: 1.ius%{?dist} 42 | Summary: High performance PHP framework 43 | Group: Development/Libraries 44 | Packager: Phalcon Team 45 | License: BSD 3-Clause 46 | URL: https://phalcon.io 47 | Source0: phalcon-php-%{version}.tar.gz 48 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 49 | BuildRequires: php71u-devel%{?_isa} 50 | %if %{with_libpcre} 51 | BuildRequires: pcre-devel%{?_isa} >= 8.20 52 | %endif 53 | 54 | %if "%{phalcon_major}" == "4" 55 | Requires: php-pecl-psr%{?_isa} 56 | BuildRequires: php-pecl-psr%{?_isa} 57 | BuildRequires: php-pecl-psr-devel%{?_isa} 58 | %endif 59 | 60 | BuildRequires: re2c%{?_isa} 61 | 62 | Requires: php71u-pdo%{?_isa} 63 | Requires: php71u-common%{?_isa} 64 | Requires: php(zend-abi) = %{php_zend_api} 65 | Requires: php(api) = %{php_core_api} 66 | 67 | %description 68 | High performance PHP framework. 69 | 70 | Phalcon is an open source web framework delivered as a C extension for 71 | the PHP language providing high performance and lower resource consumption. 72 | 73 | This package provides the Phalcon PHP extension. 74 | 75 | Documentation: https://docs.phalcon.io 76 | 77 | %prep 78 | %setup -q -n phalcon-php-%{version} 79 | 80 | %{__cat} > %{ini_name} << 'EOF' 81 | ; 82 | ; This file is part of the Phalcon. 83 | ; 84 | ; (c) Phalcon Team 85 | ; 86 | ; For the full copyright and license information, please view 87 | ; the LICENSE.txt file that was distributed with this source code. 88 | ; 89 | ; If you did not receive a copy of the license it is available 90 | ; through the world-wide-web at the following url: 91 | ; https://license.phalcon.io 92 | 93 | ; %{summary} 94 | [phalcon] 95 | extension = phalcon.so 96 | 97 | ; ----- Options to use the Phalcon Framework 98 | 99 | ; phalcon.db.escape_identifiers = On 100 | ; phalcon.db.force_casting = Off 101 | 102 | ; phalcon.orm.events = On 103 | ; phalcon.orm.virtual_foreign_keys = On 104 | ; phalcon.orm.column_renaming = On 105 | ; phalcon.orm.not_null_validations = On 106 | ; phalcon.orm.exception_on_failed_save = Off 107 | ; phalcon.orm.enable_literals = On 108 | ; phalcon.orm.late_state_binding = Off 109 | ; phalcon.orm.enable_implicit_joins = On 110 | ; phalcon.orm.cast_on_hydrate = Off 111 | ; phalcon.orm.ignore_unknown_columns = Off 112 | ; phalcon.orm.update_snapshot_on_save = On 113 | ; phalcon.orm.disable_assign_setters = Off 114 | 115 | EOF 116 | 117 | %build 118 | extconf() { 119 | %configure \ 120 | --enable-phalcon \ 121 | --with-libdir=%{_lib} \ 122 | --with-php-config=$1 123 | } 124 | 125 | : Generate the SAFE sources 126 | 127 | CFLAGS+="-O2 -fvisibility=hidden -finline-functions" 128 | LDFLAGS+="-Wl,--as-needed -Wl,-Bsymbolic-functions" 129 | 130 | export CC="gcc" 131 | export LDFLAGS 132 | export CFLAGS 133 | export CPPFLAGS="-DPHALCON_RELEASE" 134 | 135 | %{__mv} %{src_dir} build/NTS 136 | 137 | %if %{with_zts} 138 | : Duplicate source tree for NTS / ZTS build 139 | %{__cp} -r build/NTS build/ZTS 140 | %endif 141 | 142 | : Build NTS extension 143 | cd build/NTS 144 | %{_bindir}/phpize 145 | extconf %{_bindir}/php-config 146 | %{__make} %{?_smp_mflags} 147 | 148 | %if %{with_zts} 149 | : Build ZTS extension 150 | cd ../ZTS 151 | %{_bindir}/zts-phpize 152 | extconf %{_bindir}/zts-php-config 153 | %{__make} %{?_smp_mflags} 154 | %endif 155 | 156 | %install 157 | %{__rm} -rf ${buildroot} 158 | %{__make} -C build/NTS install INSTALL_ROOT=%{buildroot} 159 | %{__install} -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name} 160 | 161 | %if %{with_zts} 162 | %{__make} -C build/ZTS install INSTALL_ROOT=%{buildroot} 163 | %{__install} -Dpm644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} 164 | %endif 165 | 166 | %check 167 | %{__cc} --version 168 | %{__php} --version 169 | 170 | : Get needed extensions for NTS check 171 | modules="" 172 | for mod in json pdo; do 173 | if [ -f %{php_extdir}/${mod}.so ]; then 174 | modules="$modules -d extension=${mod}.so" 175 | fi 176 | done 177 | 178 | %if "%{phalcon_major}" == "4" 179 | if [ -f "%{php_extdir}/psr.so" ]; then 180 | modules="$modules -d extension=psr.so" 181 | fi 182 | %endif 183 | 184 | : Minimal load test for NTS extension 185 | %{__php} --no-php-ini \ 186 | $modules \ 187 | -d extension=%{buildroot}%{php_extdir}/phalcon.so \ 188 | --ri phalcon 189 | 190 | %if %{with_tests} 191 | : Upstream test suite NTS extension 192 | cd build/NTS 193 | SKIP_ONLINE_TESTS=1 \ 194 | TEST_PHP_EXECUTABLE=%{__php} \ 195 | TEST_PHP_ARGS="-n $modules -d extension=$PWD/modules/phalcon.so" \ 196 | NO_INTERACTION=1 \ 197 | REPORT_EXIT_STATUS=1 \ 198 | %{__php} -n run-tests.php --show-diff 199 | %endif 200 | 201 | : Get needed extensions for ZTS check 202 | modules="" 203 | for mod in json pdo; do 204 | if [ -f %{zts_php_extdir}/${mod}.so ]; then 205 | modules="$modules -d extension=${mod}.so" 206 | fi 207 | done 208 | 209 | %if "%{phalcon_major}" == "4" 210 | if [ -f "%{zts_php_extdir}/psr.so" ]; then 211 | modules="$modules -d extension=psr.so" 212 | fi 213 | %endif 214 | 215 | %if %{with_zts} 216 | : Minimal load test for ZTS extension 217 | %{__ztsphp} --no-php-ini \ 218 | $modules \ 219 | -d extension=%{buildroot}%{php_ztsextdir}/phalcon.so \ 220 | --ri phalcon 221 | %endif 222 | 223 | %clean 224 | extclean() { 225 | [ -f Makefile ] && %{__make} distclean; \ 226 | %{_bindir}/$1 --clean; \ 227 | %{__rm} -f tmp-php.ini 228 | } 229 | 230 | cd build/NTS 231 | extclean phpize 232 | 233 | %if %{with_zts} 234 | cd ../ZTS 235 | extclean zts-phpize 236 | %endif 237 | 238 | %{__rm} -rf ${buildroot} 239 | 240 | %files 241 | %defattr(-,root,root,-) 242 | %{!?_licensedir:%global license %%doc} 243 | %license LICENSE.txt 244 | %if "%{phalcon_major}" == "4" 245 | %doc CHANGELOG-4.1.md 246 | %endif 247 | %doc BACKERS.md 248 | %doc CHANGELOG.md 249 | %doc CONTRIBUTING.md 250 | %doc README.md 251 | 252 | %{php_extdir}/phalcon.so 253 | %config(noreplace) %{php_inidir}/%{ini_name} 254 | %{php_incldir}/ext/phalcon/php_phalcon.h 255 | 256 | %if %{with_zts} 257 | %{php_ztsextdir}/phalcon.so 258 | %config(noreplace) %{php_ztsinidir}/%{ini_name} 259 | %{php_ztsincldir}/ext/phalcon/php_phalcon.h 260 | %endif 261 | 262 | %changelog 263 | -------------------------------------------------------------------------------- /rpm/specs/remi-php-7.2.spec: -------------------------------------------------------------------------------- 1 | # This file is part of the Phalcon Builder. 2 | # 3 | # (c) Phalcon Team 4 | # 5 | # For the full copyright and license information, please view 6 | # the LICENSE file that was distributed with this source code. 7 | # 8 | # If you did not receive a copy of the license it is available 9 | # through the world-wide-web at the following url: 10 | # https://license.phalcon.io 11 | 12 | %global with_zts 0%{?__ztsphp:1} 13 | %global with_tests %{?_with_tests:1}%{!?_with_tests:0} 14 | %global php_apiver %((rpm -E %php_core_api | cut -d '-' -f 1) | tail -1) 15 | %global zend_apiver %((rpm -E %php_zend_api | cut -d '-' -f 1) | tail -1) 16 | 17 | # after 40-json.ini, 20-pdo.ini and 40-prs.ini (if any) 18 | %global ini_name 50-phalcon.ini 19 | 20 | %global src_dir build/php7/safe 21 | %if %{__isa_bits} == 32 22 | %global src_dir build/php7/32bits 23 | %endif 24 | %if %{__isa_bits} == 64 25 | %global src_dir build/php7/64bits 26 | %endif 27 | 28 | %if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 29 | %global with_libpcre 1 30 | %else 31 | %global with_libpcre 0 32 | %endif 33 | 34 | %global phalcon_major %((rpm -E %version | cut -d. -f1) | tail -1) 35 | 36 | %{!?zts_php_extdir: %{expand: %%define zts_php_extdir %(zts-php-config --extension-dir)}} 37 | 38 | Name: php72u-phalcon 39 | Version: %{version} 40 | Release: 1.ius%{?dist} 41 | Summary: High performance PHP framework 42 | Group: Development/Libraries 43 | Packager: Phalcon Team 44 | License: BSD 3-Clause 45 | URL: https://phalcon.io 46 | Source0: phalcon-php-%{version}.tar.gz 47 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 48 | BuildRequires: php-devel%{?_isa} 49 | %if %{with_libpcre} 50 | BuildRequires: pcre-devel%{?_isa} >= 8.20 51 | %endif 52 | 53 | BuildRequires: re2c%{?_isa} 54 | 55 | BuildRequires: php-json%{?_isa} 56 | BuildRequires: php-pdo%{?_isa} 57 | 58 | %if "%{phalcon_major}" == "4" 59 | Requires: php-pecl-psr%{?_isa} 60 | 61 | BuildRequires: php-pecl-psr%{?_isa} 62 | BuildRequires: php-pecl-psr-devel%{?_isa} 63 | %endif 64 | 65 | # grep -nr __builtin_saddl_overflow ~/src/php/7.2.0 | wc -l 66 | # 6 67 | # The `__builtin_saddl_overflow' was added in clang 3.4 and gcc 5.0.0 68 | BuildRequires: gcc >= 5.0.0 69 | 70 | Requires: php-json%{?_isa} 71 | Requires: php-pdo%{?_isa} 72 | Requires: php-common%{?_isa} 73 | Requires: php(zend-abi) = %{php_zend_api} 74 | Requires: php(api) = %{php_core_api} 75 | 76 | %description 77 | High performance PHP framework. 78 | 79 | Phalcon is an open source web framework delivered as a C extension for 80 | the PHP language providing high performance and lower resource consumption. 81 | 82 | This package provides the Phalcon PHP extension. 83 | 84 | Documentation: https://docs.phalcon.io 85 | 86 | %prep 87 | %setup -q -n phalcon-php-%{version} 88 | 89 | %{__cat} > %{ini_name} << 'EOF' 90 | ; 91 | ; This file is part of the Phalcon. 92 | ; 93 | ; (c) Phalcon Team 94 | ; 95 | ; For the full copyright and license information, please view 96 | ; the LICENSE.txt file that was distributed with this source code. 97 | ; 98 | ; If you did not receive a copy of the license it is available 99 | ; through the world-wide-web at the following url: 100 | ; https://license.phalcon.io 101 | 102 | ; %{summary} 103 | [phalcon] 104 | extension = phalcon.so 105 | 106 | ; ----- Options to use the Phalcon Framework 107 | 108 | ; phalcon.db.escape_identifiers = On 109 | ; phalcon.db.force_casting = Off 110 | 111 | ; phalcon.orm.events = On 112 | ; phalcon.orm.virtual_foreign_keys = On 113 | ; phalcon.orm.column_renaming = On 114 | ; phalcon.orm.not_null_validations = On 115 | ; phalcon.orm.exception_on_failed_save = Off 116 | ; phalcon.orm.enable_literals = On 117 | ; phalcon.orm.late_state_binding = Off 118 | ; phalcon.orm.enable_implicit_joins = On 119 | ; phalcon.orm.cast_on_hydrate = Off 120 | ; phalcon.orm.ignore_unknown_columns = Off 121 | ; phalcon.orm.update_snapshot_on_save = On 122 | ; phalcon.orm.disable_assign_setters = Off 123 | ; phalcon.orm.resultset_prefetch_records = Off 124 | ; phalcon.orm.cast_last_insert_id_to_int = Off 125 | 126 | EOF 127 | 128 | %build 129 | extconf() { 130 | %configure \ 131 | --enable-phalcon \ 132 | --with-libdir=%{_lib} \ 133 | --with-php-config=$1 134 | } 135 | 136 | : Generate the SAFE sources 137 | 138 | CFLAGS+="-O2 -fvisibility=hidden -finline-functions" 139 | LDFLAGS+="-Wl,--as-needed -Wl,-Bsymbolic-functions" 140 | 141 | export CC="gcc" 142 | export LDFLAGS 143 | export CFLAGS 144 | export CPPFLAGS="-DPHALCON_RELEASE" 145 | 146 | %{__mv} %{src_dir} build/NTS 147 | 148 | %if %{with_zts} 149 | : Duplicate source tree for NTS / ZTS build 150 | %{__cp} -r build/NTS build/ZTS 151 | %endif 152 | 153 | : Build NTS extension 154 | cd build/NTS 155 | %{_bindir}/phpize 156 | extconf %{_bindir}/php-config 157 | %{__make} %{?_smp_mflags} 158 | 159 | %if %{with_zts} 160 | : Build ZTS extension 161 | cd ../ZTS 162 | %{_bindir}/zts-phpize 163 | extconf %{_bindir}/zts-php-config 164 | %{__make} %{?_smp_mflags} 165 | %endif 166 | 167 | %install 168 | %{__rm} -rf ${buildroot} 169 | %{__make} -C build/NTS install INSTALL_ROOT=%{buildroot} 170 | %{__install} -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name} 171 | 172 | %if %{with_zts} 173 | %{__make} -C build/ZTS install INSTALL_ROOT=%{buildroot} 174 | %{__install} -Dpm644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} 175 | %endif 176 | 177 | %check 178 | %{__cc} --version 179 | %{__php} --version 180 | 181 | : Get needed extensions for NTS check 182 | modules="" 183 | for mod in json pdo; do 184 | if [ -f %{php_extdir}/${mod}.so ]; then 185 | modules="$modules -d extension=${mod}.so" 186 | fi 187 | done 188 | 189 | %if "%{phalcon_major}" == "4" 190 | if [ -f "%{php_extdir}/psr.so" ]; then 191 | modules="$modules -d extension=psr.so" 192 | fi 193 | %endif 194 | 195 | : Minimal load test for NTS extension 196 | %{__php} --no-php-ini \ 197 | $modules \ 198 | -d extension=%{buildroot}%{php_extdir}/phalcon.so \ 199 | --ri phalcon 200 | 201 | %if %{with_tests} 202 | : Upstream test suite NTS extension 203 | cd build/NTS 204 | SKIP_ONLINE_TESTS=1 \ 205 | TEST_PHP_EXECUTABLE=%{__php} \ 206 | TEST_PHP_ARGS="-n $modules -d extension=$PWD/modules/phalcon.so" \ 207 | NO_INTERACTION=1 \ 208 | REPORT_EXIT_STATUS=1 \ 209 | %{__php} -n run-tests.php --show-diff 210 | %endif 211 | 212 | : Get needed extensions for ZTS check 213 | modules="" 214 | for mod in json pdo; do 215 | if [ -f %{zts_php_extdir}/${mod}.so ]; then 216 | modules="$modules -d extension=${mod}.so" 217 | fi 218 | done 219 | 220 | %if "%{phalcon_major}" == "4" 221 | if [ -f "%{zts_php_extdir}/psr.so" ]; then 222 | modules="$modules -d extension=psr.so" 223 | fi 224 | %endif 225 | 226 | %if %{with_zts} 227 | : Minimal load test for ZTS extension 228 | %{__ztsphp} --no-php-ini \ 229 | $modules \ 230 | -d extension=%{buildroot}%{php_ztsextdir}/phalcon.so \ 231 | --ri phalcon 232 | %endif 233 | 234 | %clean 235 | extclean() { 236 | [ -f Makefile ] && %{__make} distclean; \ 237 | %{_bindir}/$1 --clean; \ 238 | %{__rm} -f tmp-php.ini 239 | } 240 | 241 | cd build/NTS 242 | extclean phpize 243 | 244 | %if %{with_zts} 245 | cd ../ZTS 246 | extclean zts-phpize 247 | %endif 248 | 249 | %{__rm} -rf ${buildroot} 250 | 251 | %files 252 | %defattr(-,root,root,-) 253 | %{!?_licensedir:%global license %%doc} 254 | %license LICENSE.txt 255 | %if "%{phalcon_major}" == "4" 256 | %doc CHANGELOG-4.1.md 257 | %endif 258 | %doc BACKERS.md 259 | %doc CHANGELOG.md 260 | %doc CONTRIBUTING.md 261 | %doc README.md 262 | 263 | %{php_extdir}/phalcon.so 264 | %config(noreplace) %{php_inidir}/%{ini_name} 265 | %{php_incldir}/ext/phalcon/php_phalcon.h 266 | 267 | %if %{with_zts} 268 | %{php_ztsextdir}/phalcon.so 269 | %config(noreplace) %{php_ztsinidir}/%{ini_name} 270 | %{php_ztsincldir}/ext/phalcon/php_phalcon.h 271 | %endif 272 | 273 | %changelog 274 | -------------------------------------------------------------------------------- /rpm/specs/remi-php-7.3.spec: -------------------------------------------------------------------------------- 1 | # This file is part of the Phalcon Builder. 2 | # 3 | # (c) Phalcon Team 4 | # 5 | # For the full copyright and license information, please view 6 | # the LICENSE file that was distributed with this source code. 7 | # 8 | # If you did not receive a copy of the license it is available 9 | # through the world-wide-web at the following url: 10 | # https://license.phalcon.io 11 | 12 | %global with_zts 0%{?__ztsphp:1} 13 | %global with_tests %{?_with_tests:1}%{!?_with_tests:0} 14 | %global php_apiver %((rpm -E %php_core_api | cut -d '-' -f 1) | tail -1) 15 | %global zend_apiver %((rpm -E %php_zend_api | cut -d '-' -f 1) | tail -1) 16 | 17 | # after 40-json.ini, 20-pdo.ini and 40-prs.ini (if any) 18 | %global ini_name 50-phalcon.ini 19 | 20 | %global src_dir build/php7/safe 21 | %if %{__isa_bits} == 32 22 | %global src_dir build/php7/32bits 23 | %endif 24 | %if %{__isa_bits} == 64 25 | %global src_dir build/php7/64bits 26 | %endif 27 | 28 | %if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 29 | %global with_libpcre 1 30 | %else 31 | %global with_libpcre 0 32 | %endif 33 | 34 | %global phalcon_major %((rpm -E %version | cut -d. -f1) | tail -1) 35 | 36 | %{!?zts_php_extdir: %{expand: %%define zts_php_extdir %(zts-php-config --extension-dir)}} 37 | 38 | Name: php73u-phalcon 39 | Version: %{version} 40 | Release: 1.ius%{?dist} 41 | Summary: High performance PHP framework 42 | Group: Development/Libraries 43 | Packager: Phalcon Team 44 | License: BSD 3-Clause 45 | URL: https://phalcon.io 46 | Source0: phalcon-php-%{version}.tar.gz 47 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 48 | BuildRequires: php73-php-devel%{?_isa} 49 | %if %{with_libpcre} 50 | BuildRequires: pcre-devel%{?_isa} >= 8.20 51 | %endif 52 | 53 | BuildRequires: re2c%{?_isa} 54 | 55 | BuildRequires: php-json%{?_isa} 56 | BuildRequires: php-pdo%{?_isa} 57 | 58 | %if "%{phalcon_major}" == "4" 59 | Requires: php-pecl-psr%{?_isa} 60 | 61 | BuildRequires: php-pecl-psr%{?_isa} 62 | BuildRequires: php-pecl-psr-devel%{?_isa} 63 | %endif 64 | 65 | # grep -nr __builtin_saddl_overflow ~/src/php/7.2.0 | wc -l 66 | # 6 67 | # The `__builtin_saddl_overflow' was added in clang 3.4 and gcc 5.0.0 68 | BuildRequires: gcc >= 5.0.0 69 | 70 | Requires: php-json%{?_isa} 71 | Requires: php-pdo%{?_isa} 72 | Requires: php-common%{?_isa} 73 | Requires: php(zend-abi) = %{php_zend_api} 74 | Requires: php(api) = %{php_core_api} 75 | 76 | %description 77 | High performance PHP framework. 78 | 79 | Phalcon is an open source web framework delivered as a C extension for 80 | the PHP language providing high performance and lower resource consumption. 81 | 82 | This package provides the Phalcon PHP extension. 83 | 84 | Documentation: https://docs.phalcon.io 85 | 86 | %prep 87 | %setup -q -n phalcon-php-%{version} 88 | 89 | %{__cat} > %{ini_name} << 'EOF' 90 | ; 91 | ; This file is part of the Phalcon. 92 | ; 93 | ; (c) Phalcon Team 94 | ; 95 | ; For the full copyright and license information, please view 96 | ; the LICENSE.txt file that was distributed with this source code. 97 | ; 98 | ; If you did not receive a copy of the license it is available 99 | ; through the world-wide-web at the following url: 100 | ; https://license.phalcon.io 101 | 102 | ; %{summary} 103 | [phalcon] 104 | extension = phalcon.so 105 | 106 | ; ----- Options to use the Phalcon Framework 107 | 108 | ; phalcon.db.escape_identifiers = On 109 | ; phalcon.db.force_casting = Off 110 | 111 | ; phalcon.orm.events = On 112 | ; phalcon.orm.virtual_foreign_keys = On 113 | ; phalcon.orm.column_renaming = On 114 | ; phalcon.orm.not_null_validations = On 115 | ; phalcon.orm.exception_on_failed_save = Off 116 | ; phalcon.orm.enable_literals = On 117 | ; phalcon.orm.late_state_binding = Off 118 | ; phalcon.orm.enable_implicit_joins = On 119 | ; phalcon.orm.cast_on_hydrate = Off 120 | ; phalcon.orm.ignore_unknown_columns = Off 121 | ; phalcon.orm.update_snapshot_on_save = On 122 | ; phalcon.orm.disable_assign_setters = Off 123 | ; phalcon.orm.resultset_prefetch_records = Off 124 | ; phalcon.orm.cast_last_insert_id_to_int = Off 125 | 126 | EOF 127 | 128 | %build 129 | extconf() { 130 | %configure \ 131 | --enable-phalcon \ 132 | --with-libdir=%{_lib} \ 133 | --with-php-config=$1 134 | } 135 | 136 | : Generate the SAFE sources 137 | 138 | CFLAGS+="-O2 -fvisibility=hidden -finline-functions" 139 | LDFLAGS+="-Wl,--as-needed -Wl,-Bsymbolic-functions" 140 | 141 | export CC="gcc" 142 | export LDFLAGS 143 | export CFLAGS 144 | export CPPFLAGS="-DPHALCON_RELEASE" 145 | 146 | %{__mv} %{src_dir} build/NTS 147 | 148 | %if %{with_zts} 149 | : Duplicate source tree for NTS / ZTS build 150 | %{__cp} -r build/NTS build/ZTS 151 | %endif 152 | 153 | : Build NTS extension 154 | cd build/NTS 155 | %{_bindir}/phpize 156 | extconf %{_bindir}/php-config 157 | %{__make} %{?_smp_mflags} 158 | 159 | %if %{with_zts} 160 | : Build ZTS extension 161 | cd ../ZTS 162 | %{_bindir}/zts-phpize 163 | extconf %{_bindir}/zts-php-config 164 | %{__make} %{?_smp_mflags} 165 | %endif 166 | 167 | %install 168 | %{__rm} -rf ${buildroot} 169 | %{__make} -C build/NTS install INSTALL_ROOT=%{buildroot} 170 | %{__install} -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name} 171 | 172 | %if %{with_zts} 173 | %{__make} -C build/ZTS install INSTALL_ROOT=%{buildroot} 174 | %{__install} -Dpm644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} 175 | %endif 176 | 177 | %check 178 | %{__cc} --version 179 | %{__php} --version 180 | 181 | : Get needed extensions for NTS check 182 | modules="" 183 | for mod in json pdo; do 184 | if [ -f %{php_extdir}/${mod}.so ]; then 185 | modules="$modules -d extension=${mod}.so" 186 | fi 187 | done 188 | 189 | %if "%{phalcon_major}" == "4" 190 | if [ -f "%{php_extdir}/psr.so" ]; then 191 | modules="$modules -d extension=psr.so" 192 | fi 193 | %endif 194 | 195 | : Minimal load test for NTS extension 196 | %{__php} --no-php-ini \ 197 | $modules \ 198 | -d extension=%{buildroot}%{php_extdir}/phalcon.so \ 199 | --ri phalcon 200 | 201 | %if %{with_tests} 202 | : Upstream test suite NTS extension 203 | cd build/NTS 204 | SKIP_ONLINE_TESTS=1 \ 205 | TEST_PHP_EXECUTABLE=%{__php} \ 206 | TEST_PHP_ARGS="-n $modules -d extension=$PWD/modules/phalcon.so" \ 207 | NO_INTERACTION=1 \ 208 | REPORT_EXIT_STATUS=1 \ 209 | %{__php} -n run-tests.php --show-diff 210 | %endif 211 | 212 | : Get needed extensions for ZTS check 213 | modules="" 214 | for mod in json pdo; do 215 | if [ -f %{zts_php_extdir}/${mod}.so ]; then 216 | modules="$modules -d extension=${mod}.so" 217 | fi 218 | done 219 | 220 | %if "%{phalcon_major}" == "4" 221 | if [ -f "%{zts_php_extdir}/psr.so" ]; then 222 | modules="$modules -d extension=psr.so" 223 | fi 224 | %endif 225 | 226 | %if %{with_zts} 227 | : Minimal load test for ZTS extension 228 | %{__ztsphp} --no-php-ini \ 229 | $modules \ 230 | -d extension=%{buildroot}%{php_ztsextdir}/phalcon.so \ 231 | --ri phalcon 232 | %endif 233 | 234 | %clean 235 | extclean() { 236 | [ -f Makefile ] && %{__make} distclean; \ 237 | %{_bindir}/$1 --clean; \ 238 | %{__rm} -f tmp-php.ini 239 | } 240 | 241 | cd build/NTS 242 | extclean phpize 243 | 244 | %if %{with_zts} 245 | cd ../ZTS 246 | extclean zts-phpize 247 | %endif 248 | 249 | %{__rm} -rf ${buildroot} 250 | 251 | %files 252 | %defattr(-,root,root,-) 253 | %{!?_licensedir:%global license %%doc} 254 | %license LICENSE.txt 255 | %if "%{phalcon_major}" == "4" 256 | %doc CHANGELOG-4.1.md 257 | %endif 258 | %doc BACKERS.md 259 | %doc CHANGELOG.md 260 | %doc CONTRIBUTING.md 261 | %doc README.md 262 | 263 | %{php_extdir}/phalcon.so 264 | %config(noreplace) %{php_inidir}/%{ini_name} 265 | %{php_incldir}/ext/phalcon/php_phalcon.h 266 | 267 | %if %{with_zts} 268 | %{php_ztsextdir}/phalcon.so 269 | %config(noreplace) %{php_ztsinidir}/%{ini_name} 270 | %{php_ztsincldir}/ext/phalcon/php_phalcon.h 271 | %endif 272 | 273 | %changelog 274 | -------------------------------------------------------------------------------- /rpm/specs/remi-php-7.4.spec: -------------------------------------------------------------------------------- 1 | # This file is part of the Phalcon Builder. 2 | # 3 | # (c) Phalcon Team 4 | # 5 | # For the full copyright and license information, please view 6 | # the LICENSE file that was distributed with this source code. 7 | # 8 | # If you did not receive a copy of the license it is available 9 | # through the world-wide-web at the following url: 10 | # https://license.phalcon.io 11 | 12 | %global with_zts 0%{?__ztsphp:1} 13 | %global with_tests %{?_with_tests:1}%{!?_with_tests:0} 14 | %global php_apiver %((rpm -E %php_core_api | cut -d '-' -f 1) | tail -1) 15 | %global zend_apiver %((rpm -E %php_zend_api | cut -d '-' -f 1) | tail -1) 16 | 17 | # after 40-json.ini, 20-pdo.ini and 40-prs.ini (if any) 18 | %global ini_name 50-phalcon.ini 19 | 20 | %global src_dir build/php7/safe 21 | %if %{__isa_bits} == 32 22 | %global src_dir build/php7/32bits 23 | %endif 24 | %if %{__isa_bits} == 64 25 | %global src_dir build/php7/64bits 26 | %endif 27 | 28 | %if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 29 | %global with_libpcre 1 30 | %else 31 | %global with_libpcre 0 32 | %endif 33 | 34 | %global phalcon_major %((rpm -E %version | cut -d. -f1) | tail -1) 35 | 36 | %{!?zts_php_extdir: %{expand: %%define zts_php_extdir %(zts-php-config --extension-dir)}} 37 | 38 | Name: php74u-phalcon 39 | Version: %{version} 40 | Release: 1.ius%{?dist} 41 | Summary: High performance PHP framework 42 | Group: Development/Libraries 43 | Packager: Phalcon Team 44 | License: BSD 3-Clause 45 | URL: https://phalcon.io 46 | Source0: phalcon-php-%{version}.tar.gz 47 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 48 | BuildRequires: php74-php-devel%{?_isa} 49 | %if %{with_libpcre} 50 | BuildRequires: pcre-devel%{?_isa} >= 8.20 51 | %endif 52 | 53 | BuildRequires: re2c%{?_isa} 54 | 55 | BuildRequires: php-json%{?_isa} 56 | BuildRequires: php-pdo%{?_isa} 57 | 58 | %if "%{phalcon_major}" == "4" 59 | Requires: php-pecl-psr%{?_isa} 60 | 61 | BuildRequires: php-pecl-psr%{?_isa} 62 | BuildRequires: php-pecl-psr-devel%{?_isa} 63 | %endif 64 | 65 | # grep -nr __builtin_saddl_overflow ~/src/php/7.2.0 | wc -l 66 | # 6 67 | # The `__builtin_saddl_overflow' was added in clang 3.4 and gcc 5.0.0 68 | BuildRequires: gcc >= 5.0.0 69 | 70 | Requires: php-json%{?_isa} 71 | Requires: php-pdo%{?_isa} 72 | Requires: php-common%{?_isa} 73 | Requires: php(zend-abi) = %{php_zend_api} 74 | Requires: php(api) = %{php_core_api} 75 | 76 | %description 77 | High performance PHP framework. 78 | 79 | Phalcon is an open source web framework delivered as a C extension for 80 | the PHP language providing high performance and lower resource consumption. 81 | 82 | This package provides the Phalcon PHP extension. 83 | 84 | Documentation: https://docs.phalcon.io 85 | 86 | %prep 87 | %setup -q -n phalcon-php-%{version} 88 | 89 | %{__cat} > %{ini_name} << 'EOF' 90 | ; 91 | ; This file is part of the Phalcon. 92 | ; 93 | ; (c) Phalcon Team 94 | ; 95 | ; For the full copyright and license information, please view 96 | ; the LICENSE.txt file that was distributed with this source code. 97 | ; 98 | ; If you did not receive a copy of the license it is available 99 | ; through the world-wide-web at the following url: 100 | ; https://license.phalcon.io 101 | 102 | ; %{summary} 103 | [phalcon] 104 | extension = phalcon.so 105 | 106 | ; ----- Options to use the Phalcon Framework 107 | 108 | ; phalcon.db.escape_identifiers = On 109 | ; phalcon.db.force_casting = Off 110 | 111 | ; phalcon.orm.events = On 112 | ; phalcon.orm.virtual_foreign_keys = On 113 | ; phalcon.orm.column_renaming = On 114 | ; phalcon.orm.not_null_validations = On 115 | ; phalcon.orm.exception_on_failed_save = Off 116 | ; phalcon.orm.enable_literals = On 117 | ; phalcon.orm.late_state_binding = Off 118 | ; phalcon.orm.enable_implicit_joins = On 119 | ; phalcon.orm.cast_on_hydrate = Off 120 | ; phalcon.orm.ignore_unknown_columns = Off 121 | ; phalcon.orm.update_snapshot_on_save = On 122 | ; phalcon.orm.disable_assign_setters = Off 123 | ; phalcon.orm.resultset_prefetch_records = Off 124 | ; phalcon.orm.cast_last_insert_id_to_int = Off 125 | 126 | EOF 127 | 128 | %build 129 | extconf() { 130 | %configure \ 131 | --enable-phalcon \ 132 | --with-libdir=%{_lib} \ 133 | --with-php-config=$1 134 | } 135 | 136 | : Generate the SAFE sources 137 | 138 | CFLAGS+="-O2 -fvisibility=hidden -finline-functions" 139 | LDFLAGS+="-Wl,--as-needed -Wl,-Bsymbolic-functions" 140 | 141 | export CC="gcc" 142 | export LDFLAGS 143 | export CFLAGS 144 | export CPPFLAGS="-DPHALCON_RELEASE" 145 | 146 | %{__mv} %{src_dir} build/NTS 147 | 148 | %if %{with_zts} 149 | : Duplicate source tree for NTS / ZTS build 150 | %{__cp} -r build/NTS build/ZTS 151 | %endif 152 | 153 | : Build NTS extension 154 | cd build/NTS 155 | %{_bindir}/phpize 156 | extconf %{_bindir}/php-config 157 | %{__make} %{?_smp_mflags} 158 | 159 | %if %{with_zts} 160 | : Build ZTS extension 161 | cd ../ZTS 162 | %{_bindir}/zts-phpize 163 | extconf %{_bindir}/zts-php-config 164 | %{__make} %{?_smp_mflags} 165 | %endif 166 | 167 | %install 168 | %{__rm} -rf ${buildroot} 169 | %{__make} -C build/NTS install INSTALL_ROOT=%{buildroot} 170 | %{__install} -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name} 171 | 172 | %if %{with_zts} 173 | %{__make} -C build/ZTS install INSTALL_ROOT=%{buildroot} 174 | %{__install} -Dpm644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} 175 | %endif 176 | 177 | %check 178 | %{__cc} --version 179 | %{__php} --version 180 | 181 | : Get needed extensions for NTS check 182 | modules="" 183 | for mod in json pdo; do 184 | if [ -f %{php_extdir}/${mod}.so ]; then 185 | modules="$modules -d extension=${mod}.so" 186 | fi 187 | done 188 | 189 | %if "%{phalcon_major}" == "4" 190 | if [ -f "%{php_extdir}/psr.so" ]; then 191 | modules="$modules -d extension=psr.so" 192 | fi 193 | %endif 194 | 195 | : Minimal load test for NTS extension 196 | %{__php} --no-php-ini \ 197 | $modules \ 198 | -d extension=%{buildroot}%{php_extdir}/phalcon.so \ 199 | --ri phalcon 200 | 201 | %if %{with_tests} 202 | : Upstream test suite NTS extension 203 | cd build/NTS 204 | SKIP_ONLINE_TESTS=1 \ 205 | TEST_PHP_EXECUTABLE=%{__php} \ 206 | TEST_PHP_ARGS="-n $modules -d extension=$PWD/modules/phalcon.so" \ 207 | NO_INTERACTION=1 \ 208 | REPORT_EXIT_STATUS=1 \ 209 | %{__php} -n run-tests.php --show-diff 210 | %endif 211 | 212 | : Get needed extensions for ZTS check 213 | modules="" 214 | for mod in json pdo; do 215 | if [ -f %{zts_php_extdir}/${mod}.so ]; then 216 | modules="$modules -d extension=${mod}.so" 217 | fi 218 | done 219 | 220 | %if "%{phalcon_major}" == "4" 221 | if [ -f "%{zts_php_extdir}/psr.so" ]; then 222 | modules="$modules -d extension=psr.so" 223 | fi 224 | %endif 225 | 226 | %if %{with_zts} 227 | : Minimal load test for ZTS extension 228 | %{__ztsphp} --no-php-ini \ 229 | $modules \ 230 | -d extension=%{buildroot}%{php_ztsextdir}/phalcon.so \ 231 | --ri phalcon 232 | %endif 233 | 234 | %clean 235 | extclean() { 236 | [ -f Makefile ] && %{__make} distclean; \ 237 | %{_bindir}/$1 --clean; \ 238 | %{__rm} -f tmp-php.ini 239 | } 240 | 241 | cd build/NTS 242 | extclean phpize 243 | 244 | %if %{with_zts} 245 | cd ../ZTS 246 | extclean zts-phpize 247 | %endif 248 | 249 | %{__rm} -rf ${buildroot} 250 | 251 | %files 252 | %defattr(-,root,root,-) 253 | %{!?_licensedir:%global license %%doc} 254 | %license LICENSE.txt 255 | %if "%{phalcon_major}" == "4" 256 | %doc CHANGELOG-4.1.md 257 | %endif 258 | %doc BACKERS.md 259 | %doc CHANGELOG.md 260 | %doc CONTRIBUTING.md 261 | %doc README.md 262 | 263 | %{php_extdir}/phalcon.so 264 | %config(noreplace) %{php_inidir}/%{ini_name} 265 | %{php_incldir}/ext/phalcon/php_phalcon.h 266 | 267 | %if %{with_zts} 268 | %{php_ztsextdir}/phalcon.so 269 | %config(noreplace) %{php_ztsinidir}/%{ini_name} 270 | %{php_ztsincldir}/ext/phalcon/php_phalcon.h 271 | %endif 272 | 273 | %changelog 274 | --------------------------------------------------------------------------------