diff options
author | Andrzej Telszewski <atelszewski@gmail.com> | 2016-07-24 23:09:55 -0500 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2016-07-30 08:28:43 +0700 |
commit | f8e4d24eb4b74ad6125b0f292385e574ff9d9558 (patch) | |
tree | 6c42e07a4b7f482025d48e5b859021c88346b27e /system/fpm2 | |
parent | 98a69d772e70673835c3c9181487d0a2ce5f4131 (diff) | |
download | slackbuilds-f8e4d24eb4b74ad6125b0f292385e574ff9d9558.tar.gz |
system/fpm2: New maintainer and some added patches
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'system/fpm2')
-rw-r--r-- | system/fpm2/01-preserve_column_width.patch | 18 | ||||
-rw-r--r-- | system/fpm2/02-sighandler.patch | 115 | ||||
-rw-r--r-- | system/fpm2/README | 2 | ||||
-rw-r--r-- | system/fpm2/doinst.sh | 6 | ||||
-rw-r--r-- | system/fpm2/fpm2.SlackBuild | 65 | ||||
-rw-r--r-- | system/fpm2/fpm2.info | 4 | ||||
-rw-r--r-- | system/fpm2/fpm2.png | bin | 0 -> 2193 bytes | |||
-rw-r--r-- | system/fpm2/slack-desc | 4 |
8 files changed, 182 insertions, 32 deletions
diff --git a/system/fpm2/01-preserve_column_width.patch b/system/fpm2/01-preserve_column_width.patch new file mode 100644 index 0000000000..03daf37042 --- /dev/null +++ b/system/fpm2/01-preserve_column_width.patch @@ -0,0 +1,18 @@ +--- fpm2-0.79orig/src/fpm.c 2011-01-17 13:51:17.000000000 +0100 ++++ fpm2-0.79new/src/fpm.c 2015-01-21 20:45:05.777833506 +0100 +@@ -1197,9 +1197,12 @@ + + columns = gtk_tree_view_get_columns(gui->main_clist); + while (columns != NULL) { +- ini->columns_width[i] = gtk_tree_view_column_get_width (columns->data); +- columns = g_list_next(columns); +- i++; ++ gint width; ++ ++ width = gtk_tree_view_column_get_width (columns->data); ++ if (width != 0) ini->columns_width[i] = width; ++ columns = g_list_next(columns); ++ i++; + } + g_list_free(columns); + diff --git a/system/fpm2/02-sighandler.patch b/system/fpm2/02-sighandler.patch new file mode 100644 index 0000000000..29ea58ff3f --- /dev/null +++ b/system/fpm2/02-sighandler.patch @@ -0,0 +1,115 @@ +diff -Naur fpm2-0.79orig/src/Makefile.am fpm2-0.79new/src/Makefile.am +--- fpm2-0.79orig/src/Makefile.am 2010-08-30 10:37:05.000000000 +0200 ++++ fpm2-0.79new/src/Makefile.am 2016-03-14 21:26:02.824136232 +0100 +@@ -19,7 +19,8 @@ + fpm_gpw.c fpm_gpw.h \ + fpm_clist.c \ + bithelp.h fpm_launcher.c \ +- rijndael.c sha256.c ++ rijndael.c sha256.c \ ++ sighandler.c + + fpm2_LDADD = @PACKAGE_LIBS@ $(INTLLIBS) + +diff -Naur fpm2-0.79orig/src/main.c fpm2-0.79new/src/main.c +--- fpm2-0.79orig/src/main.c 2011-01-17 13:51:17.000000000 +0100 ++++ fpm2-0.79new/src/main.c 2016-03-14 21:32:12.224456348 +0100 +@@ -29,11 +29,18 @@ + + #include "interface.h" + #include "support.h" ++#include "sighandler.h" + + #include <libxml/parser.h> + + #include "fpm.h" + ++void ++sighandler (int signum) ++{ ++ fpm_quit (); ++} ++ + int + main (int argc, char *argv[]) + { +@@ -70,6 +77,7 @@ + + fpm_init (opt_file_name, tray_on_startup); + ++ sighandler_setup (); + gtk_main (); + + fpm_tr_cleanup(); +diff -Naur fpm2-0.79orig/src/sighandler.c fpm2-0.79new/src/sighandler.c +--- fpm2-0.79orig/src/sighandler.c 1970-01-01 01:00:00.000000000 +0100 ++++ fpm2-0.79new/src/sighandler.c 2016-03-14 21:02:59.000000000 +0100 +@@ -0,0 +1,57 @@ ++#include <unistd.h> ++#include <fcntl.h> ++#include <signal.h> ++#include <gtk/gtk.h> ++#include "sighandler.h" ++ ++#define PIPE_RD_FD(PIPE) PIPE[0] ++#define PIPE_WR_FD(PIPE) PIPE[1] ++ ++static int sigpipe[2]; ++ ++/******************************************************************************/ ++static void unixsigh(int psignum) ++/******************************************************************************/ ++{ ++ write(PIPE_WR_FD(sigpipe), &psignum, sizeof(psignum)); ++} ++ ++/******************************************************************************/ ++static gboolean gtksigh(GIOChannel *psrc, GIOCondition pcond, gpointer pdata) ++/******************************************************************************/ ++{ ++ GIOStatus rc; ++ int snum; ++ gsize br; ++ ++ (void)pcond; ++ (void)pdata; ++ ++ rc = g_io_channel_read_chars(psrc, (gchar *) &snum, sizeof(snum), &br, NULL); ++ if (rc == G_IO_STATUS_NORMAL && br == sizeof(snum)) sighandler(snum); ++ ++ return TRUE; ++} ++ ++/******************************************************************************/ ++void sighandler_setup(void) ++/******************************************************************************/ ++{ ++ int flags; ++ GIOChannel *gsigin; ++ ++ pipe(sigpipe); ++ flags = fcntl(PIPE_WR_FD(sigpipe), F_GETFL); ++ fcntl(PIPE_WR_FD(sigpipe), F_SETFL, flags | O_NONBLOCK); ++ ++ signal(SIGHUP, unixsigh); ++ signal(SIGINT, unixsigh); ++ signal(SIGQUIT, unixsigh); ++ signal(SIGTERM, unixsigh); ++ ++ gsigin = g_io_channel_unix_new(PIPE_RD_FD(sigpipe)); ++ g_io_channel_set_encoding(gsigin, NULL, NULL); ++ g_io_channel_set_flags(gsigin, g_io_channel_get_flags(gsigin) | ++ G_IO_FLAG_NONBLOCK, NULL); ++ g_io_add_watch(gsigin, G_IO_IN | G_IO_PRI, gtksigh, NULL); ++} +diff -Naur fpm2-0.79orig/src/sighandler.h fpm2-0.79new/src/sighandler.h +--- fpm2-0.79orig/src/sighandler.h 1970-01-01 01:00:00.000000000 +0100 ++++ fpm2-0.79new/src/sighandler.h 2016-03-14 20:59:34.000000000 +0100 +@@ -0,0 +1,7 @@ ++#ifndef SIGHANDLER_H_INCLUDED ++#define SIGHANDLER_H_INCLUDED ++ ++extern void sighandler(int psignum); ++void sighandler_setup(void); ++ ++#endif diff --git a/system/fpm2/README b/system/fpm2/README index e5c5990651..0fdff7d605 100644 --- a/system/fpm2/README +++ b/system/fpm2/README @@ -1,2 +1,2 @@ Figaro's Password Manager 2 is a program that allows you to securely store -passwords using a GTK2 interface. +passwords. It is using a GTK2 interface. diff --git a/system/fpm2/doinst.sh b/system/fpm2/doinst.sh index 3857649f50..11813c3101 100644 --- a/system/fpm2/doinst.sh +++ b/system/fpm2/doinst.sh @@ -1,3 +1,9 @@ if [ -x /usr/bin/update-desktop-database ]; then /usr/bin/update-desktop-database -q usr/share/applications &> /dev/null fi + +if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then + if [ -x /usr/bin/gtk-update-icon-cache ]; then + /usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1 + fi +fi diff --git a/system/fpm2/fpm2.SlackBuild b/system/fpm2/fpm2.SlackBuild index 5862a8cb31..70c8bae51f 100644 --- a/system/fpm2/fpm2.SlackBuild +++ b/system/fpm2/fpm2.SlackBuild @@ -1,8 +1,8 @@ #!/bin/sh -# + # Slackware build script for FPM2 -# -# Copyright 2009-2011 Erik W. Hanson, Minneapolis, MN, USA + +# Copyright 2016 Andrzej Telszewski, Sabadell # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -11,20 +11,20 @@ # 1. Redistributions of this script must retain the above copyright # notice, this list of conditions and the following disclaimer. # -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED -# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=fpm2 VERSION=${VERSION:-0.79} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then @@ -40,7 +40,7 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -set -eu +set -e if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" @@ -64,33 +64,44 @@ tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 cd $PRGNAM-$VERSION chown -R root:root . find -L . \ - \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \ - -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ - -exec chmod 644 {} \; + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +patch -p1 < $CWD/01-preserve_column_width.patch +patch -p1 < $CWD/02-sighandler.patch + +aclocal +automake --add-missing +autoreconf CFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --libdir=/usr/lib${LIBDIRSUFFIX} \ --mandir=/usr/man \ --build=$ARCH-slackware-linux make -make install-strip DESTDIR=$PKG +make install DESTDIR=$PKG + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +mkdir -p $PKG/usr/share/icons/hicolor/48x48/apps +cat $CWD/fpm2.png > $PKG/usr/share/icons/hicolor/48x48/apps/fpm2.png -gzip -9 $PKG/usr/man/man?/*.? +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 INSTALL NEWS README TODO \ - $PKG/usr/doc/$PRGNAM-$VERSION +cp -a AUTHORS ChangeLog COPYING INSTALL NEWS README TODO \ + $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc -cat $CWD/doinst.sh > $PKG/install/doinst.sh +cat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/system/fpm2/fpm2.info b/system/fpm2/fpm2.info index 3d12618d26..8e327dc8fa 100644 --- a/system/fpm2/fpm2.info +++ b/system/fpm2/fpm2.info @@ -6,5 +6,5 @@ MD5SUM="a1f28d5e3fffc78bf5c70a99287ce443" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" -MAINTAINER="Erik Hanson" -EMAIL="erik@slackbuilds.org" +MAINTAINER="Andrzej Telszewski" +EMAIL="atelszewski@gmail.com" diff --git a/system/fpm2/fpm2.png b/system/fpm2/fpm2.png Binary files differnew file mode 100644 index 0000000000..81b39e8177 --- /dev/null +++ b/system/fpm2/fpm2.png diff --git a/system/fpm2/slack-desc b/system/fpm2/slack-desc index 1d7f809fb7..5935e252a1 100644 --- a/system/fpm2/slack-desc +++ b/system/fpm2/slack-desc @@ -9,11 +9,11 @@ fpm2: FPM2 (Figaro's Password Manager 2) fpm2: fpm2: Figaro's Password Manager 2 is a program that allows you to securely -fpm2: store the passwords using GTK2 interface. +fpm2: store the passwords. It is using GTK2 interface. fpm2: +fpm2: Homepage: http://als.regnet.cz/fpm2/ fpm2: fpm2: fpm2: fpm2: -fpm2: http://als.regnet.cz/fpm2/ fpm2: |