Only use dpkg-divert on Ubuntu 15.10 (Closes: #823515)
This commit is contained in:
parent
4234c2baba
commit
93e5c44cc2
|
@ -1,14 +1,3 @@
|
||||||
#!/bin/sh
|
|
||||||
# postrm script for php-common
|
|
||||||
#
|
|
||||||
# see: dh_installdeb(1)
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
if [ "$1" = "purge" ]; then
|
|
||||||
rm -rf /var/lib/php
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$1" = remove ] ; then
|
if [ "$1" = remove ] ; then
|
||||||
dpkg-divert --remove --package php-common --rename \
|
dpkg-divert --remove --package php-common --rename \
|
||||||
--divert /usr/bin/phar.php5 \
|
--divert /usr/bin/phar.php5 \
|
||||||
|
@ -17,7 +6,3 @@ if [ "$1" = remove ] ; then
|
||||||
--divert /usr/share/man/man1/phar.php5.1.gz \
|
--divert /usr/share/man/man1/phar.php5.1.gz \
|
||||||
/usr/share/man/man1/phar.1.gz
|
/usr/share/man/man1/phar.1.gz
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#DEBHELPER#
|
|
||||||
|
|
||||||
exit 0
|
|
16
debian/php-common.postrm.in
vendored
Normal file
16
debian/php-common.postrm.in
vendored
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# postrm script for php-common
|
||||||
|
#
|
||||||
|
# see: dh_installdeb(1)
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ "$1" = "purge" ]; then
|
||||||
|
rm -rf /var/lib/php
|
||||||
|
fi
|
||||||
|
|
||||||
|
#DIVERT#
|
||||||
|
|
||||||
|
#DEBHELPER#
|
||||||
|
|
||||||
|
exit 0
|
|
@ -1,7 +1,3 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
if [ "$1" = install ] || [ "$1" = upgrade ] ; then
|
if [ "$1" = install ] || [ "$1" = upgrade ] ; then
|
||||||
dpkg-divert --add --package php-common --rename \
|
dpkg-divert --add --package php-common --rename \
|
||||||
--divert /usr/bin/phar.php5 \
|
--divert /usr/bin/phar.php5 \
|
||||||
|
@ -10,7 +6,3 @@ if [ "$1" = install ] || [ "$1" = upgrade ] ; then
|
||||||
--divert /usr/share/man/man1/phar.php5.1.gz \
|
--divert /usr/share/man/man1/phar.php5.1.gz \
|
||||||
/usr/share/man/man1/phar.1.gz
|
/usr/share/man/man1/phar.1.gz
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#DEBHELPER#
|
|
||||||
|
|
||||||
exit 0
|
|
9
debian/php-common.preinst.in
vendored
Normal file
9
debian/php-common.preinst.in
vendored
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
#DIVERT#
|
||||||
|
|
||||||
|
#DEBHELPER#
|
||||||
|
|
||||||
|
exit 0
|
15
debian/rules
vendored
15
debian/rules
vendored
|
@ -24,6 +24,13 @@ SED=sed
|
||||||
|
|
||||||
export DH_OPTIONS
|
export DH_OPTIONS
|
||||||
|
|
||||||
|
DIVERT=sed -e '/\#DIVERT\#/ d'
|
||||||
|
ifeq (Ubuntu,$(DEB_VENDOR))
|
||||||
|
ifeq ($(DEB_DISTRIBUTION),wily)
|
||||||
|
DIVERT=sed -e "/\#DIVERT\#/ r debian/php-common.$${script}.divert"
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
%:
|
%:
|
||||||
dh $@
|
dh $@
|
||||||
|
|
||||||
|
@ -66,6 +73,14 @@ override_dh_fixperms:
|
||||||
dh_fixperms -i -pphp-common -X/var/lib/php/sessions
|
dh_fixperms -i -pphp-common -X/var/lib/php/sessions
|
||||||
dh_fixperms -i --remaining-packages
|
dh_fixperms -i --remaining-packages
|
||||||
|
|
||||||
|
override_dh_installdeb:
|
||||||
|
for script in preinst postrm; do \
|
||||||
|
$(DIVERT) \
|
||||||
|
< debian/php-common.$${script}.in \
|
||||||
|
> debian/php-common.$${script}; \
|
||||||
|
done
|
||||||
|
dh_installdeb -i
|
||||||
|
|
||||||
override_dh_gencontrol:
|
override_dh_gencontrol:
|
||||||
dh_gencontrol -pphp-common -- -v$(PHP_COMMON_DEB_VERSION)
|
dh_gencontrol -pphp-common -- -v$(PHP_COMMON_DEB_VERSION)
|
||||||
dh_gencontrol -pphp-all-dev -- -v$(PHP_COMMON_DEB_VERSION)
|
dh_gencontrol -pphp-all-dev -- -v$(PHP_COMMON_DEB_VERSION)
|
||||||
|
|
Loading…
Reference in a new issue