Skip to content

Commit

Permalink
Merge pull request #17 from phalcongelist/dev
Browse files Browse the repository at this point in the history
1.2.1
  • Loading branch information
sergeyklay authored Jun 21, 2017
2 parents af7fcf2 + 083e526 commit 34dfdf7
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 25 deletions.
6 changes: 3 additions & 3 deletions .travis.mk
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@ D_TARGETS=report prepare-build

.EXPORT_ALL_VARIABLES: ; # send all vars to shell

.PHONY: source package prepare-deb-spec prepare-rpm-spec $(D_TARGETS)
.PHONY: source package prepare-deb-spec prepare-rpm-spec patching-sources $(D_TARGETS)

include $(SCRIPTDIR)/builder/config.mk
include $(SCRIPTDIR)/builder/check.mk
include $(SCRIPTDIR)/builder/patching.mk

source: $(D_TARGETS)
source: $(D_TARGETS) patching-sources
$(info Create tarball...)
git clone -q --depth=1 $(PACK_REPO) -b $(PACK_BRANCH) $(SCRIPTDIR)/packpack
TARBALL_COMPRESSOR=gz $(SCRIPTDIR)/packpack/packpack tarball

package: $(D_TARGETS)
package: $(D_TARGETS) patching-sources
$(info Build package...)
git clone -q --depth=1 $(PACK_REPO) -b $(PACK_BRANCH) $(SCRIPTDIR)/packpack
$(SCRIPTDIR)/packpack/packpack
Expand Down
10 changes: 4 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,19 @@ cache:

env:
global:
- ZEND_DONT_UNLOAD_MODULES=1
- CC="ccache gcc"
- PATH="$HOME/bin:$PATH"
- PRODUCT=php-phalcon
- PACKAGECLOUD_USER=phalcon
- PACKAGECLOUD_REPO=stable
- DOCKER_REPO=phalconphp/build
- SOURCEDIR=$TRAVIS_BUILD_DIR/cphalcon
- ZEPHIR_VERSION=0.9.7
- ZEPHIR_PARSER_VERSION=v1.0.1
- ZEPHIR_VERSION=0.9.9
- ZEPHIR_PARSER_VERSION=v1.0.3
# This should be a branch name or a tag
- STABLE_BRANCH=v3.1.2
- STABLE_BRANCH=v3.2.0
- NIGHTLY_BRANCH=3.2.x
# This should be increased to reb-build and push package
- STABLE_BUILD_VERSION=2
- STABLE_BUILD_VERSION=1
- NIGHTLY_BUILD_VERSION=$TRAVIS_BUILD_NUMBER
- TARGET=package

Expand Down
13 changes: 12 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

## [1.2.1] - 2017-06-21
### Changed
- Improved RPM-spec by removing hardcoded virtual provides specific things
- Use stable Zephir Parser
- Updated license path
- Patching `zend_error_noreturn` usage [phalcon/cphalcon#12909](https://github.com/phalcon/cphalcon/issues/12909)

## [1.2.0] - 2017-04-06
### Added
- Added ability to build PHP 7.1 packages
Expand All @@ -25,8 +32,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- Removed patching headers target
- Renamed debug symbols for Debain/Ubuntu

## [1.0.0] - 2017-03-14
## 1.0.0 - 2017-03-14
### Added
- Initial stable release. Added ability to build packages for
Ubuntu 14.04-16.04, Debian 8.5-9 and CentOS 7.2 by using
[Packpack](https://github.com/packpack/packpack).

[1.2.1]: https://github.com/phalcongelist/packagecloud/compare/v1.2.0...v1.2.1
[1.2.0]: https://github.com/phalcongelist/packagecloud/compare/v1.1.0...v1.2.0
[1.1.0]: https://github.com/phalcongelist/packagecloud/compare/v1.0.0...v1.1.0
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,27 @@ Installation/configuration details for each version and operating system [can be

| Codename | OS Release | Phalcon Releases | Supported PHP versions |
| --------- | ---------- | ----------------- | ---------------------- |
| `trusty` | 14.04 LTS | `3.0.0` - `3.1.2` | `5.5.x`, `7.0.x` |
| `trusty` | 14.04 LTS | `3.1.2` | `7.1.x` |
| `wily` | 15.10 | `3.0.0` - `3.1.2` | `5.6.x` |
| `xenial` | 16.04 LTS | `3.0.0` - `3.1.2` | `7.0.x` |
| `xenial` | 16.04 LTS | `3.1.2` | `7.1.x` |
| `trusty` | 14.04 LTS | `3.0.0` - `3.2.0` | `5.5.x`, `7.0.x` |
| `trusty` | 14.04 LTS | `3.1.2` - `3.2.0` | `7.1.x` |
| `wily` | 15.10 | `3.0.0` - `3.2.0` | `5.6.x` |
| `xenial` | 16.04 LTS | `3.0.0` - `3.2.0` | `7.0.x` |
| `xenial` | 16.04 LTS | `3.1.2` - `3.2.0` | `7.1.x` |

### Debian

| Codename | OS Release | Phalcon Releases | Supported PHP versions |
| --------- | ---------- | ----------------- | ---------------------- |
| `jessie` | 8.5 LTS | `3.0.0` - `3.1.2` | `5.6.x`, `7.0.x` |
| `jessie` | 8.5 LTS | `3.1.2` | `7.1.x` |
| `stretch` | 9 | `3.0.0` - `3.1.2` | `7.0.x` |
| `stretch` | 9 | `3.1.2` | `7.1.x` |
| `jessie` | 8.5 LTS | `3.0.0` - `3.2.0` | `5.6.x`, `7.0.x` |
| `jessie` | 8.5 LTS | `3.1.2` - `3.2.0` | `7.1.x` |
| `stretch` | 9 | `3.0.0` - `3.2.0` | `7.0.x` |
| `stretch` | 9 | `3.1.2` - `3.2.0` | `7.1.x` |

### CentOS (RHEL)

| Codename | OS Release | Phalcon Releases | Supported PHP versions | RPM repo |
| --------- | ---------- | ----------------- | ---------------------------- | -------------- |
| `Core` | 7.2 LTS | `3.0.0` - `3.1.2` | `php55u`, `php56u`, `php70u` | [`IUS`][:ius:] |
| `Core` | 7.2 LTS | `3.1.2` | `php71u` | [`IUS`][:ius:] |
| `Core` | 7.2 LTS | `3.0.0` - `3.2.0` | `php55u`, `php56u`, `php70u` | [`IUS`][:ius:] |
| `Core` | 7.2 LTS | `3.1.2` - `3.2.0` | `php71u` | [`IUS`][:ius:] |

_Support of other RPM repos is coming soon_

Expand Down
23 changes: 23 additions & 0 deletions builder/patching.mk
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ else
RPM_PHP_BASE:=php
endif

PHALCON_SOURCE=$(shell grep -r -l "zend_error_noreturn" $(SOURCEDIR)/build/php5 | grep phalcon.zep.c)

define patching_rpmspec
cp $(1) rpmspec.tmp
sed \
Expand All @@ -48,6 +50,27 @@ define patching_rpmspec
mv -f rpmspec.tmp $(SOURCEDIR)/rpm/php-phalcon.spec
endef

define patching_zend_error_noreturn
echo "-------------------------------------------------------------------"
echo "Patching $(1)"
echo "-------------------------------------------------------------------"
cp $(1) $@.tmp
sed \
-e 's/zend_error_noreturn/zend_error/' \
-i $@.tmp
grep -F "zend_error" $@.tmp || \
(echo "Failed to patch $(1)" && exit 1)
mv -f $@.tmp $(1)
echo
endef

patching-sources: $(PHALCON_SOURCE)
$(info -------------------------------------------------------------------)
$(info Scan for $(PHALCON_SOURCE))
$(info -------------------------------------------------------------------)
$(foreach file,$(PHALCON_SOURCE),$(call patching_zend_error_noreturn,$(file));)
$(info )

prepare-build: prepare-$(PACKAGE)-spec
$(info -------------------------------------------------------------------)
$(info Prepare .build.mk)
Expand Down
2 changes: 2 additions & 0 deletions ci/phalcon.ini
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,5 @@ extension = phalcon.so
; phalcon.orm.enable_implicit_joins = On
; phalcon.orm.cast_on_hydrate = Off
; phalcon.orm.ignore_unknown_columns = Off
; phalcon.orm.update_snapshot_on_save = On
; phalcon.orm.disable_assign_setters = Off
2 changes: 2 additions & 0 deletions debian/phalcon.ini
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@ extension = phalcon.so
; phalcon.orm.enable_implicit_joins = On
; phalcon.orm.cast_on_hydrate = Off
; phalcon.orm.ignore_unknown_columns = Off
; phalcon.orm.update_snapshot_on_save = On
; phalcon.orm.disable_assign_setters = Off
9 changes: 5 additions & 4 deletions rpm/php-phalcon.spec
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ BuildRequires: pcre-devel%{?_isa} >= 8.20
BuildRequires: re2c%{?_isa}
Requires: %{php_base}-pdo%{?_isa}
Requires: %{php_base}-common%{?_isa}
Requires: %{php_base}(zend-abi) = %{zend_apiver}
Requires: %{php_base}(api) = %{php_apiver}
Requires: php(zend-abi) = %{php_zend_api}
Requires: php(api) = %{php_core_api}

%description
High performance PHP framework.
Expand All @@ -82,7 +82,7 @@ Documentation: https://docs.phalconphp.com
; Copyright (c) 2011-2017 Phalcon Team (https://www.phalconphp.com)
;
; This source file is subject to the New BSD License that is bundled
; with this package in the file https://license.phalconphp.com
; with this package in the file LICENSE.txt.
;
; If you did not receive a copy of the license and are unable to
; obtain it through the world-wide-web, please send an email
Expand All @@ -109,6 +109,7 @@ extension = %{ext_name}.so
; %{ext_name}.orm.enable_implicit_joins = On
; %{ext_name}.orm.cast_on_hydrate = Off
; %{ext_name}.orm.ignore_unknown_columns = Off
; %{ext_name}.orm.update_snapshot_on_save = On

EOF

Expand Down Expand Up @@ -215,7 +216,7 @@ extclean zts-phpize
%files
%defattr(-,root,root,-)
%{!?_licensedir:%global license %%doc}
%license docs/LICENSE.txt
%license LICENSE.txt
%doc BACKERS.md
%doc CHANGELOG.md
%doc CONTRIBUTING.md
Expand Down

0 comments on commit 34dfdf7

Please sign in to comment.