diff options
author | Skycoder42 | 2019-03-28 00:10:00 +0100 |
---|---|---|
committer | Skycoder42 | 2019-03-28 00:10:00 +0100 |
commit | 4d56497c51c17d5bdfe7c3a4a30b4f7d53d762d7 (patch) | |
tree | b6d44b25e8b115829fddd5cc34e1a530e192319e | |
download | aur-4d56497c51c17d5bdfe7c3a4a30b4f7d53d762d7.tar.gz |
create package
-rw-r--r-- | .SRCINFO | 23 | ||||
-rw-r--r-- | PKGBUILD | 72 |
2 files changed, 95 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..4c3290750bbf --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,23 @@ +pkgbase = libcorrect-git + pkgdesc = C library for Convolutional codes and Reed-Solomon + pkgver = r115.f5a28c7 + pkgrel = 1 + url = https://github.com/quiet/libcorrect + arch = x86_64 + arch = aarch64 + license = BSD + makedepends = git + makedepends = cmake + provides = libcorrect + conflicts = libcorrect + source = git+https://github.com/quiet/libcorrect.git + sha256sums = SKIP + +pkgname = libcorrect-git + +pkgname = libcorrect-compat-git + provides = libcorrect + provides = libfec + conflicts = libcorrect + conflicts = libfec + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..5ec15064fd7d --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,72 @@ +# Maintainer: Skycoder42 <skycoder42.de@gmx.de> +_pkgbase=libcorrect +pkgbase=$_pkgbase-git +pkgname=($pkgbase $_pkgbase-compat-git) +pkgver=r115.f5a28c7 +pkgrel=1 +pkgdesc="C library for Convolutional codes and Reed-Solomon" +arch=('x86_64' 'aarch64') +url="https://github.com/quiet/libcorrect" +license=('BSD') +makedepends=('git' 'cmake') +provides=('libcorrect') +conflicts=('libcorrect') +source=("git+$url.git") +sha256sums=('SKIP') + +pkgver() { + cd "$_pkgbase" + ( set -o pipefail + git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' || + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + ) +} + +build() { + # build without shim + mkdir -p "$_pkgbase/build" + cd "$_pkgbase/build" + + cmake .. \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_BUILD_TYPE=Release + make + cd ../.. + + # build with shim + mkdir -p "$_pkgbase/build-shim" + cd "$_pkgbase/build-shim" + + cmake .. \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_BUILD_TYPE=Release + make + make shim +} + +#check() { +# cd "$_pkgbase/build" +# make check +# cd ../.. +# cd "$_pkgbase/build-shim" +# make check +#} + +package_libcorrect-git() { + cd "$_pkgbase/build" + make DESTDIR="$pkgdir" install + + cd .. + install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$_pkgbase/LICENSE" +} + +package_libcorrect-compat-git() { + provides=('libcorrect' 'libfec') + conflicts=('libcorrect' 'libfec') + + cd "$_pkgbase/build-shim" + make DESTDIR="$pkgdir" install + + cd .. + install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$_pkgbase/LICENSE" +} |