DEBIAN = debian/changelog debian/compat debian/control debian/copyright \
debian/ibverbs-utils.install debian/libibverbs1.install \
+ debian/libibverbs1.postinst debian/libibverbs1.postrm \
debian/libibverbs-dev.install debian/rules
EXTRA_DIST = include/infiniband/driver.h include/infiniband/kern-abi.h \
Package: libibverbs1
Section: libs
Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}, adduser
Description: A library for direct userspace use of InfiniBand
libibverbs is a library that allows userspace processes to use
InfiniBand "verbs" as described in the InfiniBand Architecture
--- /dev/null
+#! /bin/sh
+# postinst script for libibverbs1
+
+set -e
+
+case "$1" in
+ configure)
+ if ! getent group rdma > /dev/null 2>&1 ; then
+ addgroup --system rdma
+ fi
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 0
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
--- /dev/null
+#! /bin/sh
+# postrm script for libibverbs1
+
+set -e
+
+case "$1" in
+ purge)
+ if grep "^rdma:" /etc/group > /dev/null 2>&1 ; then
+ groupdel rdma
+ fi
+ ;;
+
+ remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+ ;;
+
+ *)
+ echo "postrm called with unknown argument \`$1'" >&2
+ exit 0
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0