[DRE-commits] [diaspora] 03/03: add postinst hook for gem install

Praveen Arimbrathodiyil praveen at moszumanska.debian.org
Sun Aug 30 12:56:08 UTC 2015


This is an automated email from the git hooks/post-receive script.

praveen pushed a commit to branch master
in repository diaspora.

commit a23be5bde7641d353cb16c3146c32584c4067a58
Author: Praveen Arimbrathodiyil <praveen at debian.org>
Date:   Sun Aug 30 18:18:31 2015 +0530

    add postinst hook for gem install
---
 debian/diaspora-upstream-compat.postinst | 58 ++++++++++++++++++++++++++++++++
 1 file changed, 58 insertions(+)

diff --git a/debian/diaspora-upstream-compat.postinst b/debian/diaspora-upstream-compat.postinst
new file mode 100755
index 0000000..088e42c
--- /dev/null
+++ b/debian/diaspora-upstream-compat.postinst
@@ -0,0 +1,58 @@
+#! /bin/sh
+# postinst script for gnukhata-core-engine
+# copied from postinst script for hplip
+# $Id: hplip.postinst,v 1.1 2005/10/15 21:39:04 hmh Exp $
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postinst> `configure' <most-recently-configured-version>
+#        * <old-postinst> `abort-upgrade' <new version>
+#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+#          <new-version>
+#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+#          <failed-install-package> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+# quoting from the policy:
+#     Any necessary prompting should almost always be confined to the
+#     post-installation script, and should be protected with a conditional
+#     so that unnecessary prompting doesn't happen if a package's
+#     installation fails and the `postinst' is called with `abort-upgrade',
+#     `abort-remove' or `abort-deconfigure'.
+
+
+case "$1" in
+    configure)
+
+	. /etc/diaspora/diaspora-common.conf
+	echo "Installing gems with rubygems..."
+	echo "(they have a version in debian which differ from upstream"
+	echo "supported dependency graph)"
+# These gems need more work before they can be kept in sync
+	if ! gem list ^roxml$ | grep roxml
+		then gem install -v=3.1.6 roxml
+	fi
+	
+	echo "Verifying we have all required libraries..."
+	cd ${diaspora_home}
+	su diaspora -s /bin/sh -c 'bundle install --local'
+	su diaspora -s /bin/sh -c 'bundle exec rake tmp:cache:clear assets:precompile'	
+   ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+#DEBHELPER#
+
+exit 0

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/diaspora.git



More information about the Pkg-ruby-extras-commits mailing list