Luna/ports/make-package.sh

23 lines
379 B
Bash
Raw Normal View History

#!/usr/bin/env bash
set -e
source $(dirname $0)/../tools/env.sh
source $LUNA_ROOT/ports/$1/package.sh
mkdir $PWD/pkgroot
DESTDIR=$PWD/pkgroot $LUNA_ROOT/ports/add-port.sh $pkgname
cd pkgroot
tar cJf ../$pkgname-$pkgver.pkg.tar.xz *
cd ..
DESTDIR=$PWD/pkgroot $LUNA_ROOT/ports/remove-port.sh $pkgname
rm -rf $PWD/pkgroot
echo "Built package $pkgname-$pkgver.pkg.tar.xz"