#!/bin/sh

VERSION=$(version --read stub.php --bump --show --write::2 stub.php --write php-shared-autoloader/DEBIAN/control)

phar stub-set   -f shared.phar -s stub.php 
phar add -c gz  -f shared.phar autoload.update.php
#phar add -c gz -f shared.phar autoload.map.php
./single/shared.phar
version $VERSION write shared.phar

fakeroot dpkg-deb -b php-shared-autoloader/ php-shared-autoloader_$VERSION.deb
dpkg-sig -s builder -k include-once -v php-shared-autoloader_$VERSION.deb
