summaryrefslogtreecommitdiff
path: root/social/spectrum/spectrum.install
diff options
context:
space:
mode:
authorNicolas Reynolds <fauno@kiwwwi.com.ar>2011-10-28 11:35:50 -0300
committerNicolas Reynolds <fauno@kiwwwi.com.ar>2011-10-28 11:35:50 -0300
commit8856e6fe26ce35b4caf6beeac324f583ec1b6133 (patch)
treec42a03e2b7610a39d167af36357607399aa40045 /social/spectrum/spectrum.install
parent5100458465d1ed420073c3213349bf430075ddbc (diff)
parent0424b5fc47f106db6498c4cda3476e1d49fe0f82 (diff)
Merge branch 'master' of ssh://vparabola/home/parabola/abslibre-pre-mips64el
Conflicts: community/esmtp/PKGBUILD community/geany-plugins/PKGBUILD community/giggle/PKGBUILD community/guichan/PKGBUILD community/mxml/PKGBUILD community/ruby-gtk2/PKGBUILD core/libtool/PKGBUILD core/mkinitcpio-busybox/PKGBUILD core/udev/PKGBUILD extra/audacious/PKGBUILD extra/conky/PKGBUILD extra/gnome-control-center/PKGBUILD extra/gtk2/PKGBUILD extra/gtk3/PKGBUILD extra/gvfs/PKGBUILD extra/kdeutils/PKGBUILD extra/kino/PKGBUILD extra/mkvtoolnix/PKGBUILD extra/poppler/PKGBUILD extra/postfix/PKGBUILD extra/pulseaudio/PKGBUILD extra/qtcurve-gtk2/PKGBUILD extra/transmission/PKGBUILD extra/xfburn/PKGBUILD extra/xfce4-xkb-plugin/PKGBUILD extra/xorg-server/PKGBUILD extra/yelp/PKGBUILD kde-unstable/calligra/PKGBUILD multilib/lib32-gtk2/PKGBUILD multilib/lib32-libpulse/PKGBUILD multilib/libtool-multilib/PKGBUILD multilib/wine/PKGBUILD multilib/wine/wine.install
Diffstat (limited to 'social/spectrum/spectrum.install')
-rw-r--r--social/spectrum/spectrum.install47
1 files changed, 47 insertions, 0 deletions
diff --git a/social/spectrum/spectrum.install b/social/spectrum/spectrum.install
new file mode 100644
index 000000000..738fc5bbe
--- /dev/null
+++ b/social/spectrum/spectrum.install
@@ -0,0 +1,47 @@
+# arg 1: the new package version
+post_install() {
+ if [ -z "`grep '^spectrum:' /etc/group`" ]; then
+ groupadd -g 417 spectrum
+ fi
+ if [ -z "`grep '^spectrum:' /etc/passwd`" ]; then
+ useradd -u 417 -d /etc/spectrum -g spectrum -s /bin/false spectrum
+ fi
+
+ chown spectrum:spectrum var/lib/spectrum
+ chown spectrum:spectrum var/log/spectrum
+ chown spectrum:spectrum var/run/spectrum
+
+cat << EOF
+
+==> Documentation: http://spectrum.im/
+
+==> You must now customize the configuration file located in /etc/spectrum/. Copy and reconfigure for each seperate protocol.
+
+EOF
+
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ post_install $1
+}
+
+# arg 1: the old package version
+post_remove() {
+ userdel spectrum
+
+ paths=(/etc/spectrum /var/lib/spectrum /var/log/spectrum
+ /var/run/spectrum)
+
+ first=true
+ for path in ${paths[@]}; do
+ if [ -d $path ]; then
+ if $first; then
+ first=false
+ echo "==> Leftover Paths:"
+ fi
+ echo "==> $path"
+ fi
+ done
+}