-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathPKGBUILD
40 lines (35 loc) · 1013 Bytes
/
PKGBUILD
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 <[email protected]>
# Contributor: fmount
pkgname=('c_otp')
_pkgname="c_otp"
packager="fmount"
pkgver=v1.1
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+https://github.com/fmount/${pkgname}.git#tag=${pkgver}")
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"
}