looks interesting
This commit is contained in:
parent
eb730ff340
commit
d8832dd061
1 changed files with 80 additions and 0 deletions
80
ap/password-store/password-store.SlackBuild
Executable file
80
ap/password-store/password-store.SlackBuild
Executable file
|
@ -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 <<EOF > $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
|
Loading…
Reference in a new issue