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.
This commit is contained in:
Ryo Nakamura
2024-02-04 10:58:11 +09:00
parent 65025b9022
commit 306a00ced5
8 changed files with 140 additions and 8 deletions

3
rpm/.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
# generated by cmake
mscp.spec

17
rpm/README.md Normal file
View File

@@ -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/).

42
rpm/mscp.spec.in Normal file
View File

@@ -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