diff options
Diffstat (limited to 'extra/source/aspell-word-lists/aspell-dict.SlackBuild')
-rwxr-xr-x | extra/source/aspell-word-lists/aspell-dict.SlackBuild | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/extra/source/aspell-word-lists/aspell-dict.SlackBuild b/extra/source/aspell-word-lists/aspell-dict.SlackBuild index 4f78446cf..b762f3c97 100755 --- a/extra/source/aspell-word-lists/aspell-dict.SlackBuild +++ b/extra/source/aspell-word-lists/aspell-dict.SlackBuild @@ -38,7 +38,12 @@ fi cd src for file in aspell*bz2 ; do - NAME=$(echo $file | cut -f 1-2 -d -)-$(echo $file | cut -f 3- -d - | rev | cut -b9- | rev | tr '[\-]' '[_]') + # pt_PT-preao requires different package name handling: + if echo $file | grep -q pt_PT-preao ; then + NAME=$(echo $file | cut -f 1-3 -d -)-$(echo $file | cut -f 4- -d - | rev | cut -b9- | rev | tr '[\-]' '[_]') + else + NAME=$(echo $file | cut -f 1-2 -d -)-$(echo $file | cut -f 3- -d - | rev | cut -b9- | rev | tr '[\-]' '[_]') + fi if [ -r $CWD/build/$(basename $file | cut -f 1,2 -d -) ]; then BUILD="$(cat $CWD/build/$(basename $file | cut -f 1,2 -d -))" else @@ -60,13 +65,18 @@ for file in aspell*bz2 ; do cp -a \ README* Copyright* COPYING* \ $PKG/usr/doc/${NAME} - # Overwrite from doc/ is fine: - cp -a \ - doc/* \ - $PKG/usr/doc/${NAME} + if [ -d doc ]; then + # Overwrite from doc/ is fine: + cp -a doc/* $PKG/usr/doc/${NAME} + fi chmod 644 $PKG/usr/doc/${NAME}/* mkdir $PKG/install - SLACKDESC=$(echo $NAME | cut -f 1-2 -d -) + # pt_PT-preao requires different package name handling: + if echo $file | grep -q pt_PT-preao ; then + SLACKDESC=$(echo $NAME | cut -f 1-3 -d -) + else + SLACKDESC=$(echo $NAME | cut -f 1-2 -d -) + fi echo "${SLACKDESC}: ${SLACKDESC}" > $PKG/install/slack-desc echo "${SLACKDESC}:" >> $PKG/install/slack-desc echo "${SLACKDESC}: $(head -n 1 README)." >> $PKG/install/slack-desc |