summaryrefslogtreecommitdiffstats
path: root/development
diff options
context:
space:
mode:
author B. Watson2022-04-15 17:48:02 +0200
committer Willy Sudiarto Raharjo2022-04-16 07:11:29 +0200
commit249b2886c97febcf6f4ab3d3f5f6a07209e14fae (patch)
tree5389760fe776199759cc44fed1e3b213ad63e30b /development
parent207e1ee5d5141b76f0a5c0661fda1989ce6c42ba (diff)
downloadslackbuilds-249b2886c97febcf6f4ab3d3f5f6a07209e14fae.tar.gz
development/gtest: Fix docs, shared lib perms.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development')
-rw-r--r--development/gtest/gtest.SlackBuild32
1 files changed, 22 insertions, 10 deletions
diff --git a/development/gtest/gtest.SlackBuild b/development/gtest/gtest.SlackBuild
index 7c32e31c82..8116b2e86c 100644
--- a/development/gtest/gtest.SlackBuild
+++ b/development/gtest/gtest.SlackBuild
@@ -24,12 +24,17 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20220415 bkw: Modified by SlackBuilds.org, BUILD=4:
+# - install (or actually symlink) docs to /usr/doc/$PRGNAM-$VERSION,
+# to follow Slackware standards.
+# - install shared libraries with +x permission.
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=gtest
SRCNAM=googletest
VERSION=${VERSION:-1.10.0}
-BUILD=${BUILD:-3}
+BUILD=${BUILD:-4}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -41,9 +46,6 @@ if [ -z "$ARCH" ]; then
esac
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
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@@ -78,9 +80,9 @@ cd $SRCNAM-release-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
+ -o -perm 511 \) -exec chmod 755 {} \+ -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+
for i in $CWD/patches/* ; do patch -p1 < $i ; done
@@ -111,7 +113,7 @@ install -m 0644 googletest/include/$PRGNAM/internal/custom/*.h \
$PKG/usr/include/$PRGNAM/internal/custom
# install the libs and the pkgconfig files!
-install -m 0644 build/lib/*.so $PKG/usr/lib$LIBDIRSUFFIX
+install -s -m 0755 build/lib/*.so $PKG/usr/lib$LIBDIRSUFFIX
mkdir -p $PKG/usr/lib$LIBDIRSUFFIX/pkgconfig
for i in gmock gmock_main gtest gtest_main ; do
sed "s| -lpthread||g" build/googletest/generated/${i}.pc \
@@ -120,12 +122,22 @@ done
mkdir -p $PKG/usr/src
cp -R googlemock $PKG/usr/src
-cp -R googletest /$PKG/usr/src
+cp -R googletest $PKG/usr/src
# Create symlinks as some programs look for the shorter names
(cd $PKG/usr/src ; ln -svf googlemock gmock ; ln -svf googletest gtest)
-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
+# 20220415 bkw: the docs get installed in /usr/src along with
+# everything else. symlink them to a place that slackware users
+# expect to see them.
+PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $PKGDOC
+cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
+for dir in googlemock googletest; do
+ mkdir -p $PKGDOC/$dir
+ for file in CONTRIBUTORS LICENSE README.md docs samples; do
+ [ -e $PKG/usr/src/$dir/$file ] && ln -s ../../../src/$dir/$file $PKGDOC/$dir
+ done
+done
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc