|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
#!/bin/bash |
|
|
|
|
# Build script for Slackware |
|
|
|
|
# Copyright (C) 2013,2016,2017 Damien Goutte-Gattat |
|
|
|
|
# Copyright (C) 2013,2016,2017,2019 Damien Goutte-Gattat |
|
|
|
|
# |
|
|
|
|
# Redistribution and use of this script, with or without modifications, |
|
|
|
|
# is permitted provided that the following conditions are met: |
|
|
|
@ -27,7 +27,7 @@
|
|
|
|
|
|
|
|
|
|
# Source package infos |
|
|
|
|
NAMESRC=${NAMESRC:-protobuf} |
|
|
|
|
VERSION=${VERSION:-3.2.0} |
|
|
|
|
VERSION=${VERSION:-3.11.0} |
|
|
|
|
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.gz} |
|
|
|
|
WGET=${WGET:-https://github.com/google/protobuf/archive/v$VERSION.tar.gz} |
|
|
|
|
|
|
|
|
@ -77,15 +77,7 @@ if [ ! -r $ARCHIVE ]; then
|
|
|
|
|
wget -c -O $ARCHIVE.part "$WGET" |
|
|
|
|
mv $ARCHIVE.part $ARCHIVE |
|
|
|
|
fi |
|
|
|
|
if [ ! -r googlemock-1.7.0.zip ]; then |
|
|
|
|
wget -c -O googlemock-1.7.0.zip.part https://github.com/google/googlemock/archive/release-1.7.0.zip |
|
|
|
|
mv googlemock-1.7.0.zip.part googlemock-1.7.0.zip |
|
|
|
|
fi |
|
|
|
|
if [ ! -r googletest-1.7.0.zip ]; then |
|
|
|
|
wget -c -O googletest-1.7.0.zip.part https://github.com/google/googletest/archive/release-1.7.0.zip |
|
|
|
|
mv googletest-1.7.0.zip.part googletest-1.7.0.zip |
|
|
|
|
fi |
|
|
|
|
sha256sum -c checksums |
|
|
|
|
sha256sum -c $ARCHIVE.sha256 |
|
|
|
|
NAME=$(tar ft $ARCHIVE | head -n 1 | cut -d / -f 1) |
|
|
|
|
|
|
|
|
|
# Compile |
|
|
|
@ -93,10 +85,6 @@ cd $TMP
|
|
|
|
|
echo "Building $ARCHIVE..." |
|
|
|
|
tar xf $CWD/$ARCHIVE |
|
|
|
|
cd $NAME |
|
|
|
|
unzip $CWD/googlemock-1.7.0.zip |
|
|
|
|
mv googlemock-release-1.7.0 gmock |
|
|
|
|
unzip $CWD/googletest-1.7.0.zip |
|
|
|
|
mv googletest-release-1.7.0 gmock/gtest |
|
|
|
|
./autogen.sh |
|
|
|
|
CFLAGS=$CPUOPT \ |
|
|
|
|
CXXFLAGS=$CPUOPT \ |
|
|
|
@ -107,12 +95,14 @@ CXXFLAGS=$CPUOPT \
|
|
|
|
|
make -j $JOBS |
|
|
|
|
make install-strip DESTDIR=$PKG |
|
|
|
|
(cd python |
|
|
|
|
python setup.py build |
|
|
|
|
python setup.py install --root=$PKG) |
|
|
|
|
python2 setup.py build |
|
|
|
|
python2 setup.py install --root=$PKG |
|
|
|
|
python3 setup.py build |
|
|
|
|
python3 setup.py install --root=$PKG) |
|
|
|
|
|
|
|
|
|
# Install the documentation |
|
|
|
|
mkdir -p $PKG/usr/doc/$NAME |
|
|
|
|
install -m 644 CHANGES.txt CONTRIBUTORS.txt LICENSE README.md \ |
|
|
|
|
install -m 644 CHANGES.txt CONTRIBUT{ORS.txt,ING.md} LICENSE README.md \ |
|
|
|
|
$PKG/usr/doc/$NAME |
|
|
|
|
|
|
|
|
|
# Copy slack-desc file |
|
|
|
|