From d24354c5eb0b45e8a299963e7fea77639ae499b3 Mon Sep 17 00:00:00 2001 From: ZpmFred Date: Thu, 28 Feb 2019 15:39:41 +0100 Subject: [PATCH 1/4] rpm build --- .rpm/vpncloud.spec | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .rpm/vpncloud.spec diff --git a/.rpm/vpncloud.spec b/.rpm/vpncloud.spec new file mode 100644 index 0000000..f51930e --- /dev/null +++ b/.rpm/vpncloud.spec @@ -0,0 +1,41 @@ +%define __spec_install_post %{nil} +%define __os_install_post %{_dbpath}/brp-compress +%define debug_package %{nil} + +Name: vpncloud +Summary: Peer-to-peer VPN +Version: @@VERSION@@ +Release: 1 +License: GPL-3.0 +Group: Applications/System +Source0: %{name}-%{version}.tar.gz +URL: https://vpncloud.ddswd.de + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root + +%description +%{summary} + +%prep +%setup -q + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot} +mkdir -p %{buildroot}/etc/vpncloud +mkdir -p %{buildroot}/lib/systemd/system +cp %{buildroot}/../../../../../assets/example.net.disabled %{buildroot}/etc/vpncloud/example.net.disabled +cp %{buildroot}/../../../../../assets/vpncloud@.service %{buildroot}/lib/systemd/system/vpncloud@.service +cp -a * %{buildroot} + +%clean +rm -rf %{buildroot} + +%files +/etc/vpncloud +/etc/vpncloud/example.net.disabled +/usr/bin/vpncloud +/lib/systemd/system/vpncloud@.service + +%defattr(-,root,root,-) +%{_bindir}/* From 312276229e0e6c57a56e8a6a6efd0f3e8271db0d Mon Sep 17 00:00:00 2001 From: ZpmFred Date: Fri, 1 Mar 2019 15:54:32 +0100 Subject: [PATCH 2/4] rpm package doc --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index feb9261..79dbd93 100644 --- a/README.md +++ b/README.md @@ -74,6 +74,8 @@ Debian packages can be built using [cargo-deb](https://github.com/mmstick/cargo- There is a [VpnCloud package for Arch Linux](https://aur.archlinux.org/packages/vpncloud/) thanks to Oscar Rainford (fourbytes). +#### CentOS 7 +Centos 7 .rpm package can be built using [cargo-rpm](https://github.com/RustRPM/cargo-rpm): ``cargo rpm`` ### Contributions welcome There are several areas in which still some work has to be done and where From 51c2cc5eb05a097cd37fc3c59e6641db0c9f098c Mon Sep 17 00:00:00 2001 From: ZpmFred Date: Fri, 1 Mar 2019 15:57:01 +0100 Subject: [PATCH 3/4] CentOS case fix --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 79dbd93..1965f6c 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ There is a [VpnCloud package for Arch Linux](https://aur.archlinux.org/packages/ thanks to Oscar Rainford (fourbytes). #### CentOS 7 -Centos 7 .rpm package can be built using [cargo-rpm](https://github.com/RustRPM/cargo-rpm): ``cargo rpm`` +CentOS 7 .rpm package can be built using [cargo-rpm](https://github.com/RustRPM/cargo-rpm): ``cargo rpm`` ### Contributions welcome There are several areas in which still some work has to be done and where From 05b359fd1f8ad20f3f51f678d6587fc950c6c546 Mon Sep 17 00:00:00 2001 From: ZpmFred Date: Fri, 1 Mar 2019 16:11:53 +0100 Subject: [PATCH 4/4] More detailed rpm build doc --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index 1965f6c..97ea3ae 100644 --- a/README.md +++ b/README.md @@ -76,6 +76,19 @@ thanks to Oscar Rainford (fourbytes). #### CentOS 7 CentOS 7 .rpm package can be built using [cargo-rpm](https://github.com/RustRPM/cargo-rpm): ``cargo rpm`` +On an CentOS 7: + +1. Install the required build environment (on CentOS 7) + + $> yum install -y cargo + + $> yum groupinstall -y 'Development Tools' + +2. Build the software + + $> cargo rpm build --release + +rpm will be situated in `target/release/rpmbuild/RPMS/` ### Contributions welcome There are several areas in which still some work has to be done and where