Commit graph

11 commits

Author SHA1 Message Date
Igor Gnatenko
a254693cde Revert "macros: move Cargo.toml.orig inplace"
Somehow this doesn't really work. No time for investigation.

This reverts commit fc12436f25.
2017-02-25 21:51:08 +01:00
Igor Gnatenko
86d06ae613 macros: strip all dev-dependencies sections
Even [dev-dependencies.foo].

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2017-02-25 21:45:24 +01:00
Igor Gnatenko
fc12436f25 macros: move Cargo.toml.orig inplace
cargo package -l lists Cargo.toml.orig and we're installing it anyway,
so let's just do mv -f instead of doing new install.

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2017-02-25 19:21:40 +01:00
Igor Gnatenko
f487983d6c use rich dependencies to fullfill requirements
Imagine, that:
* A requires 0.6.0 <= X < 0.7.0
* B requires 0.9.0 <= X < 0.10.0
* C requires A and B

If we use Requires + Conflicts, then we just can't build or install
C, because sub-dependencies are conflicting between each other.

Proper syntax is: (X >= 0.6.0 with X < 0.7.0)

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2017-02-25 10:02:05 +01:00
Igor Gnatenko
e834debc6a add support for proc-macro kind
Closes: https://pagure.io/fedora-rust/rust2rpm/issue/19
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2017-02-18 19:53:08 +01:00
Igor Gnatenko
d4334a2ee7 macros: automatically strip dev-dependencies
All background written in upstream cargo GitHub issue[0].

In short, cargo build/install enforces us to have all dev-dependencies
even they are not used for building/installed.

[0] https://github.com/rust-lang/cargo/issues/3732

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2017-02-18 16:10:50 +01:00
Igor Gnatenko
ee68fab15b macros: don't define %cargo_build/test as functions
There are only problems from this.

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2017-02-18 02:25:21 +01:00
Igor Gnatenko
2fbb50e1dc distribute rust2rpm in PyPI via setuptools
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2017-02-12 11:35:45 +01:00
Igor Gnatenko
c12df7d085 %cargo_install is now smart to handle libs and bins
So far we had %cargo_install (for binaries) and %cargo_install_crate
(for libraries) which is a bit awkward and requires us to put
additional arguments for latter one.

We can do all the magic behind the scene.

Closes: https://pagure.io/fedora-rust/rust2rpm/issue/7
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2017-02-10 22:17:45 +01:00
Igor Gnatenko
0038452903 Makefile: install cargodeps without extension
Otherwise RPM bytecompile script will try to create bytecompiled
code and will fail.

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2017-02-05 22:48:41 +01:00
Igor Gnatenko
74beb9388f move RPM stuff into subdirectory
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2017-02-05 18:15:28 +01:00