summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3965be5a8400a1b314d9927dc7d4bcf9e07146ff (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
# Maintainer: mozi1924 <mozi1924@arasaka.ltd>
pkgname=natmap-git
pkgver=20240813r1.g8ebb953
pkgrel=1
pkgdesc="TCP/UDP port mapping for full cone NAT"
arch=('any')
url="https://github.com/heiher/natmap"
license=('MIT')
depends=('glibc')
makedepends=('git' 'make')
provides=('natmap')
conflicts=('natmap')

source=("${pkgname}::git+https://github.com/heiher/natmap.git")
md5sums=('SKIP')

prepare() {
    cd "$srcdir/$pkgname"
    # Recursively initialize submodules
    git submodule update --init --recursive
}

pkgver() {
    cd "$srcdir/$pkgname"
    git describe --long --tags | sed 's/^v//;s/-/r/;s/-/./g'
}

build() {
    cd "$srcdir/$pkgname"
    make
}

package() {
    cd "$srcdir/$pkgname"
    install -Dm755 bin/natmap "$pkgdir/usr/bin/natmap"
    install -Dm644 License "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

# vim:set ts=2 sw=2 et: