aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--misc/protobuf/README7
-rw-r--r--misc/protobuf/protobuf.SlackBuild10
2 files changed, 15 insertions, 2 deletions
diff --git a/misc/protobuf/README b/misc/protobuf/README
index a8bfafc65006c..daa9fa448c6d4 100644
--- a/misc/protobuf/README
+++ b/misc/protobuf/README
@@ -7,4 +7,9 @@ then you can use special generated source code to easily write and
read your structured data to and from a variety of data streams
and using a variety of languages. You can even update your data
structure without breaking deployed programs that are compiled
-against the "old" format. \ No newline at end of file
+against the "old" format.
+
+pysetuptools is a required dependency unless you disable python
+support by running the build with "PYTHON=no ./protobuf.SlackBuild"
+By default we build the python libraries because a few programs
+require it.
diff --git a/misc/protobuf/protobuf.SlackBuild b/misc/protobuf/protobuf.SlackBuild
index 567660ad5b0bd..de3a3fc9bfc34 100644
--- a/misc/protobuf/protobuf.SlackBuild
+++ b/misc/protobuf/protobuf.SlackBuild
@@ -6,9 +6,11 @@
PRGNAM=protobuf
VERSION=${VERSION:-2.4.1}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PYTHON=${PYTHON:-yes}
+
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
@@ -55,6 +57,7 @@ CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
+ --disable-static \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
@@ -64,6 +67,11 @@ CXXFLAGS="$SLKCFLAGS" \
make
make install DESTDIR=$PKG
+# Install the python bindings
+if [ "${PYTHON:-yes}" = "yes" ]; then
+ cd python ; python setup.py install --root=$PKG ; cd ..
+fi
+
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true