secretada 1.0.0, libglib external, libsecret external (#999)
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
description = "libglib library"
|
||||
name = "libglib"
|
||||
|
||||
maintainers = ["Stephane.Carrez@gmail.com"]
|
||||
maintainers-logins = ["stcarrez"]
|
||||
|
||||
[[external]]
|
||||
kind = "system"
|
||||
[external.origin."case(distribution)"]
|
||||
"debian|ubuntu" = ["libglib2.0-dev"]
|
||||
|
||||
[external.available.'case(os)']
|
||||
windows = false
|
||||
'...' = true
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
description = "FreeDesktop secret library"
|
||||
name = "libsecret"
|
||||
|
||||
maintainers = ["Stephane.Carrez@gmail.com"]
|
||||
maintainers-logins = ["stcarrez"]
|
||||
|
||||
[[external]]
|
||||
kind = "system"
|
||||
[external.origin."case(distribution)"]
|
||||
"debian|ubuntu" = ["libsecret-1-dev"]
|
||||
|
||||
[external.available.'case(os)']
|
||||
windows = false
|
||||
'...' = true
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
name = "secretada"
|
||||
description = "Secret service Ada binding"
|
||||
version = "1.0.0"
|
||||
long-description = """
|
||||
|
||||
The [libsecret](https://wiki.gnome.org/Projects/Libsecret) is a library for storing
|
||||
and retrieving passwords and others secrets. The library uses the
|
||||
[Secret Service API](https://standards.freedesktop.org/secret-service/) provided
|
||||
by Gnome Keyring or KDE Wallet. This library provides an Ada binding
|
||||
to the [Secret Service API](https://standards.freedesktop.org/secret-service/).
|
||||
|
||||
You can store a secret by using the following code extract:
|
||||
|
||||
```
|
||||
with Secret.Services;
|
||||
with Secret.Attributes;
|
||||
with Secret.Values;
|
||||
...
|
||||
Service : Secret.Services.Service_Type;
|
||||
List : Secret.Attributes.Map;
|
||||
Value : Secret.Values.Secret_Type;
|
||||
...
|
||||
Service.Initialize;
|
||||
List.Insert ("secret identification key", "secret identification value");
|
||||
Value := Secret.Values.Create ("the-secret-to-store");
|
||||
Service.Store (List, "The secret label (for the keyring manager)", Value);
|
||||
```
|
||||
|
||||
And you will retrieve it with:
|
||||
|
||||
```
|
||||
Value := Service.Lookup (List);
|
||||
if not Value.Is_Null then
|
||||
Ada.Text_IO.Put_Line (Value.Get_Value);
|
||||
end if;
|
||||
```
|
||||
|
||||
"""
|
||||
|
||||
authors = ["Stephane.Carrez@gmail.com"]
|
||||
maintainers = ["Stephane.Carrez@gmail.com"]
|
||||
maintainers-logins = ["stcarrez"]
|
||||
licenses = "Apache-2.0"
|
||||
website = "https://gitlab.com/stcarrez/ada-libsecret"
|
||||
tags = ["secret", "bindings"]
|
||||
|
||||
[gpr-externals]
|
||||
SECRETADA_BUILD = ["distrib", "debug", "optimize", "profile", "coverage"]
|
||||
SECRETADA_LIBRARY_TYPE = ["relocatable", "static", "static-pic"]
|
||||
|
||||
[available.'case(os)']
|
||||
linux = true
|
||||
'...' = false
|
||||
|
||||
[[depends-on]]
|
||||
libglib = "*"
|
||||
libsecret = "*"
|
||||
|
||||
[configuration]
|
||||
disabled = true
|
||||
|
||||
[origin]
|
||||
commit = "6f859734729cb7720c0e82f45be3808a87a7ccfa"
|
||||
url = "git+https://github.com/stcarrez/ada-libsecret.git"
|
||||
|
||||
Reference in New Issue
Block a user