libraries/wcslib: Fix permissions, rm static lib.

Signed-off-by: B. Watson <yalhcru@gmail.com>
This commit is contained in:
B. Watson 2022-04-19 17:38:15 -04:00
parent 59844e1824
commit 2a99eb9bf9

View file

@ -22,12 +22,15 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# 20220419 bkw: Modified by SlackBuilds.org, BUILD=3:
# - fix dir permissions in package (e.g. usr/man was 0775).
# - get rid of static lib.
cd $(dirname $0) ; CWD=$(pwd) cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=wcslib PRGNAM=wcslib
VERSION=${VERSION:-7.7} VERSION=${VERSION:-7.7}
BUILD=${BUILD:-2} BUILD=${BUILD:-3}
TAG=${TAG:-_SBo} TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz} PKGTYPE=${PKGTYPE:-tgz}
@ -39,9 +42,6 @@ if [ -z "$ARCH" ]; then
esac esac
fi fi
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
# the name of the created package would be, and then exit. This information
# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0 exit 0
@ -74,6 +74,8 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION cd $PRGNAM-$VERSION
chown -R root:root . chown -R root:root .
find . -type f -exec chmod 0644 {} \+
find . -type d -exec chmod 0755 {} \+
# Paths for PGPLOT in case it is not set properly # Paths for PGPLOT in case it is not set properly
#PGPLOT_DIR="/usr/lib${LIBDIRSUFFIX}/pgplot" #PGPLOT_DIR="/usr/lib${LIBDIRSUFFIX}/pgplot"
@ -81,7 +83,7 @@ chown -R root:root .
CFLAGS="$SLKCFLAGS" \ CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \
./configure \ sh ./configure \
--prefix=/usr \ --prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \ --libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \ --sysconfdir=/etc \
@ -96,17 +98,20 @@ CXXFLAGS="$SLKCFLAGS" \
make make
make install DESTDIR=$PKG make install DESTDIR=$PKG
gzip -9 $PKG/usr/man/man*/*
# Give root write permission on regular files as # 20220419 bkw: --disable-static accepted and ignored, so:
# many of them get 444 permissions by default rm -f $PKG/usr/lib*/*.a
find $PKG -type f -exec chmod u+w \{\} \;
# Give root write permission on regular files as many of them get 444
# permissions by default.
# 20220419 bkw: also, a lot of the directories are 775.
find $PKG -type f -exec chmod u+w {} \+
find $PKG -type d -exec chmod 0755 {} \+
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild