]> granicus.if.org Git - php/commitdiff
Added phpextdist script for making external extension packages.
authorAndrei Zmievski <andrei@php.net>
Tue, 22 Feb 2000 14:26:12 +0000 (14:26 +0000)
committerAndrei Zmievski <andrei@php.net>
Tue, 22 Feb 2000 14:26:12 +0000 (14:26 +0000)
pear/Makefile.in
pear/phpextdist [new file with mode: 0755]

index bb68ca936e057df0c39cfeac42f28ef188aec2db..6c8f7cc5d9cbb90247dccf0aa60ba51326a265ec 100644 (file)
@@ -50,6 +50,7 @@ install-build:
                < $(srcdir)/php-config.in > $(bindir)/php-config.tmp && \
        chmod +x $(bindir)/php-config.tmp && \
        mv $(bindir)/php-config.tmp $(bindir)/php-config
+       @cp $(srcdir)/phpextdist $(bindir)/phpextdist
 
 SRC_HEADERS = \
        php.h \
diff --git a/pear/phpextdist b/pear/phpextdist
new file mode 100755 (executable)
index 0000000..97df700
--- /dev/null
@@ -0,0 +1,27 @@
+#! /bin/sh
+if test $# -lt 2; then
+       echo "usage: phpextdist <extension> <version>";
+       exit 1
+fi
+
+phpize=`php-config --prefix`/bin/phpize
+distname="$1-$2"
+
+if test ! -f Makefile.in || test ! -f config.m4; then
+       echo "Did not find required files in current directory"
+       exit 1
+fi
+
+rm -rf modules *.lo *.o *.la config.status config.cache \
+config.log libtool php_config.h config_vars.mk Makefile
+
+myname=`basename \`pwd\``
+cd ..
+cp -rp $myname $distname
+cd $distname
+$phpize
+cd ..
+tar cf $distname.tar $distname
+rm -rf $distname $distname.tar.*
+gzip --best $distname.tar
+mv $distname.tar.gz $myname