dist: add dependency packages and build script for ubuntu

This commit is contained in:
Takuya ASADA
2015-10-20 06:40:07 +00:00
committed by Takuya ASADA
parent e0604b066a
commit a03056a915
14 changed files with 397 additions and 0 deletions

15
dist/ubuntu/build_deb.sh vendored Normal file
View File

@@ -0,0 +1,15 @@
#!/bin/sh -e
if [ ! -e dist/ubuntu/build_deb.sh ]; then
echo "run build_deb.sh in top of scylla dir"
exit 1
fi
./dist/ubuntu/dep/build_dependency.sh
sudo apt-get -y install libyaml-cpp-dev liblz4-dev libsnappy-dev libcrypto++-dev libboost1.55-dev libjsoncpp-dev libaio-dev ragel ninja-build git libyaml-cpp0.5 liblz4-1 libsnappy1 libcrypto++9 libboost-program-options1.55.0 libboost-program-options1.55-dev libboost-system1.55.0 libboost-system1.55-dev libboost-thread1.55.0 libboost-thread1.55-dev libboost-test1.55.0 libboost-test1.55-dev libjsoncpp0 libaio1 hugepages software-properties-common libboost-filesystem1.55-dev libboost-filesystem1.55.0
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt-get -y update
sudo apt-get -y install g++-4.9
debuild -r fakeroot --no-tgz-check -us -uc

View File

@@ -0,0 +1,5 @@
antlr3-c++-dev (3.5.2-1) unstable; urgency=medium
* Initial release.
-- Takuya ASADA <syuu@scylladb.com> Mon, 24 Aug 2015 09:22:55 +0000

View File

@@ -0,0 +1 @@
9

View File

@@ -0,0 +1,12 @@
Source: antlr3-c++-dev
Maintainer: Takuya ASADA <syuu@scylladb.com>
Section: misc
Priority: optional
Standards-Version: 3.5.2
Build-Depends: debhelper (>= 9)
Package: antlr3-c++-dev
Architecture: all
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: antlr3-c++-dev
antlr3-c++-dev

View File

@@ -0,0 +1,12 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: ANTLR
Upstream-Contact: http://www.antlr.org/
Source: https://github.com/antlr/antlr3
Files: *
Copyright: Copyright (c) 2005-2009 Gokulakannan Somasundaram, ElectronDB
License: BSD-3-clause
Files: debian/*
Copyright: Copyright (c) 2015 ScyllaDB
License: AGPL-3.0

View File

@@ -0,0 +1,8 @@
#!/usr/bin/make -f
override_dh_auto_install:
mkdir -p $(CURDIR)/debian/antlr3-c++-dev/usr/include
cp $(CURDIR)/runtime/Cpp/include/* \
$(CURDIR)/debian/antlr3-c++-dev/usr/include
%:
dh $@

3
dist/ubuntu/dep/antlr3-tool-3.5.2/antlr3 vendored Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/sh
exec /usr/bin/java -jar /usr/share/java/antlr-3.5.2-complete-no-st3.jar $*

View File

@@ -0,0 +1,5 @@
antlr3-tool (3.5.2-1) unstable; urgency=medium
* Initial release.
-- Takuya ASADA <syuu@scylladb.com> Mon, 24 Aug 2015 09:22:55 +0000

View File

@@ -0,0 +1 @@
9

View File

@@ -0,0 +1,12 @@
Source: antlr3-tool
Maintainer: Takuya ASADA <syuu@scylladb.com>
Section: misc
Priority: optional
Standards-Version: 3.5.2
Build-Depends: debhelper (>= 9)
Package: antlr3-tool
Architecture: all
Depends: ${shlibs:Depends}, ${misc:Depends}, openjdk-7-jre-headless
Description: antlr3-tool
antlr3-tool

View File

@@ -0,0 +1,16 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: ANTLR
Upstream-Contact: http://www.antlr.org/
Source: https://github.com/antlr/antlr3
Files: antlr-3.5.2-complete-no-st3.jar
Copyright: Copyright (c) 2013 Terence Parr
License: BSD-3-clause
Files: antlr3
Copyright: Copyright (c) 2015 ScyllaDB
License: AGPL-3.0
Files: debian/*
Copyright: Copyright (c) 2015 ScyllaDB
License: AGPL-3.0

View File

@@ -0,0 +1,12 @@
#!/usr/bin/make -f
override_dh_auto_install:
mkdir -p $(CURDIR)/debian/antlr3-tool/usr/share/java
cp $(CURDIR)/antlr-3.5.2-complete-no-st3.jar \
$(CURDIR)/debian/antlr3-tool/usr/share/java
mkdir -p $(CURDIR)/debian/antlr3-tool/usr/bin
cp $(CURDIR)/antlr3 \
$(CURDIR)/debian/antlr3-tool/usr/bin
%:
dh $@

43
dist/ubuntu/dep/build_dependency.sh vendored Executable file
View File

@@ -0,0 +1,43 @@
#!/bin/sh -e
sudo apt-get -y install build-essential debhelper openjdk-7-jre-headless build-essential autoconf automake pkg-config libtool bison flex libboost1.55-dev libboost-test1.55-dev libevent-dev libglib2.0-dev libqt4-dev python-dev python-dbg php5-dev devscripts python-support xfslibs-dev
if [ ! -f build/antlr3-tool_3.5.2-1_all.deb ]; then
rm -rf build/antlr3-tool-3.5.2
mkdir -p build/antlr3-tool-3.5.2
cp -a dist/ubuntu/dep/antlr3-tool-3.5.2/* build/antlr3-tool-3.5.2
cd build/antlr3-tool-3.5.2
wget http://www.antlr3.org/download/antlr-3.5.2-complete-no-st3.jar
debuild -r fakeroot --no-tgz-check -us -uc
cd -
fi
if [ ! -f build/antlr3-c++-dev_3.5.2-1_all.deb ]; then
rm -rf build/antlr3-c++-dev-3.5.2
if [ ! -f build/3.5.2.tar.gz ]; then
wget -O build/3.5.2.tar.gz https://github.com/antlr/antlr3/archive/3.5.2.tar.gz
fi
cd build
tar xpf 3.5.2.tar.gz
mv antlr3-3.5.2 antlr3-c++-dev-3.5.2
cd -
cp -a dist/ubuntu/dep/antlr3-c++-dev-3.5.2/debian build/antlr3-c++-dev-3.5.2
cd build/antlr3-c++-dev-3.5.2
debuild -r fakeroot --no-tgz-check -us -uc
cd -
fi
if [ ! -f build/libthrift0_1.0.0-dev_amd64.deb ]; then
rm -rf build/thrift-0.9.1
if [ ! -f build/thrift-0.9.1.tar.gz ]; then
wget -O build/thrift-0.9.1.tar.gz http://archive.apache.org/dist/thrift/0.9.1/thrift-0.9.1.tar.gz
fi
cd build
tar xpf thrift-0.9.1.tar.gz
cd thrift-0.9.1
patch -p0 < ../../dist/ubuntu/dep/thrift.diff
debuild -r fakeroot --no-tgz-check -us -uc
cd ../..
fi
sudo dpkg -i build/*.deb

252
dist/ubuntu/dep/thrift.diff vendored Normal file
View File

@@ -0,0 +1,252 @@
diff -Nur debian/control /root/thrift-0.9.1/debian/control
--- debian/control 2013-08-18 14:58:22.000000000 +0000
+++ /root/thrift-0.9.1/debian/control 2015-09-29 12:17:18.000000000 +0000
@@ -1,12 +1,10 @@
Source: thrift
Section: devel
Priority: extra
-Build-Depends: debhelper (>= 5), build-essential, mono-gmcs, python-dev, ant,
- mono-devel, libmono-system-web2.0-cil, erlang-base, ruby1.8-dev, autoconf, python-support,
- automake, pkg-config, libtool, bison, flex, libboost-dev | libboost1.40-dev, python-all,
- python-all-dev, python-all-dbg, openjdk-6-jdk | java-sdk, libcommons-lang3-java,
- libboost-test-dev | libboost-test1.40-dev, libevent-dev, perl (>= 5.8.0-7),
- php5, php5-dev, libglib2.0-dev, libqt4-dev
+Build-Depends: debhelper (>= 5), build-essential, autoconf,
+ automake, pkg-config, libtool, bison, flex, libboost-dev | libboost1.55-dev,
+ libboost-test-dev | libboost-test1.55-dev, libevent-dev,
+ libglib2.0-dev, libqt4-dev
Maintainer: Thrift Developer's <dev@thrift.apache.org>
Homepage: http://thrift.apache.org/
Vcs-Git: https://git-wip-us.apache.org/repos/asf/thrift.git
@@ -26,98 +24,6 @@
from .thrift files (containing the definitions) to the language binding
for the supported languages.
-Package: python-thrift
-Architecture: any
-Section: python
-Depends: ${python:Depends}, ${shlibs:Depends}, ${misc:Depends}
-Recommends: python-twisted-core
-Provides: ${python:Provides}
-Description: Python bindings for Thrift
- Thrift is a software framework for scalable cross-language services
- development. It combines a software stack with a code generation engine to
- build services that work efficiently and seamlessly.
- .
- This package contains the Python bindings for Thrift. You will need the thrift
- tool (in the thrift-compiler package) to compile your definition to Python
- classes, and then the modules in this package will allow you to use those
- classes in your programs.
-
-Package: python-thrift-dbg
-Architecture: any
-Section: python
-Depends: ${shlibs:Depends}, ${misc:Depends}, python-thrift (= ${binary:Version}), python-all-dbg
-Provides: ${python:Provides}
-Description: Python bindings for Thrift (debug version)
- Thrift is a software framework for scalable cross-language services
- development. It combines a software stack with a code generation engine to
- build services that work efficiently and seamlessly.
- .
- This package contains the Python bindings for Thrift with debugging symbols.
- You will need the thrift tool (in the thrift-compiler package) to compile your
- definition to Python classes, and then the modules in this package will allow
- you to use those classes in your programs.
-
-Package: ruby-thrift
-Architecture: all
-Section: libs
-Depends: ruby | ruby-interpreter, ${shlibs:Depends}, ${misc:Depends}
-Provides: libthrift-ruby
-Replaces: libthrift-ruby
-Breaks: libthrift-ruby
-Description: Ruby bindings for Thrift
- Thrift is a software framework for scalable cross-language services
- development. It combines a software stack with a code generation engine to
- build services that work efficiently and seamlessly.
- .
- This package contains the Ruby bindings for Thrift. You will need the thrift
- tool (in the thrift-compiler package) to compile your definition to Ruby
- classes, and then the modules in this package will allow you to use those
- classes in your programs.
-
-Package: libthrift-java
-Architecture: all
-Section: libs
-Depends: java-gcj-compat | java1-runtime | java2-runtime, ${misc:Depends}
-Recommends: libcommons-lang3-java
-Description: Java bindings for Thrift
- Thrift is a software framework for scalable cross-language services
- development. It combines a software stack with a code generation engine to
- build services that work efficiently and seamlessly.
- .
- This package contains the Java bindings for Thrift. You will need the thrift
- tool (in the thrift-compiler package) to compile your definition to Java
- classes, and then the modules in this package will allow you to use those
- classes in your programs.
-
-Package: libthrift-cil
-Architecture: all
-Section: libs
-Depends: cli-common, libmono-corlib1.0-cil (>= 1.0), libmono-system1.0-cil (>= 1.0),
- libmono-system-web2.0-cil, ${misc:Depends}
-Description: CLI bindings for Thrift
- Thrift is a software framework for scalable cross-language services
- development. It combines a software stack with a code generation engine to
- build services that work efficiently and seamlessly.
- .
- This package contains the CLI bindings for Thrift. You will need the thrift
- tool (in the thrift-compiler package) to compile your definition to C#
- classes, and then the modules in this package will allow you to use those
- classes in your programs.
-
-Package: libthrift-perl
-Architecture: all
-Section: perl
-Depends: perl (>= 5.8.0-7), ${misc:Depends}
-Description: Perl bindings for Thrift
- Thrift is a software framework for scalable cross-language services
- development. It combines a software stack with a code generation engine to
- build services that work efficiently and seamlessly.
- .
- This package contains the Perl bindings for Thrift. You will need the thrift
- tool (in the thrift-compiler package) to compile your definition to Perl
- classes, and then the modules in this package will allow you to use those
- classes in your programs.
-
Package: libthrift0
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
@@ -140,15 +46,3 @@
.
This package contains the development libraries required for writing C++
applications using Thrift.
-
-Package: php5-thrift
-Architecture: any
-Section: php
-Depends: ${php:Depends}, ${shlibs:Depends}, ${misc:Depends}
-Provides: ${php:Provides}
-Description: PHP bindings for Thrift
- Thrift is a software framework for scalable cross-language services
- development. It combines a software stack with a code generation engine to
- build services that work efficiently and seamlessly.
- .
- This package contains the PHP bindings for Thrift.
diff -Nur debian/rules /root/thrift-0.9.1/debian/rules
--- debian/rules 2013-08-15 14:04:29.000000000 +0000
+++ /root/thrift-0.9.1/debian/rules 2015-09-29 12:32:28.000000000 +0000
@@ -45,18 +45,6 @@
# Compile C (glib) library
$(MAKE) -C $(CURDIR)/lib/c_glib
- # Python library
- cd $(CURDIR)/lib/py && \
- for py in $(PYVERS); do \
- $$py setup.py build; \
- $$py-dbg setup.py build; \
- done
-
- # PHP
- cd $(CURDIR)/lib/php/src/ext/thrift_protocol && \
- phpize && \
- ./configure && make
-
touch $@
build-indep: build-indep-stamp
@@ -65,19 +53,6 @@
# Add here commands to compile the indep part of the package.
#$(MAKE) doc
- # Java
- cd $(CURDIR)/lib/java && \
- ant
-
- # C#
- $(MAKE) -C $(CURDIR)/lib/csharp
-
- # Ruby
- $(MAKE) -C $(CURDIR)/lib/rb
-
- # Perl
- $(MAKE) -C $(CURDIR)/lib/perl INSTALLDIRS=vendor
-
touch $@
clean:
@@ -101,31 +76,6 @@
# debian/<package>-doc.
#INSTALLDOC#
- # Java
- mkdir -p $(CURDIR)/debian/libthrift-java/usr/share/java/ && \
- cp $(CURDIR)/lib/java/build/libthrift*.jar \
- $(CURDIR)/debian/libthrift-java/usr/share/java/
-
- # Ruby
- mkdir -p $(CURDIR)/debian/ruby-thrift/usr/lib/ruby/1.8 && \
- cp $(CURDIR)/lib/rb/lib/thrift.rb \
- $(CURDIR)/debian/ruby-thrift/usr/lib/ruby/1.8
- cp -r $(CURDIR)/lib/rb/lib/thrift \
- $(CURDIR)/debian/ruby-thrift/usr/lib/ruby/1.8
- mkdir -p $(CURDIR)/debian/ruby-thrift/usr/lib/ruby/1.9.1 && \
- cp $(CURDIR)/lib/rb/lib/thrift.rb \
- $(CURDIR)/debian/ruby-thrift/usr/lib/ruby/1.9.1
- cp -r $(CURDIR)/lib/rb/lib/thrift \
- $(CURDIR)/debian/ruby-thrift/usr/lib/ruby/1.9.1
-
- # C#
- mkdir -p $(CURDIR)/debian/libthrift-cil/usr/lib/cli/thrift/ && \
- cp $(CURDIR)/lib/csharp/Thrift.dll \
- $(CURDIR)/debian/libthrift-cil/usr/lib/cli/thrift/Thrift.dll
-
- # Perl
- $(MAKE) -C $(CURDIR)/lib/perl install DESTDIR=$(CURDIR)/debian/libthrift-perl/usr
-
dh_install -i
install-arch:
@@ -144,23 +94,6 @@
$(CURDIR)/debian/thrift-compiler/usr/bin/thrift && \
rmdir $(CURDIR)/debian/thrift-compiler/usr/sbin
- # Python
- cd $(CURDIR)/lib/py && \
- for py in $(PYVERS); do \
- $$py setup.py install --no-compile --root=$(CURDIR)/debian/python-thrift; \
- $$py-dbg setup.py install --no-compile --root=$(CURDIR)/debian/python-thrift-dbg; \
- done
-
- find $(CURDIR)/debian/python-thrift-dbg -name "*.pyc" -print0 | xargs -0 rm -f
- find $(CURDIR)/debian/python-thrift-dbg -name "*.py" -print0 | xargs -0 rm -f
- find $(CURDIR)/debian/python-thrift-dbg -name "*.egg-info" -print0 | xargs -0 rm -rf
- find $(CURDIR)/debian/python-thrift-dbg -depth -type d -empty -exec rmdir {} \;
-
- # PHP
- mkdir -p $(CURDIR)/debian/php5-thrift
- cd $(CURDIR)/lib/php && \
- $(MAKE) DESTDIR=$(CURDIR)/debian/php5-thrift install
-
# C++ and C (glib)
mkdir -p $(CURDIR)/debian/tmp; \
cd $(CURDIR)/lib/cpp && \
@@ -182,8 +115,8 @@
dh_installexamples
dh_installman
dh_link
- dh_strip -Npython-thrift-dbg -Nthrift-compiler -Nlibthrift0 --dbg=python-thrift-dbg
- dh_strip -Npython-thrift-dbg
+ dh_strip -Nthrift-compiler -Nlibthrift0
+ dh_strip
dh_compress
dh_fixperms
dh_pysupport
@@ -200,7 +133,6 @@
# Build architecture dependant packages using the common target.
binary-arch: build-arch install-arch
- echo "php:Depends=phpapi-$(php-config5 --phpapi)" > debian/substvars
$(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
binary: binary-arch binary-indep