Source: libhdate
Followup-For: Bug #684382

Please enable the PHP bindings. I am including a patchfile with everything 
necessary.

Just apply the patch and rebuild, you don't have to do anything else.

-- System Information:
Debian Release: 8.5
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'stable-updates')
Architecture: i386 (x86_64)
Foreign Architectures: amd64

Kernel: Linux 3.16.36 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
diff -Naur old/debian/control new/debian/control
--- old/debian/control	2014-09-10 11:04:04.000000000 -0400
+++ new/debian/control	2016-09-15 19:24:30.842054753 -0400
@@ -51,6 +51,19 @@
  .
  This package contains perl bindings to libhdate
 
+Package: libhdate-php
+Section: php
+Architecture: any
+Depends: libhdate1 (= ${binary:Version}), ${php:Depends}, ${shlibs:Depends}, ${misc:Depends}
+Description: Provides a library that help use hebrew dates (php bindings)
+ LibHdate is a small C,C++ library for Hebrew dates,
+ holidays, and reading sequence (parasha). It is using 
+ the source code from Amos Shapir's "hdate" package fixed 
+ and patched by Nadav Har'El. The Torah reading sequence
+ is from tables by Zvi Har'El.
+ .
+ This package contains PHP bindings to libhdate
+
 Package: libhdate1
 Section: libs
 Architecture: any
diff -Naur old/debian/libhdate-php.install new/debian/libhdate-php.install
--- old/debian/libhdate-php.install	2016-09-15 18:52:02.306608632 -0400
+++ new/debian/libhdate-php.install	2016-09-15 19:01:06.835711780 -0400
@@ -1,2 +1,3 @@
-bindings/php/hdate.ini etc/php5/conf.d
+bindings/php/hdate.ini etc/php5/mods-available
 usr/lib/php5/*
+usr/share/php/hdate.php
diff -Naur old/debian/libhdate-php.postinst new/debian/libhdate-php.postinst
--- old/debian/libhdate-php.postinst	1969-12-31 19:00:00.000000000 -0500
+++ new/debian/libhdate-php.postinst	2016-09-15 19:10:03.269678201 -0400
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e
+
+dpkg-maintscript-helper mv_conffile /etc/php5/conf.d/hdate.ini \
+    /etc/php5/mods-available/hdate.ini 1.6-3+b2 -- "$@"
+rm -f /etc/php5/conf.d/hdate.ini
+
+[ "$1" = "configure" ] && php5enmod hdate
+
+#DEBHELPER#
+
+exit 0
diff -Naur old/debian/libhdate-php.preinst new/debian/libhdate-php.preinst
--- old/debian/libhdate-php.preinst	1969-12-31 19:00:00.000000000 -0500
+++ new/debian/libhdate-php.preinst	2016-09-15 19:10:23.446030225 -0400
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+set -e
+
+dpkg-maintscript-helper mv_conffile /etc/php5/conf.d/hdate.ini \
+    /etc/php5/mods-available/hdate.ini 1.6-3+b2 -- "$@"
+rm -f /etc/php5/conf.d/hdate.ini
+
+#DEBHELPER#
+
+exit 0
diff -Naur old/debian/libhdate-php.prerm new/debian/libhdate-php.prerm
--- old/debian/libhdate-php.prerm	1969-12-31 19:00:00.000000000 -0500
+++ new/debian/libhdate-php.prerm	2016-09-15 19:10:55.480600612 -0400
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e
+
+dpkg-maintscript-helper mv_conffile /etc/php5/conf.d/hdate.ini \
+    /etc/php5/mods-available/hdate.ini 1.6-3+b2 -- "$@"
+rm -f /etc/php5/conf.d/hdate.ini
+
+[ "$1" = "remove" ] && php5dismod hdate
+
+#DEBHELPER#
+
+exit 0
diff -Naur old/debian/rules new/debian/rules
--- old/debian/rules	2016-09-15 19:43:46.027354228 -0400
+++ new/debian/rules	2016-09-15 19:44:09.540765571 -0400
@@ -3,10 +3,13 @@
 ARCHLIB := $(shell perl -MConfig -e 'print $$Config{vendorarch}')
 
 %:
-	dh $* --with python2,autoreconf
+	dh $* --with python2,autoreconf,php5
 
 override_dh_auto_configure:
 	dh_auto_configure -- --with-perl-sitelib-dir=$(ARCHLIB)
 
 override_dh_python2:
 	dh_python2 -s --no-guessing-versions
+
+binary-arch:
+	echo "php:Depends=phpapi-`php-config5 --phpapi`" >> debian/libhdate-php.substvars

Reply via email to