From 1c660fb1f712ead94bf80fb1ccb1a5d0d50198cd Mon Sep 17 00:00:00 2001 From: Jamie Nguyen Date: Wed, 11 May 2016 09:58:29 +0100 Subject: Add rpm spec file --- rpmbuild/byteback.spec | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 rpmbuild/byteback.spec diff --git a/rpmbuild/byteback.spec b/rpmbuild/byteback.spec new file mode 100644 index 0000000..f422c1d --- /dev/null +++ b/rpmbuild/byteback.spec @@ -0,0 +1,66 @@ +Name: byteback +Version: 0.4.2 +Release: 1%{?dist} +Summary: Maintenance-free client & server backup scripts for Linux + +Group: Applications/System +License: Ruby and GPLv2+ and ASL 2.0 and Artistic 2.0 +URL: https://github.com/BytemarkHosting/byteback +Source0: byteback.tar.gz + +BuildArch: noarch +BuildRequires: txt2man +Requires: openssh-clients +Requires: ruby +Requires: rubygem-ffi +Requires: rsync + +%description +byteback encapsulates Bytemark's "best practice" for maintenance-free backups +with easy client and server setup. + +"Maintenance-free" means that we'd rather make full use of a fixed amount of +disc space. Management of disc space must be completely automatic, so the +process never grinds to a halt for reasons that could be automatically +resolved. Failed backups can be restarted in case of network problems. + +We use the standard OpenSSH on the server for encrypted transport & access +control, btrfs for simple snapshots and rsync for efficient data transfer +across the network. + +Backups should require as little configuration as possible to be safe - just +the server address should be enough. + + +%prep +%setup -q -n byteback +# No binary files, so should go in /usr/share. +sed -i -e 's|/usr/lib/byteback|/usr/share/byteback|g' bin/* +# Required to load system gems. +sed -i -e "2irequire 'rubygems'" bin/* + + +%build +make docs + + +%install +mkdir -p %{buildroot}%{_bindir} +cp -a bin/* %{buildroot}%{_bindir}/ + +mkdir -p %{buildroot}%{_datadir}/byteback +cp -a lib/* %{buildroot}%{_datadir}/byteback/ + +mkdir -p %{buildroot}%{_mandir}/man1 +for i in man/*.man; do + mv $i ${i%%.man}.1 +done; +cp -a man/*.1 %{buildroot}%{_mandir}/man1/ + + +%files +%doc README.md +%{_bindir}/* +%{_datadir}/byteback +%{_mandir}/man1/*.1* + -- cgit v1.2.1 From 908a41eaf04aaa196f8670396b96d2ff180872b2 Mon Sep 17 00:00:00 2001 From: Jamie Nguyen Date: Wed, 11 May 2016 10:31:01 +0100 Subject: Use orig.tar.gz --- rpmbuild/byteback.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rpmbuild/byteback.spec b/rpmbuild/byteback.spec index f422c1d..58841be 100644 --- a/rpmbuild/byteback.spec +++ b/rpmbuild/byteback.spec @@ -6,7 +6,7 @@ Summary: Maintenance-free client & server backup scripts for Linux Group: Applications/System License: Ruby and GPLv2+ and ASL 2.0 and Artistic 2.0 URL: https://github.com/BytemarkHosting/byteback -Source0: byteback.tar.gz +Source0: byteback_%{version}.orig.tar.gz BuildArch: noarch BuildRequires: txt2man @@ -33,7 +33,7 @@ the server address should be enough. %prep -%setup -q -n byteback +%setup -q -c # No binary files, so should go in /usr/share. sed -i -e 's|/usr/lib/byteback|/usr/share/byteback|g' bin/* # Required to load system gems. -- cgit v1.2.1