Skip to content

Instantly share code, notes, and snippets.

@nojima
Last active August 23, 2016 13:26
Show Gist options
  • Save nojima/984d30c58c7a70c2dc8b8a4642ab2365 to your computer and use it in GitHub Desktop.
Save nojima/984d30c58c7a70c2dc8b8a4642ab2365 to your computer and use it in GitHub Desktop.

protobuf 3 メモ

ビルド

C++ 用のアーカイブを落としてくる。

./configure
make -j $(nproc)
mkdir deb
make install DESTDIR=$(pwd)/deb

deb 化

mkdir ./deb/DEBIAN
cat > ./deb/DEBIAN/control <<EOF
Package: nojima-protobuf
Version: 3.0.0-1
Maintainer: Nobody <[email protected]>
Architecture: amd64
Description: protocol buffer
EOF
cat > ./deb/DEBIAN/postinst <<EOF
#!/bin/sh -e
ldconfig
EOF
chmod +x ./deb/DEBIAN/postinst
fakeroot dpkg-deb --build -Z gzip ./deb .
sudo dpkg -i ./nojima-protobuf_3.0.0-1_amd64.deb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment