archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / codec2 / repos / community-x86_64 / PKGBUILD
blobf813becd4ce76c0140d89f6913d4ea3506b9886f
1 # Maintainer: Filipe LaĆ­ns (FFY00) <lains@archlinux.org>
2 # Maintainer: Daniel Bermond <dbermond@archlinux.org>
4 pkgname=codec2
5 pkgver=1.0.5
6 pkgrel=1
7 epoch=1
8 pkgdesc='Open source speech codec designed for communications quality speech between 450 and 3200 bit/s'
9 arch=('x86_64')
10 license=('LGPL2.1')
11 url='https://github.com/drowe67/codec2'
12 makedepends=('cmake')
13 provides=('freedv')
14 conflicts=('freedv')
15 source=("$url/archive/v$pkgver/$pkgname-$pkgver.tar.gz")
16 sha512sums=('692feea8ff99430a7ed8efa5bf48a633dc9689b1f39009cf1f907315e600da26ea3787a994b51d7ca9d4cbc8b8c9b26f89031af899f114fa130f0703266a6b17')
18 build() {
19   cmake -B build -S $pkgname-$pkgver \
20         -DCMAKE_BUILD_TYPE=Release \
21         -DCMAKE_INSTALL_PREFIX=/usr \
22         -DCMAKE_SKIP_RPATH=YES \
23         -Wno-dev
25   make -C build
28 package() {
29   make -C build DESTDIR="$pkgdir" install
30   
31   local _bin
32   while read -r -d '' _bin
33   do
34       install -D -m755 "$_bin" -t "$pkgdir/usr/bin"
35   done < <(find build -type f -regextype posix-extended \
36            -regex '.*/(c2(demo|dec|enc|sim)|ch|freedv_(t|r)x|(cohpsk|fdmdv|fsk|ldpc|ofdm)_.*)' \
37            -executable -print0)
38   mv "$pkgdir/usr/bin"/{ch,c2ch}