SHARE
TWEET

Make Phar from PHP-SRC

a guest Mar 13th, 2013 86 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. srcdir=/tmp/php-src/ext/phar
  2. builddir=/tmp/phar/
  3. pharcmd: $(builddir)/phar.php $(builddir)/phar.phar
  4. bindir=/usr/local/bin
  5.  
  6. PHP_PHARCMD_SETTINGS = -d 'open_basedir=' -d 'output_buffering=0' -d 'memory_limit=-1' -d phar.readonly=0 -d 'safe_mode=0'
  7. PHP_PHARCMD_EXECUTABLE = /usr/bin/php
  8. PHP_PHARCMD_BANG = /usr/bin/env php
  9.  
  10. $(builddir)/phar/phar.inc: $(srcdir)/phar/phar.inc
  11.         -@test -d $(builddir)/phar || mkdir $(builddir)/phar
  12.         -@test -f $(builddir)/phar/phar.inc || cp $(srcdir)/phar/phar.inc $(builddir)/phar/phar.inc
  13.  
  14. $(builddir)/phar.php: $(srcdir)/build_precommand.php $(srcdir)/phar/*.inc $(srcdir)/phar/*.php
  15.         -@echo "Generating phar.php"
  16.         @$(PHP_PHARCMD_EXECUTABLE) $(PHP_PHARCMD_SETTINGS) $(srcdir)/build_precommand.php > $(builddir)/phar.php
  17.  
  18. $(builddir)/phar.phar: $(builddir)/phar.php $(builddir)/phar/phar.inc $(srcdir)/phar/*.inc $(srcdir)/phar/*.php
  19.         -@echo "Generating phar.phar"
  20.         -@rm -f $(builddir)/phar.phar
  21.         -@rm -f $(srcdir)/phar.phar
  22.         @$(PHP_PHARCMD_EXECUTABLE) $(PHP_PHARCMD_SETTINGS) $(builddir)/phar.php pack -f $(builddir)/phar.phar -a pharcommand -c auto -x \\.svn -p 0 -s $(srcdir)/phar/phar.php -h sha1 -b "$(PHP_PHARCMD_BANG)"  $(srcdir)/phar/
  23.         -@chmod +x $(builddir)/phar.phar
  24.  
  25. install-pharcmd: pharcmd
  26.         cp $(builddir)/phar.phar $(bindir)/phar
RAW Paste Data
Pastebin PRO Summer Special!
Get 40% OFF on Pastebin PRO accounts!
Top