summaryrefslogtreecommitdiffstats
path: root/php-pear/macros.pear
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2014-08-24 17:39:38 +0200
committerRemi Collet <fedora@famillecollet.com>2014-08-24 17:39:38 +0200
commitf564b500ca718e735ed72530a52c4fe57d2c3ea6 (patch)
treef0acc2aab644f1eb105bb140d52887f0fdbc24bd /php-pear/macros.pear
parent9bbb50b3a32511baadb6bfdcb464a4eca526a413 (diff)
php-pear: for SCL
Diffstat (limited to 'php-pear/macros.pear')
-rw-r--r--php-pear/macros.pear36
1 files changed, 36 insertions, 0 deletions
diff --git a/php-pear/macros.pear b/php-pear/macros.pear
new file mode 100644
index 0000000..71aacc6
--- /dev/null
+++ b/php-pear/macros.pear
@@ -0,0 +1,36 @@
+#
+# Define full path to pear/pecl commands to be used in scriptlets:
+#
+%@SCL@__pear @BINDIR@/pear
+%@SCL@__pecl @BINDIR@/pecl
+
+#
+# Define PEAR directories used in php-pear-* spec files
+#
+%pear_phpdir %(%{__pear} config-get php_dir 2> /dev/null || echo undefined)
+%pear_docdir %(%{__pear} config-get doc_dir 2> /dev/null || echo undefined)
+%pear_testdir %(%{__pear} config-get test_dir 2> /dev/null || echo undefined)
+%pear_datadir %(%{__pear} config-get data_dir 2> /dev/null || echo undefined)
+%pear_cfgdir %(%{__pear} config-get cfg_dir 2> /dev/null || echo undefined)
+%pear_wwwdir %(%{__pear} config-get www_dir 2> /dev/null || echo undefined)
+%@SCL@pear_metadir %(%{__pear} config-get metadata_dir 2> /dev/null || echo undefined)
+
+#
+# Define PECL directories used in php-pecl-* spec files:
+#
+%pecl_phpdir %(%{__pecl} config-get php_dir 2> /dev/null || echo undefined)
+%pecl_docdir %(%{__pecl} config-get doc_dir 2> /dev/null || echo undefined)
+%pecl_testdir %(%{__pecl} config-get test_dir 2> /dev/null || echo undefined)
+%pecl_datadir %(%{__pecl} config-get data_dir 2> /dev/null || echo undefined)
+
+#
+# Define XML directories to store package registration information:
+#
+%@SCL@pear_xmldir @VARDIR@/lib/pear/pkgxml
+%@SCL@pecl_xmldir @VARDIR@/lib/pear/pkgxml
+
+#
+# Define macros to be used in scriplets for php-pecl-* spec files:
+#
+%pecl_install %{__pecl} install --nodeps --soft --force --register-only --nobuild
+%pecl_uninstall %{__pecl} uninstall --nodeps --ignore-errors --register-only