summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7f0d87e8627725f197adec37e627e1681b1ea314 (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: Caleb Maclennan <caleb@alerque.com>
# Maintainer: Triangulum Labs <triangulumlabs@gmail.com>
# Contributor: FrozenCow <frozencow@gmail.com>

pkgname=libusrsctp-git
pkgver=0.9.5.0.r231.gc4b52c3
pkgrel=1
pkgdesc='A portable SCTP userland stack'
arch=(x86_64 i686)
url='https://github.com/sctplab/usrsctp'
license=(BSD)
makedepends=(cmake git)
conflicts=("${pkgname%-git}" usrsctp-git)
provides=("${pkgname%-git}=$pkgver" usrsctp-git)
replaces=(usrsctp-git)
options=(!lto)
source=("$pkgname::git+$url.git")
sha256sums=('SKIP')

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

build() {
	cd "$pkgname"
	unset CPPFLAGS
	export CFLAGS="$CFLAGS -fPIC"
	cmake \
		-DCMAKE_INSTALL_PREFIX=/usr \
		.
	make
}

package() {
	cd "$pkgname"
	make DESTDIR="$pkgdir/" install
	install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE.md
}