# Packaged by Didier Spaier <didier~at~slint~dot~fr>
pkgname=$(pwd|sed "s,.*/,,")
pkgver=2.6.1
pkgrel=2slint
source=("${pkgname}-${pkgver}.tar.?z*")
docs=("CHANGES.txt" "CONTRIBUTORS.txt" "INSTALL.txt" "LICENSE" "README.html")
options=("nosrcpack")
# download: https://github.com/protocolbuffers/protobuf/archive/v3.6.1.tar.gz
# website: https://github.com/protocolbuffers/protobuf
slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"$pkgname (Google's data interchange format)"
"Protocol buffers are a flexible, efficient, automated mechanism for"
"serializing structured data, think XML, but smaller, faster, and"
"simpler. You define how you want your data to be structured once,"
"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."
)
build() {
  cp -SRC
  cd $SRC/$pkgname-$pkgver || return 1
  python3 setup.py install --prefix=/usr --root=$PKG || return 1
}
build() {
  cd $SRC/$pkgname-$pkgver || return 1
  ./autogen.sh
  pandoc -f markdown_github -t html5 -o README.html README.md
  ./configure \
  --prefix=/usr \
  --libdir=/usr/lib${LIBDIRSUFFIX} \
  --sysconfdir=/etc \
  --localstatedir=/var \
  --infodir=/usr/info \
  --mandir=/usr/man \
  --disable-static \
  --build=$ARCH-slackware-linux
  make
  DESTDIR=$PKG make install
  ( cd python
  python3 setup.py install --root=$PKG
  )
}
