summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuis Martinez2022-01-04 13:59:57 -0600
committerLuis Martinez2022-01-04 13:59:57 -0600
commitf285a21af2013896b766b1c9274e29dee6198688 (patch)
tree0e62a421aaf4c87150514df25cad529e092d1c35
downloadaur-f285a21af2013896b766b1c9274e29dee6198688.tar.gz
initial commit
-rw-r--r--.SRCINFO16
-rw-r--r--CHANGES.md34
-rw-r--r--PKGBUILD35
3 files changed, 85 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..eed120338f98
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = mintotp
+ pkgdesc = Minimal TOTP generator
+ pkgver = 0.3.0
+ pkgrel = 1
+ url = https://github.com/susam/mintotp
+ changelog = CHANGES.md
+ arch = any
+ license = MIT
+ checkdepends = python-mock
+ makedepends = python-setuptools
+ depends = python
+ provides = python-mintotp
+ source = mintotp-0.3.0.tar.gz::https://github.com/susam/mintotp/archive/0.3.0.tar.gz
+ sha256sums = 38bfac7187eaa61dd557773dc9fe1bd465ce5d5e4587b9b91652085860ddaefd
+
+pkgname = mintotp
diff --git a/CHANGES.md b/CHANGES.md
new file mode 100644
index 000000000000..9ddb29d77405
--- /dev/null
+++ b/CHANGES.md
@@ -0,0 +1,34 @@
+Changelog
+=========
+
+0.3.0 (2021-02-15)
+------------------
+
+### Changed
+
+- Use `str.zfill` instead of `str.rjust` for adding leading zeros.
+
+
+0.2.0 (2019-08-13)
+------------------
+
+### Added
+
+- Add license information in package metadata.
+- Add `digits` and `digest` to `totp()` parameter list.
+- Add command line arguments for time-step, digits, and digest.
+
+### Changed
+
+- Rename `secret` to `key` in `hotp()` and `totp()` parameter lists.
+- Rename `interval` to `time_step` in `totp()` parameter list.
+
+
+0.1.0 (2019-08-12)
+------------------
+
+### Added
+
+- Add a minimal TOTP generator.
+- Expose `hotp()` and `totp()` as module-level functions.
+- Add project documentation.
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..6232a6e73944
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,35 @@
+# Maintainer: Luis Martinez <luis dot martinez at disroot dot org>
+
+pkgname=mintotp
+pkgver=0.3.0
+pkgrel=1
+pkgdesc="Minimal TOTP generator"
+arch=('any')
+url="https://github.com/susam/mintotp"
+license=('MIT')
+depends=('python')
+makedepends=('python-setuptools')
+checkdepends=('python-mock')
+provides=('python-mintotp')
+changelog=CHANGES.md
+source=("$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz")
+sha256sums=('38bfac7187eaa61dd557773dc9fe1bd465ce5d5e4587b9b91652085860ddaefd')
+validpgpkeys=()
+
+build() {
+ cd "$pkgname-$pkgver"
+ python setup.py build
+}
+
+check() {
+ cd "$pkgname-$pkgver"
+ python -m unittest
+}
+
+package() {
+ export PYTHONHASHSEED=0
+ cd "$pkgname-$pkgver"
+ python setup.py install --root="$pkgdir/" --optimize=1 --skip-build
+ install -Dm644 LICENSE.md "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ install -Dm644 README.md -t "$pkgdir/usr/share/doc/$pkgname/"
+}