mirror of
https://github.com/owntracks/recorder.git
synced 2024-11-15 18:08:28 -07:00
create package in $cwd; record package.name; cleanup $tempdir
This commit is contained in:
parent
f313bacf63
commit
f0b7e9a58a
@ -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}"
|
||||
|
@ -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}"
|
||||
|
Loading…
Reference in New Issue
Block a user