summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c5c58c6f75853188c0c17f81be5f642ae3ab1212 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# Maintainer: Pierre Schmitz <pierre@archlinux.de>

pkgname=php-legacy-imap
pkgver=8.2.20
pkgrel=1
pkgdesc="PHP legacy extension for imap (excluded from official php packages)"
arch=('x86_64')
license=('PHP-3.01')
url='https://www.php.net/'
depends=('php-legacy' 'c-client' 'libxcrypt')
source=(
  "https://php.net/distributions/php-${pkgver}.tar.xz"
)
sha256sums=('4474cc430febef6de7be958f2c37253e5524d5c5331a7e1765cd2d2234881e50')
_interpreter=${pkgver%.*}

prepare() {
	cd "${srcdir}/php-${pkgver}"

	autoconf

	# Disable failing tests
	rm tests/output/stream_isatty_*.phpt
	rm Zend/tests/arginfo_zpp_mismatch*.phpt
}

build() {
	local _phpconfig="--srcdir=../php-${pkgver} \
		--config-cache \
		--prefix=/usr \
		--sbindir=/usr/bin \
		--sysconfdir=/etc/php-legacy \
		--localstatedir=/var \
		--with-layout=GNU \
		--with-config-file-path=/etc/php-legacy \
		--with-config-file-scan-dir=/etc/php-legacy/conf.d \
		--disable-rpath \
		--mandir=/usr/share/man \
		--libdir=/usr/lib/php-legacy \
		--datarootdir=/usr/share/php-legacy \
		--datadir=/usr/share/php-legacy \
		--program-suffix=-legacy \
		--includedir=/usr/include/php-legacy \
		--disable-gcc-global-regs \
		"

	local _phpextensions="\
		--with-imap-ssl \
		--with-imap=shared
		--with-kerberos
		"

	EXTENSION_DIR=/usr/lib/php-legacy/modules
	export EXTENSION_DIR

	mkdir "${srcdir}/build"
	cd "${srcdir}/build"
	ln -s "../php-${pkgver}/configure"
	./configure ${_phpconfig} \
		--enable-embed=shared \
		${_phpextensions}
	make
}

package() {
	install -D -m755 "${srcdir}/build/modules/imap.so" "${pkgdir}/usr/lib/php-legacy/modules/imap.so"
}