Skip to content

Commit 7cfa803

Browse files
committed
cargo-rpm: Initial crate with "cargo rpm init" command
Adds a "cargo rpm" subcommand which builds RPM releases of Rust projects. Well... not just yet, but "cargo rpm build" will do that, and this PR was already getting pretty unwieldy. In an act of inception, this project is already "cargo rpm init"-ed.
1 parent 319d4b4 commit 7cfa803

16 files changed

+1145
-19
lines changed

Cargo.lock

Lines changed: 163 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[workspace]
22
members = [
33
"canonical-path",
4+
"cargo-rpm",
45
"iq-cli",
56
"rpmlib",
67
"rpmlib-sys",

cargo-rpm/.rpm/cargo-rpm.spec

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
%define __spec_install_post %{nil}
2+
%define __os_install_post %{_dbpath}/brp-compress
3+
%define debug_package %{nil}
4+
5+
Name: cargo-rpm
6+
Summary: Build RPMs from Rust projects using Cargo
7+
Version: @@VERSION@@ # Set automatically by "cargo rpm build"
8+
Release: 1
9+
License: ASL 2.0
10+
Group: Applications/System
11+
Source0: %{name}-%{version}.tar.gz
12+
URL: https://github.com/iqlusion-io/crates/
13+
14+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
15+
16+
%description
17+
%{summary}
18+
19+
%prep
20+
%setup -q
21+
22+
%build
23+
# Empty section.
24+
25+
%install
26+
rm -rf %{buildroot}
27+
mkdir -p %{buildroot}
28+
29+
# in builddir
30+
cp -a * %{buildroot}
31+
32+
%clean
33+
rm -rf %{buildroot}
34+
35+
%files
36+
%defattr(-,root,root,-)
37+
%config(noreplace) %{_sysconfdir}/*
38+
${_bindir}/*
39+
%{_sbindir}/*
40+

cargo-rpm/Cargo.toml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
[package]
2+
name = "cargo-rpm"
3+
description = "Build RPMs from Rust projects using Cargo"
4+
version = "0.0.0" # Also update html_root_url in lib.rs when bumping this
5+
authors = ["Tony Arcieri <[email protected]>"]
6+
license = "Apache-2.0"
7+
homepage = "https://github.com/iqlusion-io/crates/"
8+
repository = "https://github.com/iqlusion-io/crates/tree/master/cargo-rpm"
9+
readme = "README.md"
10+
categories = ["command-line-utilities", "development-tools"]
11+
keywords = ["rpm", "cargo", "package", "release"]
12+
13+
[dependencies]
14+
failure = "0.1"
15+
gumdrop = "0.4"
16+
gumdrop_derive = "0.4"
17+
handlebars = "1.0.0-beta.1"
18+
iq-cli = { version = "0", path = "../iq-cli" }
19+
lazy_static = "1"
20+
serde = "1"
21+
serde_derive = "1"
22+
toml = "0.4"
23+
24+
[package.metadata.rpm.target]
25+
cargo-rpm = { path = "/usr/bin/cargo-rpm" }

0 commit comments

Comments
 (0)