[SCM] primesense-nite-nonfree/master: rewrite install scripts based on the included install.sh
eighthave at users.alioth.debian.org
eighthave at users.alioth.debian.org
Tue May 21 20:01:22 UTC 2013
The following commit has been merged in the master branch:
commit 0fbc270f999809b70bf0192795ee6f15854ef31f
Author: Hans-Christoph Steiner <hans at eds.org>
Date: Tue May 21 12:58:51 2013 -0400
rewrite install scripts based on the included install.sh
diff --git a/nite_debian_dir/postinst b/nite_debian_dir/postinst
index 8820c8f..4833959 100644
--- a/nite_debian_dir/postinst
+++ b/nite_debian_dir/postinst
@@ -2,6 +2,8 @@
if [ "$1" = "configure" ]; then
#ADDREGISTRATION#
+ # taken from the install.sh script included in the upstream binary tarball
+ niLicense PrimeSense 0KOIk2JeIBYClPWVnMoRKn5cdY4=
fi
#DEBHELPER#
diff --git a/nite_debian_dir/rules b/nite_debian_dir/rules
index bf8028f..da03cce 100755
--- a/nite_debian_dir/rules
+++ b/nite_debian_dir/rules
@@ -9,26 +9,31 @@ prefix = /usr
bindir = $(prefix)/bin
libdir = $(prefix)/lib
includedir = $(prefix)/include/nite
-docdir = $(prefix)/share/doc
+sharedir = $(prefix)/share
+docdir = $(sharedir)/doc
+jardir = $(sharedir)/java
etcdir = /etc/primesense
logdir = /var/log/primesense/XnSensorServer
usbruledir = /etc/udev/rules.d
-#DEB_DH_FIXPERMS_ARGS_$(PACKAGE) := -X/usr/bin/XnSensorServer
-
%:
dh $@
-override_dh_auto_build:
- CFLAGS="-I../../Include" LDFLAGS="-L../../Bin -lGL" $(MAKE)
-
override_dh_auto_install:
install -d $(NITE_BASE)/$(libdir)
- install -p $(COMPILED_BASE)/Bin/libXnVNite*.so $(NITE_BASE)/$(libdir)
- install -p $(COMPILED_BASE)/Bin/libXnVCNITE*so $(NITE_BASE)/$(libdir)
+ install -p -m0644 $(COMPILED_BASE)/Bin/libXnVNite*.so \
+ $(NITE_BASE)/$(libdir)
+ install -p -m0644 $(COMPILED_BASE)/Bin/libXnVCNITE*so \
+ $(NITE_BASE)/$(libdir)
+ install -p -m0644 $(COMPILED_BASE)/Bin/libXnVNITE.jni*.so \
+ $(NITE_BASE)/$(libdir)
install -d $(NITE_BASE)/$(includedir)
- install -p $(COMPILED_BASE)/Include/* $(NITE_BASE)/$(includedir)/
+ install -p -m0644 $(COMPILED_BASE)/Include/* \
+ $(NITE_BASE)/$(includedir)/
+ install -d $(NITE_BASE)/$(jardir)
+ install -p -m0644 $(COMPILED_BASE)/Bin/com.primesense.NITE.jar \
+ $(NITE_BASE)/$(jardir)
$(foreach d, $(wildcard $(CURDIR)/Features* $(CURDIR)/Hands*), \
echo $(d) $(notdir $(d));)
$(foreach d, $(wildcard $(CURDIR)/Features* $(CURDIR)/Hands*), \
@@ -37,6 +42,9 @@ override_dh_auto_install:
install -p $(d)/Data/* $(NITE_BASE)/$(etcdir)/$(notdir $(d));)
$(foreach d, $(wildcard $(CURDIR)/Features* $(CURDIR)/Hands*), \
install -p $(d)/Bin/lib*.so $(NITE_BASE)/$(libdir);)
+ install -d $(NITE_BASE)/$(bindir)
+ $(foreach f, $(wildcard $(CURDIR)/Features*/Bin/XnVSceneServer*), \
+ install -p $(f) $(NITE_BASE)/$(bindir);)
# if [ -f /usr/bin/gmcs ]; then \
# for net in $(MONO_DLLS); do \
diff --git a/update-primesense-nite-nonfree b/update-primesense-nite-nonfree
index 3ee8bc0..a68b566 100755
--- a/update-primesense-nite-nonfree
+++ b/update-primesense-nite-nonfree
@@ -22,7 +22,11 @@ URL32=http://www.openni.org/wp-content/uploads/2012/12/NITE-Bin-Linux-x86-v1.5.2
URL32_SHA256SUM=8be3bf3b325ff6a3538381e8aacf2b7632a4dab422c1bd54ac7ee81d75a140e4
URL64=http://www.openni.org/wp-content/uploads/2012/12/NITE-Bin-Linux-x64-v1.5.2.21.tar.zip
URL64_SHA256SUM=57cd7daa38e82321270179574c3a96b9e8e92348b4c7011c8d58af3d1b2fdb45
-downloadedfile="/tmp/primesense-nite.tar.bz2.zip"
+
+downloadedfilename=primesense-nite.tar.bz2.zip
+downloadedfile=/tmp/primesense-nite.tar.bz2.zip
+cachedir=/var/cache/primesense-nite-nonfree
+cachedfile=${cachedir}/$downloadedfilename
set -e
@@ -116,75 +120,41 @@ case "$ACTION" in
--install)
[ "$verbose" != "yes" ] || echo "selected action = $ACTION"
-#TEMP DISABLED# downloadfile=nite.sha512.i386.pgp.asc
-#TEMP DISABLED# [ `dpkg --print-architecture` != "amd64" ] || downloadfile=nite.sha512.amd64.pgp.asc
-#TEMP DISABLED# downloadurl=http://people.debian.org/~kalfa/primesense-nonfree/$downloadfile
-#TEMP DISABLED# #[ `date --rfc-3339=date` != "2008-12-10" ] || downloadurl=http://127.0.0.1/primesense-nonfree/$downloadfile
-#TEMP DISABLED#
-#TEMP DISABLED# wgetquiet=' -q '
-#TEMP DISABLED# wgetfast='-t 3 -T 15 '
-#TEMP DISABLED# wgetalways=' -nd -P . '
-#TEMP DISABLED# wgetprogress=' -v --progress=dot:default '
-#TEMP DISABLED#
-#TEMP DISABLED# wgetoptions="$wgetquiet $wgetalways"
-#TEMP DISABLED# [ "$verbose" != "yes" ] || wgetoptions="$wgetalways $wgetprogress"
-#TEMP DISABLED# [ "$fast" != "yes" ] || wgetoptions="$wgetoptions $wgetfast"
-#TEMP DISABLED# [ "$verbose" != "yes" ] || echo "wgetoptions=$wgetoptions"
-#TEMP DISABLED#
-#TEMP DISABLED# [ "$verbose" != "yes" ] || echo "downloading $downloadurl ..."
-#TEMP DISABLED# HOME=/root \
-#TEMP DISABLED# wget $wgetoptions $downloadurl \
-#TEMP DISABLED# || die_hard_with_a_cleanup "wget failed to download $downloadurl"
-#TEMP DISABLED# [ "$verbose" != "yes" ] || echo "importing public key ..."
-#TEMP DISABLED# gpg -q --homedir "." --import /usr/lib/primesense-nite-nonfree/pubkey.asc > /dev/null 2>&1 \
-#TEMP DISABLED# || die_hard_with_a_cleanup "gpg failed to import /usr/lib/primesense-nite-nonfree/pubkey.asc"
-#TEMP DISABLED# [ "$verbose" != "yes" ] || echo "verifying PGP $downloadfile ..."
-#TEMP DISABLED# gpg -q --homedir "." < $downloadfile > checksums.txt 2> /dev/null \
-#TEMP DISABLED# || die_hard_with_a_cleanup "gpg rejected signature of $downloadurl"
-#TEMP DISABLED#
-#TEMP DISABLED# downloadfile=`head -n 1 < checksums.txt | cut -c 131-`
- cachedir=/var/cache/primesense-nite-nonfree
-#TEMP DISABLED#
-#TEMP DISABLED# [ "$verbose" != "yes" ] || [ ! -f $cachedir/$downloadfile ] || echo "copying $cachedir/$downloadfile ..."
-#TEMP DISABLED# [ ! -f $cachedir/$downloadfile ] || cp -p $cachedir/$downloadfile .
-#TEMP DISABLED# [ "$verbose" != "yes" ] || [ ! -f $downloadfile ] || echo "verifying checksum $downloadfile ..."
-#TEMP DISABLED# [ ! -f $downloadfile ] || grep $downloadfile checksums.txt | sha512sum -c - > /dev/null 2>&1 || rm -f $downloadfile
-#TEMP DISABLED#
-#TEMP DISABLED# downloaddir=`tail -n 1 < checksums.txt`
-#TEMP DISABLED# downloadurl=$downloaddir/$downloadfile
-#TEMP DISABLED# #[ `date --rfc-3339=date` != "2008-12-10" ] || downloadurl=http://127.0.0.1/flashplugin-nonfree/$downloadfile
-#TEMP DISABLED#
-#TEMP DISABLED# wgetoptions="$wgetalways $wgetprogress"
-#TEMP DISABLED# [ "$quiet" != "yes" ] || wgetoptions="$wgetquiet $wgetalways"
-#TEMP DISABLED# [ "$fast" != "yes" ] || wgetoptions="$wgetoptions $wgetfast"
-#TEMP DISABLED# [ "$verbose" != "yes" ] || echo "wgetoptions=$wgetoptions"
-#TEMP DISABLED#
-#TEMP DISABLED# [ "$verbose" != "yes" ] || [ ! -f $downloadfile ] || echo "downloading $downloadurl ..."
-#TEMP DISABLED# [ -f $downloadfile ] || \
-#TEMP DISABLED# HOME=/root \
-#TEMP DISABLED# wget $wgetoptions $downloadurl \
-#TEMP DISABLED# || die_hard_with_a_cleanup "wget failed to download $downloadurl"
-#TEMP DISABLED# [ "$verbose" != "yes" ] || echo "verifying checksum $downloadfile ..."
-#TEMP DISABLED# grep tar.gz checksums.txt | sha512sum -c - > /dev/null 2>&1 \
-#TEMP DISABLED# || die_hard_with_a_cleanup "sha512sum rejected $downloadfile"
+ wgetquiet=' -q '
+ wgetfast='-t 3 -T 15 '
+ wgetalways=' -nd -P . '
+ wgetprogress=' -v --progress=dot:default '
- wgetoptions="$wgetquiet $wgetalways"
- [ "$verbose" != "yes" ] || wgetoptions="$wgetalways $wgetprogress"
+ wgetoptions="$wgetalways"
[ "$fast" != "yes" ] || wgetoptions="$wgetoptions $wgetfast"
- [ "$verbose" != "yes" ] || echo "wgetoptions=$wgetoptions"
+ if [ "$verbose" = "yes" ]; then
+ wgetoptions="$wgetoptions $wgetprogress"
+ echo "wgetoptions=$wgetoptions"
+ else
+ wgetoptions=" $wgetoptions $wgetquiet "
+ fi
+
+ if [ $(dpkg --print-architecture) = "amd64" ]; then
+ downloadurl=${URL64}
+ checksum=${URL64_SHA256SUM}
+ else
+ downloadurl=${URL32}
+ checksum=${URL32_SHA256SUM}
+ fi
- if [ $(dpkg --print-architecture) == "amd64" ]; then
- downloadurl=${URL64}
- else
- downloadurl=${URL32}
- fi
[ "$verbose" != "yes" ] || echo "downloading $downloadurl ..."
wget $wgetoptions $downloadurl -O ${downloadedfile} \
|| die_hard_with_a_cleanup "wget failed to download $downloadurl"
- cp ${downloadedfile} ${cachedir}
- [ "$verbose" != "yes" ] || echo "Creating .deb from $downloadedfile ..."
- /usr/lib/primesense-nite-nonfree/primesense-nite-nonfree-make-deb ${downloadedfile}
+ echo "Checking integrity of downloaded file using sha256sum ..."
+ checksum_file=${downloadedfile}.sha256
+ echo "$checksum $downloadedfile" > ${checksum_file}
+ sha256sum -c ${checksum_file} || (echo checksum failed! try downloading again... ; exit 1)
+
+ cp ${downloadedfile} ${cachedfile}
+
+ [ "$verbose" != "yes" ] || echo "Creating .deb from $cachedfile ..."
+ /usr/lib/primesense-nite-nonfree/primesense-nite-nonfree-make-deb ${cachedfile}
[ "$verbose" != "yes" ] || echo "end of action $ACTION"
;;
--
primesense-nite-nonfree packaging
More information about the pkg-multimedia-commits
mailing list