summaryrefslogtreecommitdiff
path: root/rpm
diff options
context:
space:
mode:
authorRyo Nakamura <upa@haeena.net>2024-02-04 10:58:11 +0900
committerRyo Nakamura <upa@haeena.net>2024-02-04 10:58:11 +0900
commit306a00ced564829d0c265644b99ecaa0de32920b (patch)
tree988f7f7af7c8ec4ea30ddab15ce1b82393d6d572 /rpm
parent65025b9022102cf283af7577ab3b868982079322 (diff)
build source rpm inside a container
A new build target `build-srpm` builds mscp src.rpm inside a docker container. The src.rpm can be published at COPR.
Diffstat (limited to 'rpm')
-rw-r--r--rpm/.gitignore3
-rw-r--r--rpm/README.md17
-rw-r--r--rpm/mscp.spec.in42
3 files changed, 62 insertions, 0 deletions
diff --git a/rpm/.gitignore b/rpm/.gitignore
new file mode 100644
index 0000000..c1dc70f
--- /dev/null
+++ b/rpm/.gitignore
@@ -0,0 +1,3 @@
+
+# generated by cmake
+mscp.spec
diff --git a/rpm/README.md b/rpm/README.md
new file mode 100644
index 0000000..d24bb64
--- /dev/null
+++ b/rpm/README.md
@@ -0,0 +1,17 @@
+
+## Build mscp as src.rpm for publishing at COPR
+
+### How to build
+
+```shell-session
+cd mscp
+mkdir build && cd build
+
+cmake .. make build-srpm
+```
+
+`make build-srpm` builds mscp src.rpm inside a docker container.
+
+After that, there is `mscp-0.1.3-1.el9.src.rpm` under the `build`
+directory. The next step for publishing is to upload the src.rpm to
+[coprs/upaaa/mscp](https://copr.fedorainfracloud.org/coprs/upaaa/mscp/build/6983569/).
diff --git a/rpm/mscp.spec.in b/rpm/mscp.spec.in
new file mode 100644
index 0000000..40d0d8e
--- /dev/null
+++ b/rpm/mscp.spec.in
@@ -0,0 +1,42 @@
+Name: mscp
+Version: @MSCP_VERSION@
+Release: 1%{?dist}
+Summary: mscp, fast file transfer over multiple SSH connections
+
+Group: Applications/Internet
+License: GPLv3
+URL: https://github.com/upa/mscp
+Source0: %{name}-%{version}.tar.gz
+
+BuildRequires: gcc make cmake zlib-devel openssl-devel
+Requires: glibc crypto-policies krb5-libs openssl-libs libcom_err
+
+%description
+mscp transfers files over multiple SSH connections. Multiple threads
+and connections in mscp transfer (1) multiple files simultaneously
+and (2) a large file in parallel. It would shorten the waiting time
+for transferring a lot of/large files over networks.
+
+
+%global debug_package %{nil}
+
+%prep
+%setup -q
+
+
+%build
+cmake -S . -B build -DINSTALL_EXECUTABLE_ONLY=ON
+make -C build %{?_smp_mflags}
+
+
+%install
+make -C build install DESTDIR=%{buildroot}
+
+%files
+/usr/local/bin/mscp
+/usr/local/share/man/man1/mscp.1
+
+
+%changelog
+* Sat Feb 03 2024 Ryo nakamura <upa@haeena.net> - 0.1.3-0
+- Initial release for rpm packaging