From 5ba195bd062b393df1c0229832b55807e92e4f66 Mon Sep 17 00:00:00 2001 From: Charlotte Thomas Date: Tue, 21 May 2024 12:58:32 +0200 Subject: [PATCH 1/7] Initialized to use tito. commit spec file add spec file for fedora commit .rpm add copr makefile Initialized to use tito. --- .copr/Makefile | 2 ++ .rpm/mini-calc.spec | 32 ++++++++++++++++++++++++++++++++ .tito/packages/.readme | 3 +++ .tito/tito.props | 6 ++++++ Cargo.toml | 9 +++++++++ 5 files changed, 52 insertions(+) create mode 100644 .copr/Makefile create mode 100644 .rpm/mini-calc.spec create mode 100644 .tito/packages/.readme create mode 100644 .tito/tito.props diff --git a/.copr/Makefile b/.copr/Makefile new file mode 100644 index 0000000..cddf647 --- /dev/null +++ b/.copr/Makefile @@ -0,0 +1,2 @@ +sprm: + cd ../ && cargo rpm build diff --git a/.rpm/mini-calc.spec b/.rpm/mini-calc.spec new file mode 100644 index 0000000..e540f2c --- /dev/null +++ b/.rpm/mini-calc.spec @@ -0,0 +1,32 @@ +%define __spec_install_post %{nil} +%define __os_install_post %{_dbpath}/brp-compress +%define debug_package %{nil} + +Name: mini-calc +Summary: A fully-featured minimalistic configurable rust calculator +Version: @@VERSION@@ +Release: @@RELEASE@@%{?dist} +License: GPLv3+ +Group: Applications/System +Source0: %{name}-%{version}.tar.gz +URL: https://calc.nwa2coco.fr + +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/.tito/packages/.readme b/.tito/packages/.readme new file mode 100644 index 0000000..b9411e2 --- /dev/null +++ b/.tito/packages/.readme @@ -0,0 +1,3 @@ +the .tito/packages directory contains metadata files +named after their packages. Each file has the latest tagged +version and the project's relative directory. diff --git a/.tito/tito.props b/.tito/tito.props new file mode 100644 index 0000000..9f6fd2b --- /dev/null +++ b/.tito/tito.props @@ -0,0 +1,6 @@ +[buildconfig] +builder = tito.builder.Builder +tagger = tito.tagger.VersionTagger +changelog_do_not_remove_cherrypick = 0 +changelog_format = %s (%ae) + diff --git a/Cargo.toml b/Cargo.toml index db06af7..e2f759f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,3 +40,12 @@ pr-run-mode = "plan" [profile.dist] inherits = "release" lto = "thin" + +[package.metadata.rpm] +package = "mini-calc" + +[package.metadata.rpm.cargo] +buildflags = ["--release"] + +[package.metadata.rpm.targets] +mini-calc = { path = "/usr/bin/mini-calc" } From 253352c1b8b162b2a0fd4136679a0a9160c6455d Mon Sep 17 00:00:00 2001 From: Charlotte Thomas Date: Tue, 21 May 2024 13:52:07 +0200 Subject: [PATCH 2/7] move to tito --- .copr/Makefile | 2 -- .rpm/mini-calc.spec => mini-calc.spec | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) delete mode 100644 .copr/Makefile rename .rpm/mini-calc.spec => mini-calc.spec (91%) diff --git a/.copr/Makefile b/.copr/Makefile deleted file mode 100644 index cddf647..0000000 --- a/.copr/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -sprm: - cd ../ && cargo rpm build diff --git a/.rpm/mini-calc.spec b/mini-calc.spec similarity index 91% rename from .rpm/mini-calc.spec rename to mini-calc.spec index e540f2c..573130d 100644 --- a/.rpm/mini-calc.spec +++ b/mini-calc.spec @@ -4,8 +4,8 @@ Name: mini-calc Summary: A fully-featured minimalistic configurable rust calculator -Version: @@VERSION@@ -Release: @@RELEASE@@%{?dist} +Version: 3.0.1 +Release: 3.0.1 License: GPLv3+ Group: Applications/System Source0: %{name}-%{version}.tar.gz From f050d585380c6ddaee29d5f2de966c64c2a83e4f Mon Sep 17 00:00:00 2001 From: Charlotte Thomas Date: Sun, 26 May 2024 14:25:23 +0200 Subject: [PATCH 3/7] revert to clean state --- .tito/packages/.readme | 3 --- .tito/tito.props | 6 ------ mini-calc.spec | 32 -------------------------------- 3 files changed, 41 deletions(-) delete mode 100644 .tito/packages/.readme delete mode 100644 .tito/tito.props delete mode 100644 mini-calc.spec diff --git a/.tito/packages/.readme b/.tito/packages/.readme deleted file mode 100644 index b9411e2..0000000 --- a/.tito/packages/.readme +++ /dev/null @@ -1,3 +0,0 @@ -the .tito/packages directory contains metadata files -named after their packages. Each file has the latest tagged -version and the project's relative directory. diff --git a/.tito/tito.props b/.tito/tito.props deleted file mode 100644 index 9f6fd2b..0000000 --- a/.tito/tito.props +++ /dev/null @@ -1,6 +0,0 @@ -[buildconfig] -builder = tito.builder.Builder -tagger = tito.tagger.VersionTagger -changelog_do_not_remove_cherrypick = 0 -changelog_format = %s (%ae) - diff --git a/mini-calc.spec b/mini-calc.spec deleted file mode 100644 index 573130d..0000000 --- a/mini-calc.spec +++ /dev/null @@ -1,32 +0,0 @@ -%define __spec_install_post %{nil} -%define __os_install_post %{_dbpath}/brp-compress -%define debug_package %{nil} - -Name: mini-calc -Summary: A fully-featured minimalistic configurable rust calculator -Version: 3.0.1 -Release: 3.0.1 -License: GPLv3+ -Group: Applications/System -Source0: %{name}-%{version}.tar.gz -URL: https://calc.nwa2coco.fr - -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}/* From 44d5723a73e22b67d6abafb494287e35236c71a0 Mon Sep 17 00:00:00 2001 From: Charlotte Thomas Date: Sun, 26 May 2024 14:26:02 +0200 Subject: [PATCH 4/7] revert CARGO.TOML --- Cargo.toml | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index d0ab76a..13a3478 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,17 +35,3 @@ installers = ["shell"] targets = ["x86_64-unknown-linux-gnu", "aarch64-apple-darwin", "x86_64-apple-darwin", "x86_64-pc-windows-msvc"] # Publish jobs to run in CI pr-run-mode = "plan" - -# The profile that 'cargo dist' will build with -[profile.dist] -inherits = "release" -lto = "thin" - -[package.metadata.rpm] -package = "mini-calc" - -[package.metadata.rpm.cargo] -buildflags = ["--release"] - -[package.metadata.rpm.targets] -mini-calc = { path = "/usr/bin/mini-calc" } From 61e73907a5cf142278e208218fc3cb28295bb82e Mon Sep 17 00:00:00 2001 From: Charlotte Thomas Date: Sun, 26 May 2024 14:56:03 +0200 Subject: [PATCH 5/7] generate package for debian and fedora --- .copr/Makefile | 3 +++ Cargo.toml | 12 ++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 .copr/Makefile diff --git a/.copr/Makefile b/.copr/Makefile new file mode 100644 index 0000000..900fbd5 --- /dev/null +++ b/.copr/Makefile @@ -0,0 +1,3 @@ +sprm: + cargo generate-rpm + cp target/release/*.rpm . diff --git a/Cargo.toml b/Cargo.toml index 13a3478..201d033 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,3 +35,15 @@ installers = ["shell"] targets = ["x86_64-unknown-linux-gnu", "aarch64-apple-darwin", "x86_64-apple-darwin", "x86_64-pc-windows-msvc"] # Publish jobs to run in CI pr-run-mode = "plan" + +[package.metadata.deb] +name = "mini-calc" +maintainer = "Charlotte Thomas" +copyright = "GPLv3" +license-file = "LICENSE" + +[package.metadata.generate-rpm] +name = "mini-calc" +version = "3.1.0" +license = "GPLv3" +assets = [{source="target/release/mini-calc", dest="/usr/bin/mini-calc", mode = "755"}] From 827983e5e7d114bc4a523cd68c078aa2a9935835 Mon Sep 17 00:00:00 2001 From: Charlotte Thomas Date: Sun, 26 May 2024 15:04:49 +0200 Subject: [PATCH 6/7] s --- Cargo.toml | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 201d033..ea7876e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,6 +23,20 @@ confy = "0.5.1" gnuplot = "0.0.39" serde = { version = "1.0.192", features = ["derive"] } atty = "0.2" + + + +[package.metadata.deb] +name = "mini-calc" +maintainer = "Charlotte Thomas" +copyright = "GPLv3" +license-file = "LICENSE" + +[package.metadata.generate-rpm] +name = "mini-calc" +version = "3.1.0" +license = "GPLv3" +assets = [{source="target/release/mini-calc", dest="/usr/bin/mini-calc", mode = "755"}] # Config for 'cargo dist' [workspace.metadata.dist] # The preferred cargo-dist version to use in CI (Cargo.toml SemVer syntax) @@ -36,14 +50,3 @@ targets = ["x86_64-unknown-linux-gnu", "aarch64-apple-darwin", "x86_64-apple-dar # Publish jobs to run in CI pr-run-mode = "plan" -[package.metadata.deb] -name = "mini-calc" -maintainer = "Charlotte Thomas" -copyright = "GPLv3" -license-file = "LICENSE" - -[package.metadata.generate-rpm] -name = "mini-calc" -version = "3.1.0" -license = "GPLv3" -assets = [{source="target/release/mini-calc", dest="/usr/bin/mini-calc", mode = "755"}] From b19b7cdc2d2cf678d8e5d04a1f24a5215ed28a77 Mon Sep 17 00:00:00 2001 From: Charlotte Thomas Date: Sun, 26 May 2024 15:09:11 +0200 Subject: [PATCH 7/7] fix dist --- Cargo.toml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index ea7876e..8a26713 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,6 +37,7 @@ name = "mini-calc" version = "3.1.0" license = "GPLv3" assets = [{source="target/release/mini-calc", dest="/usr/bin/mini-calc", mode = "755"}] + # Config for 'cargo dist' [workspace.metadata.dist] # The preferred cargo-dist version to use in CI (Cargo.toml SemVer syntax) @@ -50,3 +51,8 @@ targets = ["x86_64-unknown-linux-gnu", "aarch64-apple-darwin", "x86_64-apple-dar # Publish jobs to run in CI pr-run-mode = "plan" +# The profile that 'cargo dist' will build with +[profile.dist] +inherits = "release" +lto = "thin" +