create package in $cwd; record package.name; cleanup $tempdir

This commit is contained in:
Jan-Piet Mens 2016-01-29 12:27:48 +01:00
parent f313bacf63
commit f0b7e9a58a
2 changed files with 8 additions and 6 deletions

View File

@ -2,10 +2,6 @@
set -e
# export PACKAGEDIR=/media/sf_proxmox/centos/repo
PACKAGEDIR=${PACKAGEDIR:=/tmp}
tempdir=$(mktemp -d /tmp/ot-XXX)
make install DESTDIR=$tempdir
@ -13,7 +9,7 @@ make install DESTDIR=$tempdir
name="ot-recorder"
version=$(awk '{print $NF;}' version.h | sed -e 's/"//g' )
arch=$(uname -m)
rpmfile="${PACKAGEDIR}/${name}_${version}_${arch}.rpm"
rpmfile="${name}_${version}_${arch}.rpm"
rm -f "${rpmfile}"
@ -34,3 +30,6 @@ fpm -s dir \
-d "lua" \
--post-install etc/centos/postinst \
usr var
echo "${rpmfile}" > package.name
rm -rf "${tempdir}"

View File

@ -14,7 +14,7 @@ case $arch in
armv7l) arch=armhf;;
esac
debfile="/tmp/${name}_${version}_${arch}.deb"
debfile="${name}_${version}_${arch}.deb"
rm -f "${debfile}"
@ -35,3 +35,6 @@ fpm -s dir \
-d "liblua5.2-0" \
--post-install etc/debian/postinst \
usr var
echo "${debfile}" > package.name
rm -rf "${tempdir}"