[php-maint] Bug#709314: Zend opcache module is included in libapache2-mod-php5 only

Yaacov Akiba Slama yaslama at gmail.com
Wed May 22 14:11:20 UTC 2013


Package: php5
Version: 5.5.0~rc1+dfsg-1
Severity: normal

Here is a patch to create a separate package for opcache so it can be used by other sapi even if libapache2-mod-php5 is not installed.

Thanks a lot.

diff --git a/debian/control b/debian/control
index ecb13a7..11ced12 100644
--- a/debian/control
+++ b/debian/control
@@ -241,7 +241,7 @@ Description: Files for PHP5 module development
  for web development and can be embedded into HTML.
 
 Package: php5-dbg
-Depends: ${misc:Depends}, php5-common (= ${binary:Version}), libapache2-mod-php5 (= ${binary:Version}) | libapache2-mod-php5filter (= ${binary:Version}) | php5-cgi (= ${binary:Version}) | php5-cli (= ${binary:Version}) | php5-fpm (= ${binary:Version}) | php5-curl (= ${binary:Version}) | php5-enchant (= ${binary:Version}) | php5-gd (= ${binary:Version}) | php5-gmp (= ${binary:Version}) | php5-imap (= ${binary:Version}) | php5-interbase (= ${binary:Version}) | php5-intl (= ${binary:Version}) | php5-ldap (= ${binary:Version}) | php5-mcrypt (= ${binary:Version}) | php5-mysql (= ${binary:Version}) | php5-odbc (= ${binary:Version}) | php5-pgsql (= ${binary:Version}) | php5-pspell (= ${binary:Version}) | php5-readline (= ${binary:Version}) | php5-recode (= ${binary:Version}) | php5-snmp (= ${binary:Version}) | php5-sqlite (= ${binary:Version}) | php5-sybase (= ${binary:Version}) | php5-tidy (= ${binary:Version}) | php5-xmlrpc (= ${binary:Version}) | php5-xsl (= ${binary:Version})
+Depends: ${misc:Depends}, php5-common (= ${binary:Version}), libapache2-mod-php5 (= ${binary:Version}) | libapache2-mod-php5filter (= ${binary:Version}) | php5-cgi (= ${binary:Version}) | php5-cli (= ${binary:Version}) | php5-fpm (= ${binary:Version}) | php5-curl (= ${binary:Version}) | php5-enchant (= ${binary:Version}) | php5-gd (= ${binary:Version}) | php5-gmp (= ${binary:Version}) | php5-imap (= ${binary:Version}) | php5-interbase (= ${binary:Version}) | php5-intl (= ${binary:Version}) | php5-ldap (= ${binary:Version}) | php5-mcrypt (= ${binary:Version}) | php5-mysql (= ${binary:Version}) | php5-odbc (= ${binary:Version}) | php5-opcache (= ${binary:Version}) | php5-pgsql (= ${binary:Version}) | php5-pspell (= ${binary:Version}) | php5-readline (= ${binary:Version}) | php5-recode (= ${binary:Version}) | php5-snmp (= ${binary:Version}) | php5-sqlite (= ${binary:Version}) | php5-sybase (= ${binary:Version}) | php5-tidy (= ${binary:Version}) | php5-xmlrpc (= ${binary:Version}) | php5-xsl (= ${binary:Version})
 Recommends: gdb
 Section: debug
 Priority: extra
@@ -440,6 +440,22 @@ Description: ODBC module for php5
  open source general-purpose scripting language that is especially suited
  for web development and can be embedded into HTML.
 
+Package: php5-opcache
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, ${php:Depends}, php5-common (= ${binary:Version}), ucf
+Pre-Depends: dpkg (>= 1.15.7.2~)
+Description: PHP opcode caching and optimization extension
+ This package 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.
+ .
+ PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used
+ open source general-purpose scripting language that is especially suited
+ for web development and can be embedded into HTML.
+
 Package: php5-pgsql
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}, ${php:Depends}, php5-common (= ${binary:Version}), ucf
diff --git a/debian/modulelist b/debian/modulelist
index 72f706e..6f17462 100644
--- a/debian/modulelist
+++ b/debian/modulelist
@@ -21,3 +21,4 @@ sybase Sybase mssql
 tidy tidy
 xmlrpc XML-RPC
 xsl XSL
+opcache OPcache
diff --git a/debian/php5-module.ini b/debian/php5-module.ini
index 7427e63..085c296 100644
--- a/debian/php5-module.ini
+++ b/debian/php5-module.ini
@@ -1,3 +1,3 @@
 ; configuration for php @extname@ module
 ; priority=@priority@
-extension=@dsoname at .so
+ at extension@=@dsoname at .so
diff --git a/debian/rules b/debian/rules
index 8479e43..d93e149 100755
--- a/debian/rules
+++ b/debian/rules
@@ -667,10 +667,13 @@ binary-arch: build install
 	cat debian/modulelist debian/extramodulelist | while read package extname dsoname priority; do \
 		if [ -z "$${dsoname}" ]; then dsoname=$$package; fi; \
 		if [ -z "$${priority}" ]; then priority=20; fi; \
+		extension_type=extension; \
+		if [ "$$package" = "opcache" ]; then extension_type=zend_extension ; fi; \
 		mkdir -p debian/php5-$$package/usr/share/php5/$$package; \
 		sed -e"s|@extname@|$${extname}|g; \
 		       s/@dsoname@/$${dsoname}/g; \
-		       s/@priority@/$${priority}/g" \
+		       s/@priority@/$${priority}/g; \
+		       s/@extension@/$${extension_type}/g" \
 		  < debian/php5-module.ini \
 		  > debian/php5-$$package/usr/share/php5/$$package/$${dsoname}.ini; \
 		echo -n "$$dsoname " >> debian/php5-$$package.modules; \


-- System Information:
Debian Release: jessie/sid
  APT prefers oldstable-updates
  APT policy: (500, 'oldstable-updates'), (500, 'oldstable'), (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash



More information about the pkg-php-maint mailing list