aports/testing/clsync/APKBUILD
Jakub Jirutka 92dfc369f0 testing/clsync: build only for x86 and x86_64
Build failed on armhf and aarch64 with:

In file included from privileged.c:64:0:
privileged.c:88:34: error: '__NR_alarm' undeclared here (not in a function)
  BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, __NR_##syscall, 0, 1), \
                                  ^
privileged.c:94:2: note: in expansion of macro 'SECCOMP_ALLOW_ACCUM_SYSCALL'
  SECCOMP_ALLOW_ACCUM_SYSCALL(alarm),    \
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~
privileged.c:142:2: note: in expansion of macro 'FILTER_TABLE_NONPRIV'
  FILTER_TABLE_NONPRIV
  ^~~~~~~~~~~~~~~~~~~~
privileged.c:88:34: error: '__NR_select' undeclared here (not in a function)
  BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, __NR_##syscall, 0, 1), \
                                  ^
privileged.c:107:2: note: in expansion of macro 'SECCOMP_ALLOW_ACCUM_SYSCALL'
  SECCOMP_ALLOW_ACCUM_SYSCALL(select),    \
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~
privileged.c:142:2: note: in expansion of macro 'FILTER_TABLE_NONPRIV'
  FILTER_TABLE_NONPRIV
  ^~~~~~~~~~~~~~~~~~~~
privileged.c:88:34: error: '__NR_mmap' undeclared here (not in a function)
  BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, __NR_##syscall, 0, 1), \
                                  ^
privileged.c:134:2: note: in expansion of macro 'SECCOMP_ALLOW_ACCUM_SYSCALL'
  SECCOMP_ALLOW_ACCUM_SYSCALL(mmap),    \
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~
privileged.c:143:2: note: in expansion of macro 'FILTER_TABLE_ARCHDEPENDED'
  FILTER_TABLE_ARCHDEPENDED
  ^~~~~~~~~~~~~~~~~~~~~~~~~
privileged.c:88:34: error: initializer element is not constant
  BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, __NR_##syscall, 0, 1), \
                                  ^
privileged.c:94:2: note: in expansion of macro 'SECCOMP_ALLOW_ACCUM_SYSCALL'
  SECCOMP_ALLOW_ACCUM_SYSCALL(alarm),    \
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~
privileged.c:148:2: note: in expansion of macro 'FILTER_TABLE_NONPRIV'
  FILTER_TABLE_NONPRIV
  ^~~~~~~~~~~~~~~~~~~~
privileged.c:88:34: note: (near initialization for 'filter_w_mprotect_table[5].k')
  BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, __NR_##syscall, 0, 1), \
                                  ^
privileged.c:94:2: note: in expansion of macro 'SECCOMP_ALLOW_ACCUM_SYSCALL'
  SECCOMP_ALLOW_ACCUM_SYSCALL(alarm),    \
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~
privileged.c:148:2: note: in expansion of macro 'FILTER_TABLE_NONPRIV'
  FILTER_TABLE_NONPRIV
  ^~~~~~~~~~~~~~~~~~~~
privileged.c:88:34: error: initializer element is not constant
  BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, __NR_##syscall, 0, 1), \
                                  ^
privileged.c:107:2: note: in expansion of macro 'SECCOMP_ALLOW_ACCUM_SYSCALL'
  SECCOMP_ALLOW_ACCUM_SYSCALL(select),    \
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~
privileged.c:148:2: note: in expansion of macro 'FILTER_TABLE_NONPRIV'
  FILTER_TABLE_NONPRIV
  ^~~~~~~~~~~~~~~~~~~~
privileged.c:88:34: note: (near initialization for 'filter_w_mprotect_table[31].k')
  BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, __NR_##syscall, 0, 1), \
                                  ^
privileged.c:107:2: note: in expansion of macro 'SECCOMP_ALLOW_ACCUM_SYSCALL'
  SECCOMP_ALLOW_ACCUM_SYSCALL(select),    \
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~
privileged.c:148:2: note: in expansion of macro 'FILTER_TABLE_NONPRIV'
  FILTER_TABLE_NONPRIV
  ^~~~~~~~~~~~~~~~~~~~
privileged.c:88:34: error: initializer element is not constant
  BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, __NR_##syscall, 0, 1), \
                                  ^
privileged.c:134:2: note: in expansion of macro 'SECCOMP_ALLOW_ACCUM_SYSCALL'
  SECCOMP_ALLOW_ACCUM_SYSCALL(mmap),    \
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~
privileged.c:149:2: note: in expansion of macro 'FILTER_TABLE_ARCHDEPENDED'
  FILTER_TABLE_ARCHDEPENDED
  ^~~~~~~~~~~~~~~~~~~~~~~~~
privileged.c:88:34: note: (near initialization for 'filter_w_mprotect_table[59].k')
  BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, __NR_##syscall, 0, 1), \
                                  ^
privileged.c:134:2: note: in expansion of macro 'SECCOMP_ALLOW_ACCUM_SYSCALL'
  SECCOMP_ALLOW_ACCUM_SYSCALL(mmap),    \
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~
privileged.c:149:2: note: in expansion of macro 'FILTER_TABLE_ARCHDEPENDED'
  FILTER_TABLE_ARCHDEPENDED
  ^~~~~~~~~~~~~~~~~~~~~~~~~
2016-10-30 02:29:29 +02:00

60 lines
2.0 KiB
Plaintext

# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=clsync
pkgver=0.4.2
pkgrel=0
pkgdesc="File live sync daemon based on inotify"
url="https://github.com/xaionaro/clsync"
arch="x86 x86_64"
license="GPLv3+"
depends=""
depends_dev="glib-dev fts-dev libcap-dev libexecinfo-dev linux-headers musl-dev"
makedepends="$depends_dev autoconf automake file libtool"
subpackages="$pkgname-doc $pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/xaionaro/$pkgname/archive/v$pkgver.tar.gz
musl-fix.patch
pthread_setname_np.patch"
builddir="$srcdir/$pkgname-$pkgver"
prepare() {
default_prepare || return 1
cd "$builddir"
autoreconf -i && ./configure
}
build() {
cd "$builddir"
./configure \
CFLAGS="$CFLAGS -lfts -lexecinfo" \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--localstatedir=/var \
--enable-capabilities \
--enable-seccomp \
--disable-debug \
|| return 1
make || return 1
}
package() {
cd "$builddir"
make DESTDIR="$pkgdir" install || return 1
rm "$pkgdir"/usr/bin/gencompilerflags
}
md5sums="1167b1a3779ac9ce23c3a65091551654 clsync-0.4.2.tar.gz
6d601e7ddcd6b04b1da8db8954d958b3 musl-fix.patch
da964d1b6cb2471b6f46b7099cf8401b pthread_setname_np.patch"
sha256sums="1af63b86c1d0bd663311f2129792446dc8fc4def5559f76658b51b69a8d0c3bd clsync-0.4.2.tar.gz
73c9edc647c1ccec782a24fc1cebde9061087afb92768c18617740c37acf8fc7 musl-fix.patch
e26d72e1ebc25f9b38ffcec3ced6b37ef5fe5da5825947856b2a3fab0821d86a pthread_setname_np.patch"
sha512sums="d14a2efc4bf58d9d5c7a3fe5634cacdd182cd7cd814b0e9ebd99024a7282b056d1f7ceeec6903666391c3572d599a18e205af818b098ed7768d5c0e0f4cd1200 clsync-0.4.2.tar.gz
98e81408911731f6e203368094ea0e9eda312648eef8c5beec98b13c6ee43bccee59f0777805bea4d26cbe4e964d2ff95fe863be5be7750b50358d213f106542 musl-fix.patch
da65cfb7182fa1509c77d7da43132c1f8b4911acb819d90aaab88c78d35167c85c0f23259bb78983fdab8217c43ba93b6b21267ab96c7fdf4723878a800fe414 pthread_setname_np.patch"