diff options
author | xiota | 2024-02-06 23:32:32 -0800 |
---|---|---|
committer | xiota | 2024-02-06 23:32:44 -0800 |
commit | c59c35541dd605d21724f0db7ccf04ccec470d98 (patch) | |
tree | 6bc38b38e45f1dca83037773cbbd587e344ea5a5 /PKGBUILD | |
parent | 1021b0859b2529e647eab79849d23379a31cf14a (diff) | |
download | aur-c59c35541dd605d21724f0db7ccf04ccec470d98.tar.gz |
3.2.7-5: enable ipv6, reorganize
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 218 |
1 files changed, 142 insertions, 76 deletions
@@ -1,100 +1,166 @@ # Maintainer: -_pkgname=rsync -pkgname="$_pkgname-reflink" +## useful linkes +# https://rsync.samba.org/ +# https://github.com/WayneD/rsync +# https://github.com/WayneD/rsync-patches + +## options +: ${_build_git:=false} + +[[ "${_build_git::1}" == "t" ]] && _pkgtype+="-git" + +## basic info +_gitname="rsync" +_pkgname="$_gitname-reflink" +pkgname="$_pkgname${_pkgtype:-}" pkgver=3.2.7 -pkgrel=4 +pkgrel=5 pkgdesc='A fast and versatile file copying tool for remote and local files - with reflink support' +url='https://github.com/WayneD/rsync' +license=('GPL-3.0-or-later') arch=('x86_64') -url='https://rsync.samba.org/' -license=('GPL3') -depends=( - 'acl' - 'libacl.so' - 'libxxhash.so' - 'popt' - 'xxhash' - 'zstd' -) -optdepends=( - 'python: for rrsync' -) -makedepends=('git' 'python-commonmark') -provides=("$_pkgname") -conflicts=(${provides[@]}) -backup=( - 'etc/rsyncd.conf' - 'etc/xinetd.d/rsync' -) -source=( - "$_pkgname"::"git+https://github.com/WayneD/rsync#tag=v${pkgver}" - 'https://github.com/WayneD/rsync-patches/raw/master/clone-dest.diff' - 'https://github.com/WayneD/rsync-patches/raw/master/detect-renamed.diff' - 'https://github.com/WayneD/rsync-patches/raw/master/detect-renamed-lax.diff' - 'rsyncd.conf' -) -sha256sums=( - 'SKIP' - 'SKIP' - 'SKIP' - 'SKIP' - '733ccb571721433c3a6262c58b658253ca6553bec79c2bdd0011810bb4f2156b' -) - -_backports=( -) - -_reverts=( -) +# main package +_main_package() { + depends=( + 'libacl.so' # acl + 'libxxhash.so' # xxhash + 'openssl' + 'popt' + 'zstd' + + ## implicit + #bash + #glibc + #lz4 + #zlib + ) + optdepends=( + 'python: for rrsync' + ) + makedepends=( + 'git' + 'python-commonmark' + ) + + provides=("$_pkgname=${pkgver%%.r*}") + conflicts=("$_pkgname") + + backup=( + 'etc/rsyncd.conf' + 'etc/xinetd.d/rsync' + ) + + if [ "${_build_git::1}" != "t" ] ; then + _main_stable + else + _main_git + fi + + source+=( + "$url-patches/raw/master/clone-dest.diff" + "$url-patches/raw/master/detect-renamed.diff" + "$url-patches/raw/master/detect-renamed-lax.diff" + 'rsyncd.conf' + ) + sha256sums+=( + 'SKIP' + 'SKIP' + 'SKIP' + '733ccb571721433c3a6262c58b658253ca6553bec79c2bdd0011810bb4f2156b' + ) +} + +# stable package +_main_stable() { + : ${_pkgver:=${pkgver%%.r*}} + + _pkgsrc="$_gitname" + source+=("$_pkgsrc"::"git+$url.git#tag=v${_pkgver:?}") + sha256sums+=('SKIP') + + pkgver() { + echo "${_pkgver:?}" + } +} + +# git package +_main_git() { + provides=("$_pkgname=${pkgver%%.r*}") + conflicts=("$_pkgname") + + _pkgsrc="$_gitname" + source+=("$_pkgsrc"::"git+$url.git") + sha256sums+=('SKIP') + + pkgver() ( + cd "$_pkgsrc" + git describe --long --tags --abbrev=8 --exclude='*[a-zA-Z][a-zA-Z]*' \ + | sed -E 's/^v//;s/([^-]*-g)/r\1/;s/-/./g' + ) +} + +# common functions prepare() { - cd "$srcdir/$_pkgname" - - local _c - for _c in "${_backports[@]}"; do - if [[ $_c == *..* ]]; then - git log --oneline --reverse "${_c}" - else - git log --oneline -1 "${_c}" - fi - git cherry-pick -n -m1 "${_c}" - done - for _c in "${_reverts[@]}"; do - git log --oneline -1 "${_c}" - git revert -n "${_c}" - done + apply-patch() { + printf '\nApplying patch %s\n' "$1" + patch -Np1 -F100 -i "$1" + } + + cd "$_pkgsrc" # patches - patch -Np1 -F100 -i "$srcdir/clone-dest.diff" - patch -Np1 -F100 -i "$srcdir/detect-renamed.diff" - patch -Np1 -F100 -i "$srcdir/detect-renamed-lax.diff" + apply-patch "$srcdir/clone-dest.diff" + apply-patch "$srcdir/detect-renamed.diff" + apply-patch "$srcdir/detect-renamed-lax.diff" } build() { - cd "$srcdir/$_pkgname" + cd "$_pkgsrc" - ./configure \ - --prefix=/usr \ - --disable-debug \ - --with-rrsync \ - --with-included-popt=no \ + local _configure_options=( + --prefix=/usr + --enabled-ipv6 + --disable-debug + --with-rrsync + --with-included-popt=no --with-included-zlib=no + ) + + ./configure "${_configure_options[@]}" make } check() { - cd "$srcdir/$_pkgname" + cd "$_pkgsrc" make test } package() { - cd "$srcdir/$_pkgname" - + cd "$_pkgsrc" make DESTDIR="$pkgdir" install - install -Dm0644 ../rsyncd.conf "$pkgdir/etc/rsyncd.conf" - install -Dm0644 packaging/lsb/rsync.xinetd "$pkgdir/etc/xinetd.d/rsync" - install -Dm0644 packaging/systemd/rsync.service "$pkgdir/usr/lib/systemd/system/rsyncd.service" - install -Dm0644 packaging/systemd/rsync.socket "$pkgdir/usr/lib/systemd/system/rsyncd.socket" - install -Dm0644 packaging/systemd/rsync@.service "$pkgdir/usr/lib/systemd/system/rsyncd@.service" - install -Dm0755 support/rrsync "$pkgdir/usr/lib/rsync/rrsync" + + install -Dm644 \ + "$srcdir/rsyncd.conf" \ + "$pkgdir/etc/rsyncd.conf" + + install -Dm644 \ + "packaging/lsb/rsync.xinetd" \ + "$pkgdir/etc/xinetd.d/rsync" + + install -Dm644 \ + "packaging/systemd/rsync.service" \ + "$pkgdir/usr/lib/systemd/system/rsyncd.service" + + install -Dm644 \ + "packaging/systemd/rsync.socket" \ + "$pkgdir/usr/lib/systemd/system/rsyncd.socket" + + install -Dm644 \ + "packaging/systemd/rsync@.service" \ + "$pkgdir/usr/lib/systemd/system/rsyncd@.service" } + +# execute +_main_package |