summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin Harrison2017-06-25 11:30:38 -0400
committerJustin Harrison2017-06-25 11:30:38 -0400
commita5a01e06ebdca204279289a1c16c9ebd23e2c41c (patch)
tree919492b4f3fe359a4f8f827a65d8bafe159cdd85
downloadaur-a5a01e06ebdca204279289a1c16c9ebd23e2c41c.tar.gz
Initial commit
-rw-r--r--.SRCINFO13
-rw-r--r--PKGBUILD28
2 files changed, 41 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..76a380ddfa1
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,13 @@
+pkgbase = diceware-gen
+ pkgver = 0.2.2
+ pkgrel = 1
+ url = https://gitlab.com/jmatthin/diceware-gen
+ arch = i686
+ arch = x86_64
+ license = MIT
+ depends = rust
+ source = diceware-gen-0.2.2.tar.gz::https://gitlab.com/jmatthin/diceware-gen/repository/archive.tar.gz?ref=0.2.2
+ sha512sums = 668ea749b3841b9a3cc265fe1ff186950b8fcb141d6e824e5fd44d662d233bedc6b4bd6d0584bda35a4d22d9b47c7251b94190dd53a33a6df513964fec120d09
+
+pkgname = diceware-gen
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..ff2c07bfc7f
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,28 @@
+# Maintainer: Justin Harrison <me@justinharrison.ca>
+
+pkgname=diceware-gen
+pkgver=0.2.2
+pkgrel=1
+arch=("i686" "x86_64")
+url="https://gitlab.com/jmatthin/${pkgname}"
+license=("MIT")
+depends=("rust")
+source=("${pkgname}-${pkgver}.tar.gz::${url}/repository/archive.tar.gz?ref=${pkgver}")
+sha512sums=("668ea749b3841b9a3cc265fe1ff186950b8fcb141d6e824e5fd44d662d233bedc6b4bd6d0584bda35a4d22d9b47c7251b94190dd53a33a6df513964fec120d09")
+
+prepare() {
+ # GitLab appends the archive with a sequence of characters, this is needed to remove that
+ # sequence. It's pretty ugly, but I don't know of a better, simpler way.
+ mkdir -p "${pkgname}-${pkgver}" && tar -xf "${pkgname}-${pkgver}.tar.gz" --directory "${pkgname}-${pkgver}" --strip-components=1
+}
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ cargo build --release
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ install -D -m 755 "target/release/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
+ install -D -m 755 eff_large_wordlist.txt "${pkgdir}/usr/share/diceware-gen/eff_large_wordlist.txt"
+}