summaryrefslogtreecommitdiff
path: root/community/xdebug/xdebug.install
blob: fc2fcbc840025920d3b9e5481a094bd2d637df88 (plain)
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
pre_upgrade() {
  local _configfile=/etc/php/conf.d/xdebug.ini

  if [ $2 \< "2.0.4-2" -a -f $_configfile ] ; then
    mv -f $_configfile $_configfile.pacold
  fi
  /bin/true
}

post_install() {
  local _configfile=/etc/php/conf.d/xdebug.ini
  echo " ==> You may wish to uncomment/change the settings found in "
  echo "     $_configfile"
  echo ""
  /bin/true
}

post_upgrade() {
  local _configfile=/etc/php/conf.d/xdebug.ini
  local PHPVER=$(php -r 'echo phpversion();')
  post_install $1

  if [ $2 \< "2.0.4-2" ] ; then
    if [ -f $_configfile.pacold ] ; then
      mv $_configfile $_configfile.pacnew
      mv $_configfile.pacold $_configfile
      echo " ==> There is a new xdebug.ini at $_configfile.pacnew."
      echo "     You may wish to copy it or modify your existing file: "
      echo "     $_configfile."
      echo ""
    else
      echo " ==> A configuration file for xdebug has been placed at:"
      echo "     $_configfile."
      echo "     Please remove the following lines from /etc/php/php.ini and move them"
      echo "     to $_configfile:"
      echo "      zend_extension=/usr/lib/php/xdebug.so"
      echo "      xdebug.remote_enable=on"
      echo "      xdebug.remote_host=<ip address>"
      echo "      xdebug.remote_port=<port>"
      echo "      xdebug.remote_handler=dbgp"
      echo ""
    fi
  fi

  if [ "$PHPVER" \< "5.3" ] ; then
    echo " ==> You are currenty running a version of php < 5.3."
    echo "     When/if you upgrade php to a version >= 5.3, you will need to reinstall $pkgname."
    echo ""
  fi
}