-
Notifications
You must be signed in to change notification settings - Fork 0
/
php80.spec
3563 lines (2877 loc) · 117 KB
/
php80.spec
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# KNG spec file for php8, forked from
#
# Fedora spec file for php
#
# License: MIT
# http://opensource.org/licenses/MIT
#
# Please preserve changelog entries
#
# API/ABI check
%global apiver 20200930
%global zendver 20200930
%global pdover 20170320
# we don't want -z defs linker flag
%undefine _strict_symbol_defs_build
# Adds -z now to the linker flags
%global _hardened_build 1
# version used for php embedded library soname
%global embed_version 8.0
%global mysql_sock %(mysql_config --socket 2>/dev/null || echo /var/lib/mysql/mysql.sock)
# Regression tests take a long time, you can skip 'em with this
#global runselftest 0
%{!?runselftest: %global runselftest 1}
# Use the arch-specific mysql_config binary to avoid mismatch with the
# arch detection heuristic used by bindir/mysql_config.
%global mysql_config %{_libdir}/mysql/mysql_config
# needed at srpm build time, when httpd-devel not yet installed
%{!?_httpd_mmn: %{expand: %%global _httpd_mmn %%(cat %{_includedir}/httpd/.mmn 2>/dev/null || echo 0-0)}}
%global upver 8.0.6
#global rcver RC1
# subpackages
%global with_firebird 1
%global with_imap 1
%global with_freetds 1
%global with_sodium 1
%global with_pspell 1
%global with_tidy 1
%global with_modphp 1
%if 0%{?fedora}
%global with_zts 1
%global with_lmdb 1
%global with_libgd 1
%else
%global with_zts 0
%global with_lmdb 0
%global with_libgd 0
%endif
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
# switch to bundled library using --without libpcre
%global with_libpcre 1
%else
# switch to system library using --with libpcre
%global with_libpcre 0
%endif
# httpd 2.4.10 with httpd-filesystem and sethandler support
%if 0%{?fedora} >= 21 || 0%{?rhel} >= 8
%global with_httpd2410 1
%else
%global with_httpd2410 0
%endif
Summary: PHP scripting language for creating dynamic web sites
Name: php80
Version: 8.0.6
Release: 3.kkr%{?dist}
# All files licensed under PHP version 3.01, except
# Zend is licensed under Zend
# TSRM is licensed under BSD
# main/snprintf.c, main/spprintf.c and main/rfc1867.c are ASL 1.0
# ext/date/lib is MIT
# Zend/zend_sort is NCSA
License: PHP and Zend and BSD and MIT and ASL 1.0 and NCSA
URL: http://www.php.net/
Source0: https://www.php.net/distributions/php-%{version}.tar.xz
Source1: php.conf
Source2: php.ini
Source3: macros.php
Source4: php-fpm.conf
Source5: php-fpm-www.conf
Source6: php-fpm.service
Source7: php-fpm.logrotate
Source9: php.modconf
Source12: php-fpm.wants
Source13: nginx-fpm.conf
Source14: nginx-php.conf
# See https://secure.php.net/gpg-keys.php
Source20: https://www.php.net/distributions/php-keyring.gpg
Source21: https://www.php.net/distributions/php-%{version}.tar.xz.asc
# Configuration files for some extensions
Source50: 10-opcache.ini
Source51: opcache-default.blacklist
Source53: 20-ffi.ini
# Build fixes
Patch1: php-7.4.0-httpd.patch
Patch5: php-7.2.0-includedir.patch
Patch6: php-8.0.0-embed.patch
Patch8: php-7.4.0-libdb.patch
# get rid of deprecated functions from 8.1
Patch9: php-8.0.6-deprecated.patch
# Functional changes
# Use system nikic/php-parser
Patch41: php-8.0.0-parser.patch
# use system tzdata
Patch42: php-8.0.0-systzdata-v19.patch
# See http://bugs.php.net/53436
Patch43: php-7.4.0-phpize.patch
# Use -lldap_r for OpenLDAP
Patch45: php-7.4.0-ldap_r.patch
# drop "Configure command" from phpinfo output
# and only use gcc (instead of full version)
Patch47: php-8.0.0-phpinfo.patch
# Upstream fixes (100+)
# Security fixes (200+)
# Fixes for tests (300+)
# Factory is droped from system tzdata
Patch300: php-7.4.0-datetests.patch
BuildRequires: gnupg2
BuildRequires: bzip2-devel
BuildRequires: pkgconfig(libcurl) >= 7.29.0
BuildRequires: httpd-devel >= 2.0.46-1
BuildRequires: pam-devel
%if %{with_httpd2410}
# to ensure we are using httpd with filesystem feature (see #1081453)
BuildRequires: httpd-filesystem
%endif
# to ensure we are using nginx with filesystem feature (see #1142298)
BuildRequires: nginx-filesystem
BuildRequires: libstdc++-devel
# no pkgconfig to avoid compat-openssl10
BuildRequires: openssl-devel >= 1.0.1
BuildRequires: pkgconfig(sqlite3) >= 3.7.4
BuildRequires: pkgconfig(zlib) >= 1.2.0.4
BuildRequires: smtpdaemon
BuildRequires: pkgconfig(libedit)
%if %{with_libpcre}
BuildRequires: pkgconfig(libpcre2-8) >= 10.30
%else
Provides: bundled(pcre2) = 10.32
%endif
BuildRequires: bzip2
BuildRequires: perl-interpreter
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: make
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: libtool
BuildRequires: libtool-ltdl-devel
BuildRequires: systemtap-sdt-devel
# used for tests
BuildRequires: %{_bindir}/ps
%description
PHP is an HTML-embedded scripting language. PHP attempts to make it
easy for developers to write dynamically generated web pages. PHP also
offers built-in database integration for several commercial and
non-commercial database management systems, so writing a
database-enabled webpage with PHP is fairly simple. The most common
use of PHP coding is probably as a replacement for CGI scripts.
%if %{with_modphp}
The php package contains the module (often referred to as mod_php)
which adds support for the PHP language to Apache HTTP Server when
running in prefork mode. This module is deprecated.
%endif
%package -n mod_%{name}
Summary: PHP module for the Apache HTTP Server
# ensure we build with stock httpd, not httpd24u
BuildRequires: httpd-devel < 2.4.10
%if %{with_modphp}
Requires: httpd-mmn = %{_httpd_mmn}
Requires: php-common%{?_isa} = %{version}-%{release}
Provides: mod_php = %{version}-%{release}
# To ensure correct /var/lib/php/session ownership:
Requires(pre): httpd-filesystem
# php engine for Apache httpd webserver
Provides: php(httpd)
# mod_php is deprecated, no package should requires php or mod_php
# all packages must requires used SAPI (cli, fpm, embded..)
# and used extrensions (mysqli, mbstring, xmlwriter...)
Provides: deprecated()
%else
# preserve old behavior
#Recommends: httpd
%endif
%if %{with_zts}
Provides: php-zts = %{version}-%{release}
Provides: php-zts%{?_isa} = %{version}-%{release}
%endif
# php engine for Apache httpd webserver
Provides: php(httpd)
# safe replacement
Provides: php = %{version}-%{release}
Provides: php%{?_isa} = %{version}-%{release}
Conflicts: php < %{version}-%{release}
Provides: mod_php = %{version}-%{release}
Provides: mod_php%{?_isa} = %{version}-%{release}
Conflicts: mod_php < %{version}-%{release}
%description -n mod_%{name}
The mod_%{name} package contains the module which adds support for the PHP
language to Apache HTTP Server.
%package cli
Summary: Command-line interface for PHP
# sapi/cli/ps_title.c is PostgreSQL
License: PHP and Zend and BSD and MIT and ASL 1.0 and NCSA and PostgreSQL
Requires: php-common%{?_isa} = %{version}-%{release}
Provides: php-cgi = %{version}-%{release}, php-cgi%{?_isa} = %{version}-%{release}
Provides: php-pcntl, php-pcntl%{?_isa}
Provides: php-readline, php-readline%{?_isa}
# safe replacement
Provides: php-cli = %{version}-%{release}
Provides: php-cli%{?_isa} = %{version}-%{release}
Conflicts: php-cli < %{version}-%{release}
%description cli
The php-cli package contains the command-line interface
executing PHP scripts, /usr/bin/php, and the CGI interface.
%package dbg
Summary: The interactive PHP debugger
Requires: php-common%{?_isa} = %{version}-%{release}
# safe replacement
Provides: php-dbg = %{version}-%{release}
Provides: php-dbg%{?_isa} = %{version}-%{release}
Conflicts: php-dbg < %{version}-%{release}
%description dbg
The php-dbg package contains the interactive PHP debugger.
%package fpm
Summary: PHP FastCGI Process Manager
BuildRequires: libacl-devel
BuildRequires: pkgconfig(libsystemd) >= 209
Requires: php-common%{?_isa} = %{version}-%{release}
Requires(pre): /usr/sbin/useradd
%{?systemd_requires}
%if %{with_httpd2410}
# To ensure correct /var/lib/php/session ownership:
Requires(pre): httpd-filesystem
# For php.conf in /etc/httpd/conf.d
# and version 2.4.10 for proxy support in SetHandler
Requires: httpd-filesystem >= 2.4.10
%endif
# php engine for Apache httpd webserver
Provides: php(httpd)
# safe replacement
Provides: php-fpm = %{version}-%{release}
Provides: php-fpm%{?_isa} = %{version}-%{release}
Conflicts: php-fpm < %{version}-%{release}
%description fpm
PHP-FPM (FastCGI Process Manager) is an alternative PHP FastCGI
implementation with some additional features useful for sites of
any size, especially busier sites.
%package common
Summary: Common files for PHP
# All files licensed under PHP version 3.01, except
# fileinfo is licensed under PHP version 3.0
# regex, libmagic are licensed under BSD
License: PHP and BSD
# ABI/API check - Arch specific
Provides: php(api) = %{apiver}-%{__isa_bits}
Provides: php(zend-abi) = %{zendver}-%{__isa_bits}
Provides: php(language) = %{version}, php(language)%{?_isa} = %{version}
# Provides for all builtin/shared modules:
Provides: php-bz2, php-bz2%{?_isa}
Provides: php-calendar, php-calendar%{?_isa}
Provides: php-core = %{version}, php-core%{?_isa} = %{version}
Provides: php-ctype, php-ctype%{?_isa}
Provides: php-curl, php-curl%{?_isa}
Provides: php-date, php-date%{?_isa}
Provides: bundled(timelib)
Provides: php-exif, php-exif%{?_isa}
Provides: php-fileinfo, php-fileinfo%{?_isa}
Provides: bundled(libmagic) = 5.29
Provides: php-filter, php-filter%{?_isa}
Provides: php-ftp, php-ftp%{?_isa}
Provides: php-gettext, php-gettext%{?_isa}
Provides: php-hash, php-hash%{?_isa}
Provides: php-mhash = %{version}, php-mhash%{?_isa} = %{version}
Provides: php-iconv, php-iconv%{?_isa}
Obsoletes: php-json < 8
Provides: php-json = %{version}, php-json%{?_isa} = %{version}
Provides: php-libxml, php-libxml%{?_isa}
Provides: php-openssl, php-openssl%{?_isa}
Provides: php-phar, php-phar%{?_isa}
Provides: php-pcre, php-pcre%{?_isa}
Provides: php-reflection, php-reflection%{?_isa}
Provides: php-session, php-session%{?_isa}
Provides: php-sockets, php-sockets%{?_isa}
Provides: php-spl, php-spl%{?_isa}
Provides: php-standard = %{version}, php-standard%{?_isa} = %{version}
Provides: php-tokenizer, php-tokenizer%{?_isa}
Provides: php-zlib, php-zlib%{?_isa}
# safe replacement
Provides: php-common = %{version}-%{release}
Provides: php-common%{?_isa} = %{version}-%{release}
Conflicts: php-common < %{version}-%{release}
Conflicts: php56u-common, php70u-common, php71u-common, php72u-common, php73-common
%description common
The php-common package contains files used by both the php
package and the php-cli package.
%package devel
Summary: Files needed for building PHP extensions
Requires: php-cli%{?_isa} = %{version}-%{release}
# always needed to build extension
Requires: autoconf
Requires: automake
Requires: make
Requires: gcc
Requires: gcc-c++
Requires: libtool
# see "php-config --libs"
Requires: krb5-devel%{?_isa}
Requires: libxml2-devel%{?_isa}
Requires: openssl-devel%{?_isa} >= 1.0.1
Requires: pcre2-devel%{?_isa}
Requires: zlib-devel%{?_isa}
%if %{with_zts}
Provides: php-zts-devel = %{version}-%{release}
Provides: php-zts-devel%{?_isa} = %{version}-%{release}
%endif
# safe replacement
Provides: php-devel = %{version}-%{release}
Provides: php-devel%{?_isa} = %{version}-%{release}
Conflicts: php-devel < %{version}-%{release}
%description devel
The php-devel package contains the files needed for building PHP
extensions. If you need to compile your own PHP extensions, you will
need to install this package.
%package opcache
Summary: The Zend OPcache
License: PHP
Requires: php-common%{?_isa} = %{version}-%{release}
Provides: php-pecl-zendopcache = %{version}
Provides: php-pecl-zendopcache%{?_isa} = %{version}
Provides: php-pecl(opcache) = %{version}
Provides: php-pecl(opcache)%{?_isa} = %{version}
# safe replacement
Provides: php-opcache = %{version}-%{release}
Provides: php-opcache%{?_isa} = %{version}-%{release}
Conflicts: php-opcache < %{version}-%{release}
%description opcache
The Zend OPcache provides faster PHP execution through opcode caching and
optimization. It improves PHP performance by storing precompiled script
bytecode in the shared memory. This eliminates the stages of reading code from
the disk and compiling it on future access. In addition, it applies a few
bytecode optimization patterns that make code execution faster.
%if %{with_imap}
%package imap
Summary: A module for PHP applications that use IMAP
# All files licensed under PHP version 3.01
License: PHP
Requires: php-common%{?_isa} = %{version}-%{release}
BuildRequires: pkgconfig(krb5)
BuildRequires: pkgconfig(krb5-gssapi)
BuildRequires: openssl-devel >= 1.0.1
BuildRequires: libc-client-devel
# safe replacement
Provides: php-imap = %{version}-%{release}
Provides: php-imap%{?_isa} = %{version}-%{release}
Conflicts: php-imap < %{version}-%{release}
%description imap
The php-imap module will add IMAP (Internet Message Access Protocol)
support to PHP. IMAP is a protocol for retrieving and uploading e-mail
messages on mail servers. PHP is an HTML-embedded scripting language.
%endif
%package ldap
Summary: A module for PHP applications that use LDAP
# All files licensed under PHP version 3.01
License: PHP
Requires: php-common%{?_isa} = %{version}-%{release}
BuildRequires: pkgconfig(libsasl2)
BuildRequires: openldap-devel
BuildRequires: openssl-devel >= 1.0.1
# safe replacement
Provides: php-ldap = %{version}-%{release}
Provides: php-ldap%{?_isa} = %{version}-%{release}
Conflicts: php-ldap < %{version}-%{release}
%description ldap
The php-ldap adds Lightweight Directory Access Protocol (LDAP)
support to PHP. LDAP is a set of protocols for accessing directory
services over the Internet. PHP is an HTML-embedded scripting
language.
%package pdo
Summary: A database access abstraction module for PHP applications
# All files licensed under PHP version 3.01
License: PHP
Requires: php-common%{?_isa} = %{version}-%{release}
# ABI/API check - Arch specific
Provides: php-pdo-abi = %{pdover}-%{__isa_bits}
Provides: php(pdo-abi) = %{pdover}-%{__isa_bits}
Provides: php-sqlite3, php-sqlite3%{?_isa}
Provides: php-pdo_sqlite, php-pdo_sqlite%{?_isa}
# safe replacement
Provides: php-pdo = %{version}-%{release}
Provides: php-pdo%{?_isa} = %{version}-%{release}
Conflicts: php-pdo < %{version}-%{release}
%description pdo
The php-pdo package contains a dynamic shared object that will add
a database access abstraction layer to PHP. This module provides
a common interface for accessing MySQL, PostgreSQL or other
databases.
%package mysqlnd
Summary: A module for PHP applications that use MySQL databases
# All files licensed under PHP version 3.01
License: PHP
Requires: php-pdo%{?_isa} = %{version}-%{release}
Provides: php_database
Provides: php-mysqli = %{version}-%{release}
Provides: php-mysqli%{?_isa} = %{version}-%{release}
Provides: php-pdo_mysql, php-pdo_mysql%{?_isa}
# safe replacement
Provides: php-mysqlnd = %{version}-%{release}
Provides: php-mysqlnd%{?_isa} = %{version}-%{release}
Conflicts: php-mysqlnd < %{version}-%{release}
Conflicts: php-mysql < %{version}-%{release}
%description mysqlnd
The php-mysqlnd package contains a dynamic shared object that will add
MySQL database support to PHP. MySQL is an object-relational database
management system. PHP is an HTML-embeddable scripting language. If
you need MySQL support for PHP applications, you will need to install
this package and the php package.
This package use the MySQL Native Driver
%package pgsql
Summary: A PostgreSQL database module for PHP
# All files licensed under PHP version 3.01
License: PHP
Requires: php-pdo%{?_isa} = %{version}-%{release}
Provides: php_database
Provides: php-pdo_pgsql, php-pdo_pgsql%{?_isa}
BuildRequires: krb5-devel
BuildRequires: openssl-devel >= 1.0.1
BuildRequires: postgresql-devel
# safe replacement
Provides: php-pgsql = %{version}-%{release}
Provides: php-pgsql%{?_isa} = %{version}-%{release}
Conflicts: php-pgsql < %{version}-%{release}
%description pgsql
The php-pgsql package add PostgreSQL database support to PHP.
PostgreSQL is an object-relational database management
system that supports almost all SQL constructs. PHP is an
HTML-embedded scripting language. If you need back-end support for
PostgreSQL, you should install this package in addition to the main
php package.
%package process
Summary: Modules for PHP script using system process interfaces
# All files licensed under PHP version 3.01
License: PHP
Requires: php-common%{?_isa} = %{version}-%{release}
Provides: php-posix, php-posix%{?_isa}
Provides: php-shmop, php-shmop%{?_isa}
Provides: php-sysvsem, php-sysvsem%{?_isa}
Provides: php-sysvshm, php-sysvshm%{?_isa}
Provides: php-sysvmsg, php-sysvmsg%{?_isa}
# safe replacement
Provides: php-process = %{version}-%{release}
Provides: php-process%{?_isa} = %{version}-%{release}
Conflicts: php-process < %{version}-%{release}
%description process
The php-process package contains dynamic shared objects which add
support to PHP using system interfaces for inter-process
communication.
%package odbc
Summary: A module for PHP applications that use ODBC databases
# All files licensed under PHP version 3.01, except
# pdo_odbc is licensed under PHP version 3.0
License: PHP
Requires: php-pdo%{?_isa} = %{version}-%{release}
Provides: php_database
Provides: php-pdo_odbc, php-pdo_odbc%{?_isa}
BuildRequires: unixODBC-devel
# safe replacement
Provides: php-odbc = %{version}-%{release}
Provides: php-odbc%{?_isa} = %{version}-%{release}
Conflicts: php-odbc < %{version}-%{release}
%description odbc
The php-odbc package contains a dynamic shared object that will add
database support through ODBC to PHP. ODBC is an open specification
which provides a consistent API for developers to use for accessing
data sources (which are often, but not always, databases). PHP is an
HTML-embeddable scripting language. If you need ODBC support for PHP
applications, you will need to install this package and the php
package.
%package soap
Summary: A module for PHP applications that use the SOAP protocol
# All files licensed under PHP version 3.01
License: PHP
Requires: php-common%{?_isa} = %{version}-%{release}
BuildRequires: pkgconfig(libxml-2.0)
# safe replacement
Provides: php-soap = %{version}-%{release}
Provides: php-soap%{?_isa} = %{version}-%{release}
Conflicts: php-soap < %{version}-%{release}
%description soap
The php-soap package contains a dynamic shared object that will add
support to PHP for using the SOAP web services protocol.
%if %{with_firebird}
%package pdo-firebird
Summary: PDO driver for Interbase/Firebird databases
# All files licensed under PHP version 3.01
License: PHP
# for fb_config command
BuildRequires: firebird-devel
Requires: php-pdo%{?_isa} = %{version}-%{release}
Provides: php_database
Provides: php-pdo_firebird, php-pdo_firebird%{?_isa}
# safe replacement
Provides: php-pdo-firebird = %{version}-%{release}
Provides: php-pdo-firebird%{?_isa} = %{version}-%{release}
Conflicts: php-pdo-firebird < %{version}-%{release}
%description pdo-firebird
The php-pdo-firebird package contains the PDO driver for
Interbase/Firebird databases.
%endif
%package snmp
Summary: A module for PHP applications that query SNMP-managed devices
# All files licensed under PHP version 3.01
License: PHP
Requires: php-common%{?_isa} = %{version}-%{release}, net-snmp
BuildRequires: net-snmp-devel
# safe replacement
Provides: php-snmp = %{version}-%{release}
Provides: php-snmp%{?_isa} = %{version}-%{release}
Conflicts: php-snmp < %{version}-%{release}
%description snmp
The php-snmp package contains a dynamic shared object that will add
support for querying SNMP devices to PHP. PHP is an HTML-embeddable
scripting language. If you need SNMP support for PHP applications, you
will need to install this package and the php package.
%package xml
Summary: A module for PHP applications which use XML
# All files licensed under PHP version 3.01
License: PHP
Requires: php-common%{?_isa} = %{version}-%{release}
Provides: php-dom, php-dom%{?_isa}
Provides: php-domxml, php-domxml%{?_isa}
Provides: php-simplexml, php-simplexml%{?_isa}
Provides: php-xmlreader, php-xmlreader%{?_isa}
Provides: php-xmlwriter, php-xmlwriter%{?_isa}
Provides: php-xsl, php-xsl%{?_isa}
BuildRequires: pkgconfig(libxslt) >= 1.1
BuildRequires: pkgconfig(libexslt)
BuildRequires: pkgconfig(libxml-2.0) >= 2.7.6
# safe replacement
Provides: php-xml = %{version}-%{release}
Provides: php-xml%{?_isa} = %{version}-%{release}
Conflicts: php-xml < %{version}-%{release}
%description xml
The php-xml package contains dynamic shared objects which add support
to PHP for manipulating XML documents using the DOM tree,
and performing XSL transformations on XML documents.
%package mbstring
Summary: A module for PHP applications which need multi-byte string handling
# All files licensed under PHP version 3.01, except
# libmbfl is licensed under LGPLv2
# ucgendat is licensed under OpenLDAP
License: PHP and LGPLv2 and OpenLDAP
BuildRequires: pkgconfig(oniguruma) >= 6.8
Provides: bundled(libmbfl) = 1.3.2
Requires: php-common%{?_isa} = %{version}-%{release}
# safe replacement
Provides: php-mbstring = %{version}-%{release}
Provides: php-mbstring%{?_isa} = %{version}-%{release}
Conflicts: php-mbstring < %{version}-%{release}
%description mbstring
The php-mbstring package contains a dynamic shared object that will add
support for multi-byte string handling to PHP.
%package gd
Summary: A module for PHP applications for using the gd graphics library
# All files licensed under PHP version 3.01
%if %{with_libgd}
License: PHP
%else
# bundled libgd is licensed under BSD
License: PHP and BSD
%endif
Requires: php-common%{?_isa} = %{version}-%{release}
%if %{with_libgd}
BuildRequires: pkgconfig(gdlib) >= 2.1.1
%else
# Required to build the bundled GD library
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
BuildRequires: freetype-devel
BuildRequires: libXpm-devel
BuildRequires: libwebp-devel
Provides: bundled(gd) = 2.0.35
%endif
# safe replacement
Provides: php-gd = %{version}-%{release}
Provides: php-gd%{?_isa} = %{version}-%{release}
Conflicts: php-gd < %{version}-%{release}
%description gd
The php-gd package contains a dynamic shared object that will add
support for using the gd graphics library to PHP.
%package bcmath
Summary: A module for PHP applications for using the bcmath library
# All files licensed under PHP version 3.01, except
# libbcmath is licensed under LGPLv2+
License: PHP and LGPLv2+
Requires: php-common%{?_isa} = %{version}-%{release}
# safe replacement
Provides: php-bcmath = %{version}-%{release}
Provides: php-bcmath%{?_isa} = %{version}-%{release}
Conflicts: php-bcmath < %{version}-%{release}
%description bcmath
The php-bcmath package contains a dynamic shared object that will add
support for using the bcmath library to PHP.
%package gmp
Summary: A module for PHP applications for using the GNU MP library
# All files licensed under PHP version 3.01
License: PHP
BuildRequires: gmp-devel
Requires: php-common%{?_isa} = %{version}-%{release}
# safe replacement
Provides: php-gmp = %{version}-%{release}
Provides: php-gmp%{?_isa} = %{version}-%{release}
Conflicts: php-gmp < %{version}-%{release}
%description gmp
These functions allow you to work with arbitrary-length integers
using the GNU MP library.
%package dba
Summary: A database abstraction layer module for PHP applications
# All files licensed under PHP version 3.01
License: PHP
%if %{with db4}
BuildRequires: libdb-devel
%endif
BuildRequires: tokyocabinet-devel
%if %{with lmdb}
BuildRequires: lmdb-devel
%endif
Requires: php-common%{?_isa} = %{version}-%{release}
# safe replacement
Provides: php-dba = %{version}-%{release}
Provides: php-dba%{?_isa} = %{version}-%{release}
Conflicts: php-dba < %{version}-%{release}
%description dba
The php-dba package contains a dynamic shared object that will add
support for using the DBA database abstraction layer to PHP.
%if %{with_tidy}
%package tidy
Summary: Standard PHP module provides tidy library support
# All files licensed under PHP version 3.01
License: PHP
Requires: php-common%{?_isa} = %{version}-%{release}
BuildRequires: libtidy-devel
# safe replacement
Provides: php-tidy = %{version}-%{release}
Provides: php-tidy%{?_isa} = %{version}-%{release}
Conflicts: php-tidy < %{version}-%{release}
%description tidy
The php-tidy package contains a dynamic shared object that will add
support for using the tidy library to PHP.
%endif
%if %{with_freetds}
%package pdo-dblib
Summary: PDO driver for Microsoft SQL Server and Sybase databases
# All files licensed under PHP version 3.01
License: PHP
Requires: php-pdo%{?_isa} = %{version}-%{release}
BuildRequires: freetds-devel
Provides: php-pdo_dblib, php-pdo_dblib%{?_isa}
# safe replacement
Provides: php-pdo-dblib = %{version}-%{release}
Provides: php-pdo-dblib%{?_isa} = %{version}-%{release}
Conflicts: php-pdo-dblib < %{version}-%{release}
%description pdo-dblib
The php-pdo-dblib package contains a dynamic shared object
that implements the PHP Data Objects (PDO) interface to enable access from
PHP to Microsoft SQL Server and Sybase databases through the FreeTDS library.
%endif
%package embedded
Summary: PHP library for embedding in applications
Requires: php-common%{?_isa} = %{version}-%{release}
# doing a real -devel package for just the .so symlink is a bit overkill
Provides: php-embedded-devel = %{version}-%{release}
Provides: php-embedded-devel%{?_isa} = %{version}-%{release}
# safe replacement
Provides: php-embedded = %{version}-%{release}
Provides: php-embedded%{?_isa} = %{version}-%{release}
Conflicts: php-embedded < %{version}-%{release}
%description embedded
The php-embedded package contains a library which can be embedded
into applications to provide PHP scripting language support.
%if %{with_pspell}
%package pspell
Summary: A module for PHP applications for using pspell interfaces
# All files licensed under PHP version 3.01
License: PHP
Requires: php-common%{?_isa} = %{version}-%{release}
BuildRequires: aspell-devel >= 0.50.0
# safe replacement
Provides: php-pspell = %{version}-%{release}
Provides: php-pspell%{?_isa} = %{version}-%{release}
Conflicts: php-pspell < %{version}-%{release}
%description pspell
The php-pspell package contains a dynamic shared object that will add
support for using the pspell library to PHP.
%endif
%package intl
Summary: Internationalization extension for PHP applications
# All files licensed under PHP version 3.01
License: PHP
Requires: php-common%{?_isa} = %{version}-%{release}
BuildRequires: pkgconfig(icu-i18n) >= 50.1
BuildRequires: pkgconfig(icu-io) >= 50.1
BuildRequires: pkgconfig(icu-uc) >= 50.1
# safe replacement
Provides: php-intl = %{version}-%{release}
Provides: php-intl%{?_isa} = %{version}-%{release}
Conflicts: php-intl < %{version}-%{release}
%description intl
The php-intl package contains a dynamic shared object that will add
support for using the ICU library to PHP.
%package enchant
Summary: Enchant spelling extension for PHP applications
# All files licensed under PHP version 3.0
License: PHP
Requires: php-common%{?_isa} = %{version}-%{release}
BuildRequires: pkgconfig(enchant)
# safe replacement
Provides: php-enchant = %{version}-%{release}
Provides: php-enchant%{?_isa} = %{version}-%{release}
Conflicts: php-enchant < %{version}-%{release}
%description enchant
The php-enchant package contains a dynamic shared object that will add
support for using the enchant library to PHP.
%if %{with_sodium}
%package sodium
Summary: Wrapper for the Sodium cryptographic library
# All files licensed under PHP version 3.0.1
License: PHP
BuildRequires: pkgconfig(libsodium) >= 1.0.9
Requires: php-common%{?_isa} = %{version}-%{release}
Obsoletes: php-pecl-libsodium2 < 3
Provides: php-pecl(libsodium) = %{version}
Provides: php-pecl(libsodium)%{?_isa} = %{version}
# safe replacement
Provides: php-sodium = %{version}-%{release}
Provides: php-sodium%{?_isa} = %{version}-%{release}
Conflicts: php-sodium < %{version}-%{release}
%description sodium
The php-sodium package provides a simple,
low-level PHP extension for the libsodium cryptographic library.
%endif
%package ffi
Summary: Foreign Function Interface
# All files licensed under PHP version 3.0.1
License: PHP
Group: System Environment/Libraries
BuildRequires: pkgconfig(libffi)
Requires: php-common%{?_isa} = %{version}-%{release}
# safe replacement
Provides: php-ffi = %{version}-%{release}
Provides: php-ffi%{?_isa} = %{version}-%{release}
Conflicts: php-ffi < %{version}-%{release}
%description ffi
FFI is one of the features that made Python and LuaJIT very useful for fast
prototyping. It allows calling C functions and using C data types from pure
scripting language and therefore develop “system code” more productively.
For PHP, FFI opens a way to write PHP extensions and bindings to C libraries
in pure PHP.
%prep
%{?gpgverify:%{gpgverify} --keyring='%{SOURCE20}' --signature='%{SOURCE21}' --data='%{SOURCE0}'}
%setup -q -n php-%{upver}%{?rcver}
%patch1 -p1 -b .mpmcheck
%patch5 -p1 -b .includedir
%patch6 -p1 -b .embed
%patch8 -p1 -b .libdb
%patch9 -p1 -b .deprecated
%patch42 -p1 -b .systzdata
%patch43 -p1 -b .headers
%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7
%patch45 -p1 -b .ldap_r
%endif
%patch47 -p1 -b .phpinfo
# upstream patches
# security patches
# Fixes for tests
%patch300 -p1 -b .datetests
# Prevent %%doc confusion over LICENSE files
cp Zend/LICENSE Zend/ZEND_LICENSE
cp TSRM/LICENSE TSRM_LICENSE
cp sapi/fpm/LICENSE fpm_LICENSE
cp ext/mbstring/libmbfl/LICENSE libmbfl_LICENSE
cp ext/fileinfo/libmagic/LICENSE libmagic_LICENSE
cp ext/bcmath/libbcmath/LICENSE libbcmath_LICENSE
cp ext/date/lib/LICENSE.rst timelib_LICENSE
# Multiple builds for multiple SAPIs
mkdir build-cgi build-embedded \
%if %{with_modphp}
build-apache \
%endif
%if %{with_zts}
build-zts build-ztscli \
%endif
build-fpm
# ----- Manage known as failed test -------
# affected by systzdata patch
rm ext/date/tests/timezone_location_get.phpt
rm ext/date/tests/timezone_version_get.phpt
rm ext/date/tests/timezone_version_get_basic1.phpt
# fails sometime
rm ext/sockets/tests/mcast_ipv?_recv.phpt
# cause stack exhausion
rm Zend/tests/bug54268.phpt
rm Zend/tests/bug68412.phpt
# tar issue
rm ext/zlib/tests/004-mb.phpt
# Safety check for API version change.
pver=$(sed -n '/#define PHP_VERSION /{s/.* "//;s/".*$//;p}' main/php_version.h)
if test "x${pver}" != "x%{upver}%{?rcver}"; then
: Error: Upstream PHP version is now ${pver}, expecting %{upver}%{?rcver}.
: Update the version/rcver macros and rebuild.
exit 1
fi
vapi=`sed -n '/#define PHP_API_VERSION/{s/.* //;p}' main/php.h`
if test "x${vapi}" != "x%{apiver}"; then
: Error: Upstream API version is now ${vapi}, expecting %{apiver}.
: Update the apiver macro and rebuild.
exit 1
fi
vzend=`sed -n '/#define ZEND_MODULE_API_NO/{s/^[^0-9]*//;p;}' Zend/zend_modules.h`
if test "x${vzend}" != "x%{zendver}"; then
: Error: Upstream Zend ABI version is now ${vzend}, expecting %{zendver}.
: Update the zendver macro and rebuild.
exit 1
fi
# Safety check for PDO ABI version change
vpdo=`sed -n '/#define PDO_DRIVER_API/{s/.*[ ]//;p}' ext/pdo/php_pdo_driver.h`
if test "x${vpdo}" != "x%{pdover}"; then
: Error: Upstream PDO ABI version is now ${vpdo}, expecting %{pdover}.
: Update the pdover macro and rebuild.
exit 1
fi
# https://bugs.php.net/63362 - Not needed but installed headers.
# Drop some Windows specific headers to avoid installation,
# before build to ensure they are really not needed.
rm -f TSRM/tsrm_win32.h \
TSRM/tsrm_config.w32.h \
Zend/zend_config.w32.h \
ext/mysqlnd/config-win.h \
ext/standard/winver.h \
main/win32_internal_function_disabled.h \
main/win95nt.h
# Fix some bogus permissions
find . -name \*.[ch] -exec chmod 644 {} \;
chmod 644 README.*
# Some extensions have their own configuration file
cp %{SOURCE50} %{SOURCE51} %{SOURCE53} .
%build
# This package fails to build with LTO due to undefined symbols. LTO
# was disabled in OpenSuSE as well, but with no real explanation why
# beyond the undefined symbols. It really shold be investigated further.
# Disable LTO
%define _lto_cflags %{nil}
# Set build date from https://reproducible-builds.org/specs/source-date-epoch/
export SOURCE_DATE_EPOCH=$(date +%s -r NEWS)
export PHP_UNAME=$(uname)
export PHP_BUILD_SYSTEM=$(cat /etc/redhat-release | sed -e 's/ Beta//')
%if 0%{?vendor:1}
export PHP_BUILD_PROVIDER="%{vendor}"
%endif
export PHP_BUILD_COMPILER="$(gcc --version | head -n1)"
export PHP_BUILD_ARCH="%{_arch}"
# Force use of system libtool:
libtoolize --force --copy
cat `aclocal --print-ac-dir`/{libtool,ltoptions,ltsugar,ltversion,lt~obsolete}.m4 >build/libtool.m4
# Regenerate configure scripts (patches change config.m4's)
touch configure.ac
./buildconf --force
CFLAGS=$(echo $RPM_OPT_FLAGS -fno-strict-aliasing -Wno-pointer-sign | sed 's/-mstackrealign//')
export CFLAGS
# Install extension modules in %%{_libdir}/php/modules.
EXTENSION_DIR=%{_libdir}/php/modules; export EXTENSION_DIR
# Set PEAR_INSTALLDIR to ensure that the hard-coded include_path
# includes the PEAR directory even though pear is packaged
# separately.
PEAR_INSTALLDIR=%{_datadir}/pear; export PEAR_INSTALLDIR