diff --git a/.rpm/s3rename.spec b/.rpm/s3rename.spec new file mode 100644 index 0000000..5e76c3f --- /dev/null +++ b/.rpm/s3rename.spec @@ -0,0 +1,32 @@ +%define __spec_install_post %{nil} +%define __os_install_post %{_dbpath}/brp-compress +%define debug_package %{nil} + +Name: s3rename +Summary: Tool to mass-rename S3 keys +Version: @@VERSION@@ +Release: @@RELEASE@@%{?dist} +License: MIT or ASL 2.0 +Group: Applications/System +Source0: %{name}-%{version}.tar.gz +URL: https://github.com/jamesmcm/s3rename + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root + +%description +%{summary} + +%prep +%setup -q + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot} +cp -a * %{buildroot} + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root,-) +%{_bindir}/* diff --git a/Cargo.toml b/Cargo.toml index 0301f55..ed4f189 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,3 +26,12 @@ num-traits = "0.2" log = "0.4" fern = "0.6" chrono = "0.4" + +[package.metadata.rpm] +package = "s3rename" + +[package.metadata.rpm.cargo] +buildflags = ["--release"] + +[package.metadata.rpm.targets] +s3rename = { path = "/usr/bin/s3rename" }