From d8832dd061617c914942ead60c94746c3a353a66 Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Tue, 6 Aug 2013 14:35:05 +0200 Subject: [PATCH] looks interesting --- ap/password-store/password-store.SlackBuild | 80 +++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100755 ap/password-store/password-store.SlackBuild diff --git a/ap/password-store/password-store.SlackBuild b/ap/password-store/password-store.SlackBuild new file mode 100755 index 00000000..484c4eb3 --- /dev/null +++ b/ap/password-store/password-store.SlackBuild @@ -0,0 +1,80 @@ +#!/bin/sh -x + +# variables +CWD=$(pwd) + +PRGNAM=$(basename $CWD) +VERSION=${VERSION:-$(date +"%Y.%m.%d_%H.%M")} +ARCH=${ARCH:-$(uname -m)} +BUILD=1 + +TAG=cyco +TMP=/tmp/$TAG +PKG=$TMP/pkg-$PRGNAM +OUTPUT=/tmp + +REPOSITORY=/home/installs/SlackBuilds/repositories/$PRGNAM + +PREFIX=/usr + +SLCKFLAGS=" -O " + +# nettoyage préalable +rm -fr $PKG $TMP/$PRGNAM + +mkdir -p $PKG + +# mise en place +cd $TMP +if [ ! -e $REPOSITORY ]; then + git clone http://git.zx2c4.com/password-store $REPOSITORY +else + ( cd $REPOSITORY + git pull + ) +fi +cp -R $REPOSITORY $TMP/$PRGNAM + +cd $TMP/$PRGNAM + +# installation +make install DESTDIR=$PKG +mv $PKG$PREFIX/share/man $PKG$PREFIX/ +rm -fr $PKG$PREFIX/share +mkdir -p $PKG$PREFIX/doc/$PRGNAM/ +cp -r COPYING INSTALL README contrib/ $PKG$PREFIX/doc/$PRGNAM/ + +# correction +cd $PKG +chown -R root:root * + +find $PKG -name \.git\* -exec rm -fr {} \; + +[ -d $PKG/usr/man ] && find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \; + +# Strip binaries +( cd $PKG + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null +) + + +# embaumement +mkdir -p $PKG/install +cat < $PKG/install/slack-desc +$PRGNAM: $PRGNAM (the standard unix password manager) +$PRGNAM: +$PRGNAM: Password management should be simple and follow Unix philosophy. With pass, +$PRGNAM: each password lives inside of a gpg encrypted file whose filename is the +$PRGNAM: title of the website or resource that requires the password. These encrypted +$PRGNAM: files may be organized into meaningful folder hierarchies, copied from +$PRGNAM: computer to computer, and, in general, manipulated using standard command +$PRGNAM: line file management utilities. +$PRGNAM: +$PRGNAM: http://zx2c4.com/projects/password-store/ +$PRGNAM: +EOF + +# empaquetage +cd $PKG +makepkg -l y -c n $OUTPUT/$PRGNAM-$(echo $VERSION | sed 's/-//g')-$ARCH-$BUILD$TAG.txz