# Contributor: Jakub Jirutka # Maintainer: Jakub Jirutka pkgname=meilisearch pkgver=0.29.2 pkgrel=0 pkgdesc="A lightning-fast search engine that fits into your apps, websites and workflow" url="https://www.meilisearch.com/" # ppc64le, s390x: fails to build ring crate # riscv64: blocked by rust arch="all !ppc64le !riscv64 !s390x" license="MIT" makedepends=" cargo libgit2-dev lmdb-dev mimalloc2-dev " pkgusers="meilisearch" pkggroups="meilisearch" install="$pkgname.pre-install" subpackages="$pkgname-openrc" source="https://github.com/meilisearch/meilisearch/archive/v$pkgver/meilisearch-$pkgver.tar.gz tokenizer-flags.patch update-lmdb-rkv-sys.patch syslog.patch $pkgname.initd $pkgname.confd " options="!check" # FIXME: tests are broken? export CARGO_PROFILE_RELEASE_OPT_LEVEL=2 # Disable analytics (telemetry / data collection), mini-dashboard (JS project) # and specialized tokenizers (they are huge). _cargo_opts="--frozen --no-default-features" export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse" prepare() { default_prepare # Rust target triple. local target=$(rustc -vV | sed -n 's/host: //p') # Build against system-provided mimalloc. mkdir -p .cargo cat >> .cargo/config.toml <<-EOF [target.$target] mimalloc = { rustc-link-lib = ["mimalloc"] } EOF cargo fetch --target="$CTARGET" --locked } build() { cargo build $_cargo_opts --release } check() { cargo test $_cargo_opts --workspace } package() { install -D -m755 target/release/$pkgname -t "$pkgdir"/usr/bin/ install -D -m755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname install -D -m644 "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname install -d -m755 -o "$pkgusers" -g "$pkggroups" "$pkgdir"/var/lib/$pkgname } sha512sums=" 8a74d84020e906eeb062c4335a7d177798c35d7fafe5870af28dc6bc4985e4dd9b505ed2420673f34edab3462cd0743955337d374a195b2f9bfe4bd38638da65 meilisearch-0.29.2.tar.gz 87073b9f89c655c59e45b040035ff45fed31761c3116e4763d97e657a6e6361c346d11e3bd0dd1c89ef2a75c7d56198f700803b89884edccfc4638402b7e8679 tokenizer-flags.patch 56232bbe1990049f7718453257cb0be2f484ac544348042261ddc924924344d1e67d74c3315375900079d5900cb8ebfa5818418cf472e9bd847d91f9b6d09809 update-lmdb-rkv-sys.patch 2bdd3d12a23186981c84f03486d1b625c3f5e655e94f1a3f6296b03cab7e5f3729b771800411d00f37bb956f7686023fe4fd125b8b78c2599b5c26dfcdfa1709 syslog.patch a04dbf28cf82ed4db71b0aa4d78714fdccc3d8113b8f49ed218181353d5c7349e4734d20e93179ae27c19d7ec690271f6e2b994ed3f883c1df0591cbb1988bac meilisearch.initd d837da26f39ee7dc74a58a5b3e27f0ed8a9971f2c97d77519b3183d0869e2ec5a5d8da167ee8442645e0b65e1e97a5e634e7146021ac8c586ff53b0ca130dde2 meilisearch.confd "