You are not logged in.

#1 2022-02-16 06:49:39

AnotherUser
Member
Registered: 2021-02-09
Posts: 10

[Solved] PHP7 Yaml extension

Hi guys

Hope this is the right place to ask.

Does somebody know why the yaml package for php7 https://archlinux.org/packages/extra/x86_64/php7/ is not available?
How should i install the extension?

Thanks!

Kindly regards

Last edited by AnotherUser (2022-02-18 09:07:15)

Offline

#2 2022-02-16 22:20:50

mpan
Member
Registered: 2012-08-01
Posts: 1,585
Website

Re: [Solved] PHP7 Yaml extension

AnotherUser wrote:

Does somebody know why the yaml package for php7 https://archlinux.org/packages/extra/x86_64/php7/ is not available?

The usual answer is: because no one is willing to maintain it.

AnotherUser wrote:

How should i install the extension?

By following the official PHP documentation on YAML extension. Massimiliano Torromeo has published php-yaml PKGBUILD in AUR, which you may use as-is or base your own PKGBUILD on it.

Last edited by mpan (2022-02-16 22:22:01)


Paperclips in avatars? | Sometimes I seem a bit harsh — don’t get offended too easily!

Offline

#3 2022-02-18 09:06:39

AnotherUser
Member
Registered: 2021-02-09
Posts: 10

Re: [Solved] PHP7 Yaml extension

Did work with little adjustments, thanks

# Maintainer: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>

pkgname=php7-yaml
_extname=yaml
pkgver=2.2.2
pkgrel=1
pkgdesc="Support for YAML 1.1 (YAML Ain't Markup Language) serialization using the LibYAML library."
arch=("i686" "x86_64")
url="http://bd808.com/pecl-file_formats-yaml/"
license=('MIT')
depends=('php7' 'libyaml')
backup=("etc/php7/conf.d/$_extname.ini")
source=("http://pecl.php.net/get/$_extname-$pkgver.tgz")
sha256sums=('119052f0461d57d86f44c252f9c9b2dd743486c701c1a0aba0aebecdd0d8b82a')

build() {
	cd "$srcdir"/$_extname-$pkgver
	phpize7
	./configure
	make
}

package() {
	cd "$srcdir"/$_extname-$pkgver
	install -m0755 -d "$pkgdir"/etc/php7/conf.d/
	install -m0644 -D "LICENSE" "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
	echo "extension=$_extname.so" > "$pkgdir"/etc/php7/conf.d/$_extname.ini
	chmod 0644 "$pkgdir"/etc/php7/conf.d/$_extname.ini
	install -m0755 -D ".libs/$_extname.so" "$pkgdir"$(php-config7 --extension-dir)/$_extname.so
}

Offline

Board footer

Powered by FluxBB