aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjakobst1n <jakob.stendahl@outlook.com>2024-06-11 22:26:48 +0200
committerjakobst1n <jakob.stendahl@outlook.com>2024-06-11 22:26:48 +0200
commitd338982d6020e2b73a0912db048a53157ac7507e (patch)
tree7cb8906c217a7f8adadbe7a0fb9aee29b5723ef8
parentb7184ce25e2ef5a39f2f00d9cbacbf4d72892e85 (diff)
downloadtextgraph-d338982d6020e2b73a0912db048a53157ac7507e.tar.gz
textgraph-d338982d6020e2b73a0912db048a53157ac7507e.zip
Add example spec file
-rw-r--r--packaging/FEDORA/textgraph.spec58
1 files changed, 58 insertions, 0 deletions
diff --git a/packaging/FEDORA/textgraph.spec b/packaging/FEDORA/textgraph.spec
new file mode 100644
index 0000000..0873f69
--- /dev/null
+++ b/packaging/FEDORA/textgraph.spec
@@ -0,0 +1,58 @@
+# Generated by rust2rpm 25
+%bcond_without check
+
+# prevent library files from being installed
+# cargo2rpm does return 1 for the crate, but we don't care about the libraries
+# for this rpm
+%global __cargo_is_lib() 0
+
+%global crate textgraph
+
+%define cargo_config .cargo/config
+
+Name: textgraph
+Version: %{package_version}
+Release: %{package_release}
+Summary: Text graphing utility
+
+#License: GPLv3
+Source: %{name}-%{version}.tar.gz
+
+BuildRequires: cargo-rpm-macros >= 24
+
+%description
+Text graphing utility
+
+%prep
+%autosetup -n %{crate}-%{version} -p1
+%cargo_prep
+
+%build
+# This is not best practice, but it was somewhat annoying to actually get all
+# dependencies vendored/packaged properly.
+# currently this app doesn't have any cargo dependencies, but keeping it for reference
+#sed -i '/^\[source\.crates-io\]/,/^$/d' %{cargo_config}
+#sed -i '/^\[source\.local-registry\]/,/^$/d' %{cargo_config}
+#sed -i '/^\[net\]/,/^$/d' %{cargo_config}
+#echo "[net]" >> %{cargo_config}
+#echo "git-fetch-with-cli = true" >> %{cargo_config}
+%cargo_build
+
+%install
+%cargo_install
+
+mkdir -p %{buildroot}%{_mandir}/man1
+install tg.1 %{buildroot}%{_mandir}/man1/tg.1
+
+%if %{with check}
+%check
+%cargo_test
+%endif
+
+%files
+%doc README.md
+%{_bindir}/tg
+%{_mandir}/man1/tg.1.gz
+
+%changelog
+%autochangelog