summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4305bf21132687dfa9541aeaa48cb2c1cc02efdf (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
# Maintainer: gilcu3 <gilcu3 at gmail dot com>

_pkgname=conf2struct
pkgname=$_pkgname-git
pkgver=1.5.r0.g6bc9eed
pkgrel=1
pkgdesc="conf2struct takes a configuration file that describes a configuration file in the libconfig format, and generates a C parser that will read a configuration file directly into a C structure"
arch=('i686' 'x86_64')
url='https://www.rutschle.net/tech/conf2struct/README.html'
license=('GPL2')
depends=('libconfig' 'perl' 'perl-conf-libconfig')
makedepends=('git' 'libconfig' 'perl-conf-libconfig' 'pcre2' 'perl')
provides=($_pkgname)
conflicts=($_pkgname)
source=($pkgname::"git+https://github.com/yrutschle/${_pkgname}.git")
md5sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
  cd $pkgname
}

build() {
  cd $pkgname
  make
}

package() {
  # Executables
  install -Dm755 $srcdir/$pkgname/${_pkgname} "$pkgdir/usr/bin/${_pkgname}"
  # install -Dm755 $srcdir/$pkgname/confcheck "$pkgdir/usr/bin/confcheck"
}