security/libsecret/libsecret.sh

Fri, 15 Nov 2019 20:11:00 +0100

author
David Demelier <markand@malikania.fr>
date
Fri, 15 Nov 2019 20:11:00 +0100
changeset 1210
422313c3fcbd
parent 1094
3dece1f7570b
child 1216
6710613b88b9
permissions
-rw-r--r--

text/rarian: initial import, closes #2311

1019
ddab65a5b3f5 vanilla: use /bin/busybox sh as default shell
David Demelier <markand@malikania.fr>
parents: 902
diff changeset
1 #!/bin/busybox sh
707
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
2 #
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
3 # Copyright (c) 2019 David Demelier <markand@malikania.fr>
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
4 #
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
5 # Permission to use, copy, modify, and/or distribute this software for any
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
6 # purpose with or without fee is hereby granted, provided that the above
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
7 # copyright notice and this permission notice appear in all copies.
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
8 #
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
9 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
10 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
11 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
12 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
13 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
14 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
15 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
16 #
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
17
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
18 PKGNAME=libsecret
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
19 PKGVERSION=0.18.8
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
20 PKGREVISION=1
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
21 PKGLICENSE="LGPLv21"
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
22 PKGSUMMARY="a library for storing and accessing passwords"
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
23 PKGDOWNLOAD="https://download.gnome.org/sources/libsecret/${PKGVERSION%.*}/$PKGNAME-$PKGVERSION.tar.xz"
1094
3dece1f7570b vanilla: add many ghost dependencies
David Demelier <markand@malikania.fr>
parents: 1019
diff changeset
24 PKGDEPENDS="glib libgpg-error libxslt:build"
721
034a2a62a9f8 vanilla: consolidate options with lint-options.sh
David Demelier <markand@malikania.fr>
parents: 707
diff changeset
25 PKGOPTIONS="CRYPTO NLS VALA"
707
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
26
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
27 : ${CHOST:=$(uname -m)-linux-musl}
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
28 : ${CBUILD:=$(uname -m)-linux-musl}
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
29 : ${CC:=clang}
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
30 : ${CFLAGS:=-O2}
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
31 : ${LDFLAGS:=}
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
32 : ${LIBS:=}
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
33 : ${LDFLAGS:=}
721
034a2a62a9f8 vanilla: consolidate options with lint-options.sh
David Demelier <markand@malikania.fr>
parents: 707
diff changeset
34 : ${CRYPTO:=yes}
707
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
35 : ${NLS:=yes}
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
36 : ${VALA:=yes}
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
37
721
034a2a62a9f8 vanilla: consolidate options with lint-options.sh
David Demelier <markand@malikania.fr>
parents: 707
diff changeset
38 if [ "$CRYPTO" = "yes" ]; then
902
a133976e0783 vanilla: remove all origins, closes #2203
David Demelier <markand@malikania.fr>
parents: 831
diff changeset
39 PKGDEPENDS="libgcrypt $PKGDEPENDS"
721
034a2a62a9f8 vanilla: consolidate options with lint-options.sh
David Demelier <markand@malikania.fr>
parents: 707
diff changeset
40 with_crypto="--enable-gcrypt"
707
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
41 else
721
034a2a62a9f8 vanilla: consolidate options with lint-options.sh
David Demelier <markand@malikania.fr>
parents: 707
diff changeset
42 with_crypto="--disable-gcrypt"
707
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
43 fi
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
44
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
45 if [ "$NLS" = "yes" ]; then
902
a133976e0783 vanilla: remove all origins, closes #2203
David Demelier <markand@malikania.fr>
parents: 831
diff changeset
46 PKGDEPENDS="gettext $PKGDEPENDS"
707
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
47 with_nls="--enable-nls"
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
48 else
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
49 with_nls="--disable-nls"
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
50 fi
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
51
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
52 if [ "$VALA" = "yes" ]; then
902
a133976e0783 vanilla: remove all origins, closes #2203
David Demelier <markand@malikania.fr>
parents: 831
diff changeset
53 PKGDEPENDS="vala $PKGDEPENDS"
707
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
54 with_vala="--enable-vala"
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
55 else
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
56 with_vala="--disable-vala"
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
57 fi
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
58
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
59 build()
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
60 {
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
61 rm -rf $PKGNAME-$PKGVERSION
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
62 tar xvf $PKGNAME-$PKGVERSION.tar.xz
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
63 cd $PKGNAME-$PKGVERSION
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
64
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
65 CC="$CC" \
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
66 CFLAGS="$CFLAGS" \
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
67 LDFLAGS="$LDFLAGS" \
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
68 LIBS="$LIBS" \
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
69 ./configure \
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
70 --build=$CBUILD \
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
71 --host=$CHOST \
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
72 --prefix= \
721
034a2a62a9f8 vanilla: consolidate options with lint-options.sh
David Demelier <markand@malikania.fr>
parents: 707
diff changeset
73 --enable-shared \
034a2a62a9f8 vanilla: consolidate options with lint-options.sh
David Demelier <markand@malikania.fr>
parents: 707
diff changeset
74 $with_crypto \
034a2a62a9f8 vanilla: consolidate options with lint-options.sh
David Demelier <markand@malikania.fr>
parents: 707
diff changeset
75 $with_vala
707
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
76 make
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
77 make install DESTDIR=$DESTDIR
817
0e6c54d47dfb vanilla: fix many FHS issues
David Demelier <markand@malikania.fr>
parents: 745
diff changeset
78 find $DESTDIR -type f -name "*.la" -delete
707
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
79
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
80 cd ..
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
81 rm -rf $PKGNAME-$PKGVERSION
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
82 }
0b0c88de2c89 security/libsecret: initial import, closes #1735
David Demelier <markand@malikania.fr>
parents:
diff changeset
83

mercurial