Skip to content

Commit

Permalink
cargo-rpm: Initial crate with "cargo rpm init" command
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tony-iqlusion committed Apr 16, 2018
1 parent 319d4b4 commit 7cfa803
Show file tree
Hide file tree
Showing 16 changed files with 1,145 additions and 19 deletions.
163 changes: 163 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[workspace]
members = [
"canonical-path",
"cargo-rpm",
"iq-cli",
"rpmlib",
"rpmlib-sys",
Expand Down
40 changes: 40 additions & 0 deletions cargo-rpm/.rpm/cargo-rpm.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
%define __spec_install_post %{nil}
%define __os_install_post %{_dbpath}/brp-compress
%define debug_package %{nil}

Name: cargo-rpm
Summary: Build RPMs from Rust projects using Cargo
Version: @@VERSION@@ # Set automatically by "cargo rpm build"
Release: 1
License: ASL 2.0
Group: Applications/System
Source0: %{name}-%{version}.tar.gz
URL: https://github.com/iqlusion-io/crates/

BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root

%description
%{summary}

%prep
%setup -q

%build
# Empty section.

%install
rm -rf %{buildroot}
mkdir -p %{buildroot}

# in builddir
cp -a * %{buildroot}

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
%config(noreplace) %{_sysconfdir}/*
${_bindir}/*
%{_sbindir}/*

25 changes: 25 additions & 0 deletions cargo-rpm/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[package]
name = "cargo-rpm"
description = "Build RPMs from Rust projects using Cargo"
version = "0.0.0" # Also update html_root_url in lib.rs when bumping this
authors = ["Tony Arcieri <tony@iqlusion.io>"]
license = "Apache-2.0"
homepage = "https://github.com/iqlusion-io/crates/"
repository = "https://github.com/iqlusion-io/crates/tree/master/cargo-rpm"
readme = "README.md"
categories = ["command-line-utilities", "development-tools"]
keywords = ["rpm", "cargo", "package", "release"]

[dependencies]
failure = "0.1"
gumdrop = "0.4"
gumdrop_derive = "0.4"
handlebars = "1.0.0-beta.1"
iq-cli = { version = "0", path = "../iq-cli" }
lazy_static = "1"
serde = "1"
serde_derive = "1"
toml = "0.4"

[package.metadata.rpm.target]
cargo-rpm = { path = "/usr/bin/cargo-rpm" }
Loading

0 comments on commit 7cfa803

Please sign in to comment.