-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsystem-restore.spec
58 lines (45 loc) · 1.37 KB
/
system-restore.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
%define _unpackaged_files_terminate_build 1
%define _progconf %_sysconfdir/%name/restore.conf
%define _progdir %_libexecdir/%name
Name: system-restore
Version: 0.2
Release: alt1
Summary: ALT System Restore and Deployment
License: GPL-3
Group: Archiving/Backup
Url: http://www.altlinux.org/Rescue/Recovery
Source: %name-%version.tar
BuildArch: noarch
Packager: Leonid Krivoshein <[email protected]>
AutoReq: noshell, noshebang
%description
Deployment and recovery solution. Allows to very
quickly and completely automatically install the
system from a pre-prepared rootfs backup.
%prep
%setup
%install
mkdir -pm0755 %buildroot{%_sysconfdir/%name,%_bindir,%_libexecdir,%_logdir}
cp -Rf libexec %buildroot%_progdir
install -pm0755 %name %buildroot%_bindir/%name
install -m0644 restore.conf %buildroot%_progconf.example
sed -i -e 's,^(readonly libdir)=.*$,\1="%_progdir",' %buildroot%_bindir/%name
:> %buildroot%_logdir/%name.log
:> %buildroot%_progconf
cat >libexec/version.sh <<EOF
# Auto-generated by the build system, do not edit directly!
#
SYSREST_VERSION=%version
SYSREST_BUILD_DATE=$(date '+%%Y%%m%%d')
EOF
%files
%dir %_sysconfdir/%name
%config %_progconf.example
%ghost %config(noreplace) %_progconf
%_bindir/%name
%_progdir
%ghost %_logdir/%name.log
%doc examples
%changelog
* Sat Nov 11 2023 Leonid Krivoshein <[email protected]> 0.2-alt1
- Experimental build for Sisyphus: WiP!