%jdupes(s) \ _target=""; _symlinks=0; \ %{-s:_symlinks=1;} \ if test "$_symlinks" = 1; then \ jdupes -q -p -H -o name -r %1 | \ while read _file; do \ if test -z "$_target" ; then \ _target="$_file"; \ else \ if test -z "$_file" ; then \ _target=""; \ continue ; \ fi ; \ ln -sf "${_target#%{buildroot}}" "$_file"; \ fi ; \ done ; \ else \ jdupes -q -p -H -o name -L -r %1 ; \ fi ; \ %{nil}