]> git.ipfire.org Git - ipfire-3.x.git/blob - rsync/rsync.nm
rsync: Update to 3.2.1
[ipfire-3.x.git] / rsync / rsync.nm
1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
5
6 name = rsync
7 version = 3.2.1
8 release = 1
9
10 groups = Applications/Internet
11 url = http://rsync.samba.org/
12 license = GPLv3+
13 summary = A program for synchronizing files over a network.
14
15 description
16 Rsync uses a reliable algorithm to bring remote and host files into
17 sync very quickly. Rsync is fast because it just sends the differences
18 in the files over the network instead of sending the complete
19 files. Rsync is often used as a very powerful mirroring process or
20 just as a more capable replacement for the rcp command. A technical
21 report which describes the rsync algorithm is included in this
22 package.
23 end
24
25 source_dl = http://rsync.samba.org/ftp/rsync/
26 sources += %{name}-patches-%{version}.tar.gz
27
28 build
29 requires
30 autoconf
31 libacl-devel
32 libattr-devel
33 lz4-devel
34 openssl-devel
35 popt-devel
36 zlib-devel
37 zstd-devel
38
39 # Testsuite.
40 %{bindir}/setfacl
41 end
42
43 configure_options += \
44 --without-included-popt \
45 --without-included-zlib \
46 --enable-openssl \
47 --enable-zstd \
48 --disable-xxhash
49
50 prepare_cmds
51 # Fix permission issure.
52 cd %{DIR_APP} && chmod -x support/*
53
54 # Apply upstream patches.
55 patch -Np1 -i patches/acls.diff
56 patch -Np1 -i patches/xattrs.diff
57 patch -Np1 -i patches/copy-devices.diff
58
59 # Remove cache.
60 rm -fr autum4te.cache
61
62 # Regenerate build environment.
63 autoconf
64 autoheader
65 end
66
67 make_build_targets = proto all
68
69 test
70 # Fix permissions of testsuite helper script.
71 #
72 # Otherwise some tests of the testsuite will fail,
73 # because the script is not allowed to be executed.
74 chmod +x ./support/lsh.sh
75
76 make check
77 end
78
79 make_install_targets += \
80 INSTALLCMD="install -p" \
81 INSTALLMAN="install -p"
82
83 install_cmds
84 # Install config file.
85 mkdir -pv %{BUILDROOT}%{sysconfdir}
86
87 install -m 0644 %{DIR_SOURCE}/rsyncd.conf \
88 %{BUILDROOT}%{sysconfdir}/
89
90 # Create directory for pidfile.
91 mkdir -pv %{BUILDROOT}/run/rsyncd
92
93 # Replace shebanh in rsync-ssl
94 sed -i -e "s@^#!.*@#!/bin/bash@" \
95 %{BUILDROOT}%{bindir}/rsync-ssl
96 end
97
98 end
99
100 packages
101 package %{name}
102 configfiles
103 %{sysconfdir}/rsyncd.conf
104 end
105
106 requires
107 # For rsync-ssl
108 %{bindir}/openssl
109 end
110
111 script postin
112 systemctl daemon-reload >/dev/null 2>&1 || :
113 end
114
115 script preun
116 systemctl --no-reload disable rsyncd.service >/dev/null 2>&1 || :
117 systemctl --no-reload disable rsyncd.socket >/dev/null 2>&1 || :
118 systemctl stop rsyncd.service >/dev/null 2>&1 || :
119 systemctl stop rsyncd.socket >/dev/null 2>&1 || :
120 systemctl stop rsyncd@.service >/dev/null 2>&1 || :
121 end
122
123 script postun
124 systemctl daemon-reload >/dev/null 2>&1 || :
125 end
126
127 script postup
128 systemctl daemon-reload >/dev/null 2>&1 || :
129 systemctl try-restart rsyncd.service >/dev/null 2>&1 || :
130 end
131 end
132
133 package %{name}-debuginfo
134 template DEBUGINFO
135 end
136 end