]> git.donarmstrong.com Git - neurodebian.git/commitdiff
New package neurodebian-popularity-contest
authorYaroslav Halchenko <debian@onerussian.com>
Mon, 6 Dec 2010 19:42:10 +0000 (14:42 -0500)
committerYaroslav Halchenko <debian@onerussian.com>
Mon, 6 Dec 2010 19:54:34 +0000 (14:54 -0500)
debian/changelog
debian/control
debian/neurodebian-popularity-contest.postinst [new file with mode: 0755]
debian/neurodebian-popularity-contest.postrm [new file with mode: 0755]

index d103a2865a6061f5e4f734142a68c80adef88df6..5376a3c0b26531bda7ee17492a51e6ff93fdda74 100644 (file)
@@ -1,3 +1,9 @@
+neurodebian (0.20) unstable; urgency=low
+
+  * New package neurodebian-popularity-contest
+
+ -- Yaroslav Halchenko <debian@onerussian.com>  Mon, 06 Dec 2010 14:27:56 -0500
+
 neurodebian (0.19) unstable; urgency=low
 
   * Initial release.
index cb607bc41d5b8a60256bd23b6e250e907625317f..c864b4f7be91215dfa43d83a7a4b5d794af93671 100644 (file)
@@ -35,6 +35,28 @@ Description: GnuPG archive keys of the NeuroDebian archive
  The NeuroDebian project digitally signs its Release files. This package
  contains the archive keys used for that.
 
+Package: neurodebian-popularity-contest
+Architecture: all
+Depends: ${misc:Depends}, popularity-contest
+Description: Helper for NeuroDebian popularity contest submissions
+ This package is a complement to a generic popularity-contest package
+ to enable submission of usage statistics to NeuroDebian in addition
+ to the submissions to the underlying distribution (e.g. Debian or
+ Ubuntu) popcon server.
+ .
+ It has an effect only if you have decided to participate in the
+ Popularity Contest.
+ .
+ Your participation in popcon is important for following reasons:
+  - Popular packages receive more attention from developers, bugs are
+    fixed faster and updates are provided quicker.
+  - Assure that we do not drop support for a previous release of Debian
+    or Ubuntu while are active users.
+  - User statistics could be used by upstream research software
+    developers to acquire funding for continued development.
+ .
+ You can always enable or disable your participation in popcon by
+ running 'dpkg-reconfigure popularity-contest' as root.
 
 Package: neurodebian-guest-additions
 Architecture: all
diff --git a/debian/neurodebian-popularity-contest.postinst b/debian/neurodebian-popularity-contest.postinst
new file mode 100755 (executable)
index 0000000..a3f9e53
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/bash -e
+
+popcon_conf=/etc/popularity-contest.conf
+if [ "$1" = "configure" -o "$1" = "abort-upgrade" ]; then
+       # Adjust popularity-contest.conf
+       if [ -e "$popcon_conf" ]; then
+               echo "Adding NeuroDebian url for Popularity Contest submissions."
+               grep -q 'SUBMITURLS.*neuro.debian.net' "$popcon_conf" || \
+                       echo -e 'SUBMITURLS+=" http://neuro.debian.net/cgi-bin/popcon-submit.cgi"' >> "$popcon_conf"
+       fi
+fi
+
+#DEBHELPER#
+
diff --git a/debian/neurodebian-popularity-contest.postrm b/debian/neurodebian-popularity-contest.postrm
new file mode 100755 (executable)
index 0000000..b392f7b
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/sh -e
+
+#DEBHELPER#
+
+# If requested to be purged -- remove our entry
+popcon_conf=/etc/popularity-contest.conf
+if [ "$1" = "purge" ]; then
+       # Adjust popularity-contest.conf
+       if [ -e "$popcon_conf" ]; then
+               echo "Removing NeuroDebian url for Popularity Contest submissions."
+               # First remove any explicit mentioning and then empty additions
+               sed -i -e 's,http://neuro.debian.net/cgi-bin/popcon-submit.cgi,,g' \
+                          -e '/SUBMITURLS+=" *"/d'\
+                       "$popcon_conf"
+       fi
+fi