forked from pool/asterisk-sounds-devel
Include file finding
OBS-URL: https://build.opensuse.org/package/show/network:telephony/asterisk-sounds-devel?expand=0&rev=3
This commit is contained in:
parent
c03294305d
commit
a9e05f49f1
@ -51,23 +51,31 @@ This package contains the core part of that collection in \
|
||||
)}
|
||||
|
||||
%asterisk_collect_sndfiles(Z) \
|
||||
>"%_builddir/asterisk-sounds-xallpkg.files"; \
|
||||
for pkg in %*; do \
|
||||
pushd "$b"; \
|
||||
find "./%asterisk_sounds_dir/$lang" -type f -iname "*.$ext" >"$fldir/tmp.files"; \
|
||||
perl -pe 's{^\./+}{%%lang('$lang') /}g' \
|
||||
<"$fldir/tmp.files" >"$fldir/sounds-$pkg.files"; \
|
||||
perl -pe 's{^\./*(/.*)/.+$}{%%lang('$lang') %%dir $1}g;' \
|
||||
<"$fldir/tmp.files" | sort -u >>"$fldir/sounds-$pkg.files"; \
|
||||
echo "%%lang($lang) %%dir %_datadir/asterisk" >>"$fldir/sounds-$pkg.files"; \
|
||||
echo "%%lang($lang) %%dir %asterisk_sounds_dir" >>"$fldir/sounds-$pkg.files"; \
|
||||
echo "%%lang($lang) %%dir %asterisk_sounds_dir/$lang" >>"$fldir/sounds-$pkg.files"; \
|
||||
\
|
||||
find "./%asterisk_sounds_dir/$lang" -type f "(" -iname "*.txt" \
|
||||
-o -name "[A-Z]*" ")" >>"$fldir/rest1.files"; \
|
||||
\
|
||||
lang="${pkg%%%%-*}"; \
|
||||
ext="${pkg##*-}"; \
|
||||
pushd "%buildroot/"; \
|
||||
find "./%asterisk_sounds_dir/$lang" -type f -iname "*.$ext" >"%_builddir/asterisk-sounds-xthispkg.files"; \
|
||||
cat "%_builddir/asterisk-sounds-xthispkg.files" >>"%_builddir/asterisk-sounds-xallpkg.files"; \
|
||||
perl -pe 's{^\./+}{%%lang('$lang') /}g' <"%_builddir/asterisk-sounds-xthispkg.files" >"%_builddir/asterisk-sounds-$pkg.files"; \
|
||||
perl -pe 's{^\./*(/.*)/.+$}{%%lang('$lang') %%dir $1}g;' <"%_builddir/asterisk-sounds-xthispkg.files" | sort -u >>"%_builddir/asterisk-sounds-$pkg.files"; \
|
||||
echo "%%lang($lang) %%dir %_datadir/asterisk" >>"%_builddir/asterisk-sounds-$pkg.files"; \
|
||||
echo "%%lang($lang) %%dir %asterisk_sounds_dir" >>"%_builddir/asterisk-sounds-$pkg.files"; \
|
||||
echo "%%lang($lang) %%dir %asterisk_sounds_dir/$lang" >>"%_builddir/asterisk-sounds-$pkg.files"; \
|
||||
popd; \
|
||||
done; \
|
||||
\
|
||||
perl -ne 's{^\./*(/.*)/.+$}{%%dir $1}g;' <"rest1.files" >"rest.dirs"; \
|
||||
perl -pe 's{^\./+}{/}g;' <"rest1.files" | sort -u >"rest.files"; \
|
||||
cat <"rest.dirs" >>"rest.files";
|
||||
sort "%_builddir/asterisk-sounds-xallpkg.files" >"%_builddir/asterisk-sounds-xallpkg-sorted.files"; \
|
||||
pushd "%buildroot"; \
|
||||
find "./%asterisk_sounds_dir" -type f | sort >"%_builddir/asterisk-sounds-xallraw-sorted.files"; \
|
||||
popd; \
|
||||
comm -23 "%_builddir/asterisk-sounds-xallraw-sorted.files" \\\
|
||||
"%_builddir/asterisk-sounds-xallpkg-sorted.files" \\\
|
||||
>"%_builddir/asterisk-sounds-xrest1.files"; \
|
||||
perl -ne 's{^\./*(/.*)/.+$}{%%dir $1}g;' \\\
|
||||
<"%_builddir/asterisk-sounds-xrest1.files" \\\
|
||||
>"%_builddir/asterisk-sounds-xrest2.dirs"; \
|
||||
perl -pe 's{^\./+}{/}g;' <"%_builddir/asterisk-sounds-xrest1.files" | \\\
|
||||
sort -u >"%_builddir/asterisk-sounds-xrest2.files"; \
|
||||
cat "%_builddir/asterisk-sounds-xrest2".{files,dirs} \\\
|
||||
>>"%_builddir/asterisk-sounds-xrest.files";
|
||||
|
Loading…
x
Reference in New Issue
Block a user