aboutsummaryrefslogtreecommitdiff
path: root/desktop/parcellite/parcellite.SlackBuild
diff options
context:
space:
mode:
authorPhillip Warner <pc_warner@yahoo.com>2011-07-12 05:04:16 -0400
committerNiels Horn <niels.horn@slackbuilds.org>2011-07-14 21:54:04 -0300
commit18974e920c585843c6e34f2b95e2d60e31e1737d (patch)
tree8583ec3d9effdd0bae9f4ebaa1a5fff1f82083f7 /desktop/parcellite/parcellite.SlackBuild
parentd57fd9310ef9fa656a08276f1414e68f81277263 (diff)
desktop/parcellite: Updated for version 1.0.2rc2.
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'desktop/parcellite/parcellite.SlackBuild')
-rw-r--r--desktop/parcellite/parcellite.SlackBuild22
1 files changed, 20 insertions, 2 deletions
diff --git a/desktop/parcellite/parcellite.SlackBuild b/desktop/parcellite/parcellite.SlackBuild
index 1c722b1dd5846..18a3019248c1b 100644
--- a/desktop/parcellite/parcellite.SlackBuild
+++ b/desktop/parcellite/parcellite.SlackBuild
@@ -4,7 +4,7 @@
# Written by Phillip Warner <pc_warner@yahoo.com>
PRGNAM=parcellite
-VERSION=${VERSION:-0.9.2}
+VERSION=${VERSION:-1.0.2rc2}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -23,6 +23,9 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
+# If set to "YES" then parcellite will use GTK Stock Icon based upon theme
+NOICON=${NOICON:-NO}
+
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
@@ -48,6 +51,13 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+if [ "$NOICON" = "YES" ]; then
+ # Force parcellite to use the stock GTK icons
+ sed -i "s/gtk_status_icon_new_from_icon_name(PARCELLITE_ICON)/gtk_status_icon_new_from_stock(PARCELLITE_ICON)/" src/main.c
+ sed -i "s/PARCELLITE_ICON/GTK_STOCK_PASTE/" src/main.c
+ sed -i "s/#define GTK_STOCK_PASTE \"parcellite\"//" src/main.c
+fi
+
CFLAGS="$SLKCFLAGS" \
CPPFLAGS="$SLKCFLAGS" \
./configure \
@@ -59,6 +69,14 @@ CPPFLAGS="$SLKCFLAGS" \
CFLAGS="$SLKCFLAGS" make
make install DESTDIR=$PKG
+if [ "$NOICON" = "YES" ]; then
+ sed -i "s/Icon=parcellite/Icon=gtk-paste/" $PKG/usr/share/applications/parcellite.desktop
+ sed -i "s/Icon=parcellite/Icon=gtk-paste/" $PKG/etc/xdg/autostart/parcellite-startup.desktop
+
+ # Remove the unused icons
+ rm -rfv $PKG/usr/share/pixmaps/
+fi
+
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
@@ -66,7 +84,7 @@ find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a AUTHORS COPYING ChangeLog README TODO INSTALL \
+cp -a AUTHORS COPYING ChangeLog README TODO INSTALL NEWS \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild