libraries/libcurl-gnutls: Fix build if $PKG contains ..

Signed-off-by: Andrew Clemons <andrew.clemons@gmail.com>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Andrew Clemons 2022-05-30 10:03:32 +12:00 committed by Willy Sudiarto Raharjo
parent 698df4640d
commit d20e0b3b17
No known key found for this signature in database
GPG key ID: 3F617144D7238786

View file

@ -109,7 +109,8 @@ CXXFLAGS="$SLKCFLAGS" \
make -C lib
make -C lib DESTDIR=$PKG install
CURLLIB=$(echo $PKG/usr/lib$LIBDIRSUFFIX/libcurl.so.4.?.? | cut -d. -f3-)
# remove PKG prefix since it can contain a fullstop, breaking the cut commands assumptions
CURLLIB=$(echo $PKG/usr/lib$LIBDIRSUFFIX/libcurl.so.4.?.? | sed "s,^.*/usr/lib$LIBDIRSUFFIX/,," | cut -d. -f3-)
mv ${PKG}/usr/lib${LIBDIRSUFFIX}/libcurl{,-gnutls}.so.$CURLLIB
rm ${PKG}/usr/lib${LIBDIRSUFFIX}/libcurl.so*