mirror of
https://github.com/php-gnupg/php-gnupg.git
synced 2026-12-02 13:38:50 +00:00
Add PIE support (GH-56)
Declare the extension metadata and GpgME dependency for PIE, document installation, and verify a PIE install from the checkout in CI.
This commit is contained in:
parent
19341ddad0
commit
4af7b85c97
3 changed files with 78 additions and 0 deletions
34
.github/workflows/ci.yml
vendored
34
.github/workflows/ci.yml
vendored
|
|
@ -122,3 +122,37 @@ jobs:
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: make test
|
run: make test
|
||||||
|
|
||||||
|
pie-install:
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
env:
|
||||||
|
PIE_VERSION: "1.5.0"
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y gpg gpgsm libgpgme-dev php-cli php-dev autoconf libtool make gcc
|
||||||
|
|
||||||
|
- name: Checkout php-gnupg
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
|
||||||
|
- name: Download pie.phar
|
||||||
|
run: |
|
||||||
|
curl -fsSL -o "$RUNNER_TEMP/pie.phar" \
|
||||||
|
"https://github.com/php/pie/releases/download/${PIE_VERSION}/pie.phar"
|
||||||
|
|
||||||
|
- name: Install php-gnupg with PIE
|
||||||
|
env:
|
||||||
|
INSTALL_ROOT: ${{ runner.temp }}/pie-install
|
||||||
|
run: |
|
||||||
|
mkdir -p "$INSTALL_ROOT$(php-config --extension-dir)"
|
||||||
|
php "$RUNNER_TEMP/pie.phar" repository:add path "$GITHUB_WORKSPACE"
|
||||||
|
php "$RUNNER_TEMP/pie.phar" install --no-interaction --skip-enable-extension 'php-gnupg/gnupg:@dev'
|
||||||
|
|
||||||
|
- name: Verify the extension is loaded
|
||||||
|
env:
|
||||||
|
INSTALL_ROOT: ${{ runner.temp }}/pie-install
|
||||||
|
run: php -n -d "extension=$INSTALL_ROOT$(php-config --extension-dir)/gnupg.so" -m | grep -qx gnupg
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,15 @@ is supported is 1.3.0. The extension supports GnuPG version 1 and 2.
|
||||||
|
|
||||||
Of course PHP has to be installed too. The minimal version that is supported is 5.3.2.
|
Of course PHP has to be installed too. The minimal version that is supported is 5.3.2.
|
||||||
|
|
||||||
|
#### PIE
|
||||||
|
|
||||||
|
This extension can be installed with [PIE](https://github.com/php/pie) 1.5.0 or later, the modern
|
||||||
|
successor to PECL.
|
||||||
|
|
||||||
|
```
|
||||||
|
$ pie install php-gnupg/gnupg
|
||||||
|
```
|
||||||
|
|
||||||
#### PECL
|
#### PECL
|
||||||
|
|
||||||
This extension is available on PECL.
|
This extension is available on PECL.
|
||||||
|
|
|
||||||
35
composer.json
Normal file
35
composer.json
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
{
|
||||||
|
"name": "php-gnupg/gnupg",
|
||||||
|
"description": "A wrapper around the GpgME library that provides access to GnuPG.",
|
||||||
|
"type": "php-ext",
|
||||||
|
"license": "BSD-2-Clause",
|
||||||
|
"keywords": ["gnupg", "gpg", "gpgme", "encryption", "signing", "extension"],
|
||||||
|
"homepage": "https://github.com/php-gnupg/php-gnupg",
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/php-gnupg/php-gnupg/issues",
|
||||||
|
"source": "https://github.com/php-gnupg/php-gnupg",
|
||||||
|
"docs": "https://www.php.net/manual/en/book.gnupg.php"
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": "^7.2 || ^8.0",
|
||||||
|
"lib-gpgme": ">=1.3.0"
|
||||||
|
},
|
||||||
|
"php-ext": {
|
||||||
|
"extension-name": "gnupg",
|
||||||
|
"support-zts": true,
|
||||||
|
"support-nts": true,
|
||||||
|
"os-families-exclude": ["windows"],
|
||||||
|
"configure-options": [
|
||||||
|
{
|
||||||
|
"name": "with-gnupg",
|
||||||
|
"description": "Include gnupg support, optionally specifying the path to the GpgME installation (directory containing include/gpgme.h)",
|
||||||
|
"needs-value": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "with-gpg",
|
||||||
|
"description": "Path to the gpg v1.x binary",
|
||||||
|
"needs-value": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue