summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0bf577ed8c0cb8b4172bc8897c46a8ddb7a169bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Maintainer: Francesco Pantano <fmount9@autistici.org>
# Contributor: fmount

pkgname=('c_otp')
_pkgname="c_otp"
packager="fmount"
pkgver=v1.0
pkgrel=1
bindir=usr/bin
pkgdesc="HOTP / TOTP pure C implementation"
url="htps://github.com/fmount/${pkgname}.git"
arch=('i686' 'x86_64')
license=('MIT')
depends=('openssl')
source=("git://github.com/fmount/${pkgname}.git")
md5sums=('SKIP')

pkgver() {
    cd $_pkgname || exit -1
    git describe --tags | sed 's/-/./g'
}

prepare() {
    cd "$_pkgname" || exit -1
}

build() {
  echo "Start building $_pkgname"
  cd "${srcdir}/$_pkgname" || exit -1
  echo -e "c_otp: $pkgver" > PKG-INFO
  make
}

package() {
  cd "${srcdir}"/$_pkgname/$bindir || exit -1
  echo "Copy ${srcdir}/$_pkgname/$bindir/$_pkgname $bindir"
  #make PREFIX="$pkgdir"/usr DESTDIR="$pkgdir" install
  install -Dm755 ${srcdir}/$_pkgname/$bindir/$_pkgname "$pkgdir/$bindir/$_pkgname"
  install -m644 -D ${srcdir}/$_pkgname/LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}