summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 760494cdd70c1b0e1f7a6a81bc7a2ab5cffc0f96 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Maintainer: Ernesto Castellotti <erny.castel@gmail.com>

_pkgname=protobuf
pkgname=lib32-lib${_pkgname}
_pkgver=3.5.2
pkgver=v${_pkgver}
pkgrel=2
pkgdesc="A language-neutral, platform-neutral extensible mechanism for 
serializing structured data."
url="https://developers.google.com/protocol-buffers/"
license=('custom')
arch=('x86_64')
depends=('lib32-zlib' 'lib32-gcc-libs')
makedepends=('gcc-multilib' 'curl' 'unzip')
source=("https://github.com/google/${_pkgname}/archive/v${_pkgver}.zip")
sha256sums=('7404d040865a031e80c2810cd9453eafefb2bbbf5f5f9a282b1d071d8e12c4bf')

build() {
    cd "${srcdir}/${_pkgname}-${_pkgver}"

    ./autogen.sh
    #autoreconf -i
    export CC="gcc -m32"
    export CXX="g++ -m32"
    export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
    ./configure --build=i386-pc-linux-gnu CFLAGS="-m32 -DNDEBUG" CXXFLAGS="-m32 -DNDEBUG" LDFLAGS=-m32 --prefix=/usr --libdir=/usr/lib32
    make -j4
}

package() {
    cd "${srcdir}/${_pkgname}-${_pkgver}"

    make DESTDIR="$pkgdir" install
    rm -r "$pkgdir/usr/bin/"
    rm -r "$pkgdir/usr/include"
    install -Dm 644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}