Skip to content

Commit

Permalink
sqlx dependency
Browse files Browse the repository at this point in the history
Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
  • Loading branch information
LecrisUT committed Apr 26, 2024
1 parent c728cf0 commit 2c8f77a
Show file tree
Hide file tree
Showing 16 changed files with 1,868 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .packit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,48 @@ packages:
fix-spec-file: []
create-archive: *Create-archive-crate
get-current-version: *Get-Version
rust-sqlx-core:
# https://github.com/launchbadge/sqlx
paths: [ rust-sqlx-core ]
specfile_path: rust-sqlx-core.spec
upstream_package_name: sqlx-core
downstream_package_name: rust-sqlx-core
actions: *Actions-Broken-License
rust-sqlx-macros:
# https://github.com/launchbadge/sqlx
paths: [ rust-sqlx-macros ]
specfile_path: rust-sqlx-macros.spec
upstream_package_name: sqlx-macros
downstream_package_name: rust-sqlx-macros
actions: *Actions-Broken-License
rust-sqlx-mysql:
# https://github.com/launchbadge/sqlx
paths: [ rust-sqlx-mysql ]
specfile_path: rust-sqlx-mysql.spec
upstream_package_name: sqlx-mysql
downstream_package_name: rust-sqlx-mysql
actions: *Actions-Broken-License
rust-sqlx-postgres:
# https://github.com/launchbadge/sqlx
paths: [ rust-sqlx-postgres ]
specfile_path: rust-sqlx-postgres.spec
upstream_package_name: sqlx-postgres
downstream_package_name: rust-sqlx-postgres
actions: *Actions-Broken-License
rust-sqlx-sqlite:
# https://github.com/launchbadge/sqlx
paths: [ rust-sqlx-sqlite ]
specfile_path: rust-sqlx-sqlite.spec
upstream_package_name: sqlx-sqlite
downstream_package_name: rust-sqlx-sqlite
actions: *Actions-Broken-License
rust-sqlx-macros-core:
# https://github.com/launchbadge/sqlx
paths: [ rust-sqlx-macros-core ]
specfile_path: rust-sqlx-macros-core.spec
upstream_package_name: sqlx-macros-core
downstream_package_name: rust-sqlx-macros-core
actions: *Actions-Broken-License
rust-tiny-bip39:
# https://github.com/maciejhirsz/tiny-bip39/
paths: [ rust-tiny-bip39 ]
Expand All @@ -142,6 +184,17 @@ packages:
upstream_package_name: runtime-format
downstream_package_name: rust-runtime-format
actions: *Actions-Package-NewOrUpdate
rust-futures-intrusive:
# https://github.com/Matthias247/futures-intrusive
paths: [ rust-futures-intrusive ]
specfile_path: rust-futures-intrusive.spec
upstream_package_name: futures-intrusive
downstream_package_name: rust-futures-intrusive
# Patch `criterion` out
actions:
fix-spec-file: []
create-archive: *Create-archive-crate
get-current-version: *Get-Version

# Upstream is working on it:
rust-argon2:
Expand Down
113 changes: 113 additions & 0 deletions rust-futures-intrusive/rust-futures-intrusive.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
# Generated by rust2rpm 26
%bcond_without check
%global debug_package %{nil}

%global crate futures-intrusive

Name: rust-futures-intrusive
Version: 0.5.0
Release: %autorelease
Summary: Futures based on intrusive data structures - for std and no-std environments

License: MIT OR Apache-2.0
URL: https://crates.io/crates/futures-intrusive
Source: %{crates_source}

BuildRequires: cargo-rpm-macros >= 24
# Do downstream crate metadata changes programmatically in %%prep. Since %%prep
# runs before %%generate_buildrequires, we must add the following manually
# rather than generating a dynamic BuildRequires via rust2rpm.toml.
BuildRequires: tomcli

%global _description %{expand:
Futures based on intrusive data structures - for std and no-std
environments.}

%description %{_description}

%package devel
Summary: %{summary}
BuildArch: noarch

%description devel %{_description}

This package contains library source intended for building other packages which
use the "%{crate}" crate.

%files devel
%license %{crate_instdir}/LICENSE-APACHE
%license %{crate_instdir}/LICENSE-MIT
%doc %{crate_instdir}/readme.md
%{crate_instdir}/

%package -n %{name}+default-devel
Summary: %{summary}
BuildArch: noarch

%description -n %{name}+default-devel %{_description}

This package contains library source intended for building other packages which
use the "default" feature of the "%{crate}" crate.

%files -n %{name}+default-devel
%ghost %{crate_instdir}/Cargo.toml

%package -n %{name}+alloc-devel
Summary: %{summary}
BuildArch: noarch

%description -n %{name}+alloc-devel %{_description}

This package contains library source intended for building other packages which
use the "alloc" feature of the "%{crate}" crate.

%files -n %{name}+alloc-devel
%ghost %{crate_instdir}/Cargo.toml

%package -n %{name}+parking_lot-devel
Summary: %{summary}
BuildArch: noarch

%description -n %{name}+parking_lot-devel %{_description}

This package contains library source intended for building other packages which
use the "parking_lot" feature of the "%{crate}" crate.

%files -n %{name}+parking_lot-devel
%ghost %{crate_instdir}/Cargo.toml

%package -n %{name}+std-devel
Summary: %{summary}
BuildArch: noarch

%description -n %{name}+std-devel %{_description}

This package contains library source intended for building other packages which
use the "std" feature of the "%{crate}" crate.

%files -n %{name}+std-devel
%ghost %{crate_instdir}/Cargo.toml

%prep
%autosetup -n %{crate}-%{version} -p1
%cargo_prep
# Do not depend on criterion; it is needed only for benchmarks.
tomcli set Cargo.toml del dev-dependencies.criterion

%generate_buildrequires
%cargo_generate_buildrequires

%build
%cargo_build

%install
%cargo_install

%if %{with check}
%check
# * Tests are using debug_assert!
%cargo_test -- -- --skip if_std::mpmc_channel_tests::try_send_unbuffered_panics --skip local_mpmc_channel_tests::try_send_unbuffered_panics
%endif

%changelog
%autochangelog
14 changes: 14 additions & 0 deletions rust-futures-intrusive/rust2rpm.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[scripts.prep]
post = [
"# Do not depend on criterion; it is needed only for benchmarks.",
"tomcli set Cargo.toml del dev-dependencies.criterion",
]

[tests]
skip = [
"if_std::mpmc_channel_tests::try_send_unbuffered_panics",
"local_mpmc_channel_tests::try_send_unbuffered_panics",
]
comments = [
"Tests are using debug_assert!"
]
Loading

0 comments on commit 2c8f77a

Please sign in to comment.