gPodder 2.8-1 for Fremantle
[gpodder.git] / debian / postinst
blob38d004b69e4d19dce9b674416cd4a725b010b953
1 #! /bin/sh
3 # Update the icon cache
4 gtk-update-icon-cache -f /usr/share/icons/hicolor
6 # Add gPodder to the notification bubble settings
7 NOTIFICATIONS_CONF="/etc/hildon-desktop/notification-groups.conf"
8 NOTIFICATIONS_KEY="gpodder-new-episodes"
10 # If you are reading this and want to start complaining
11 # about why this is tampering with a configuration file
12 # of another package, my reasons are as follows:
14 # 1.) hildon-home could have been made configurable and
15 # provide a folder ("notification-groups.d") into which
16 # apps can install their own, additional settings. This
17 # is not the case, so we have to inject our data here.
18 # 2.) Even if someone were to write a patch against hildon-home
19 # to add said feature, it won't appear in a Maemo firmware
20 # upgrade in a reasonable time frame, given the maintenance
21 # status of Maemo 5 / Fremantle as of August 2010.
22 # 3.) There is no way to layer notifications on top of a visible
23 # window without an entry in this file (the "Destination"
24 # key is key (sic) here...), which is a requirement for me
26 if ! grep -q "$NOTIFICATIONS_KEY" "$NOTIFICATIONS_CONF"; then
27 echo -n "Updating $NOTIFICATIONS_CONF..."
28 cat >>$NOTIFICATIONS_CONF << EOF
30 ### BEGIN Added by gpodder postinst ###
32 [gpodder-new-episodes]
33 Destination=Gpodder
34 Icon=gpodder
35 Title-Text-Empty=gPodder
36 Secondary-Text=New episodes available
37 Text-Domain=gpodder
38 LED-Pattern=PatternCommonNotification
40 ### END Added by gpodder postinst ###
42 EOF
43 echo "done."
47 #DEBHELPER#