This is an automated email from the ASF dual-hosted git repository.

wesm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow-dist.git


The following commit(s) were added to refs/heads/master by this push:
     new 4aba41b  ARROW-592: Add Arrow C++ and GLib DEB and RPM packages (#3)
4aba41b is described below

commit 4aba41be1545c85585d062cb41caf4c478f0c48e
Author: Kouhei Sutou <k...@cozmixng.org>
AuthorDate: Fri Aug 11 02:59:29 2017 +0900

    ARROW-592: Add Arrow C++ and GLib DEB and RPM packages (#3)
    
    * Add Arrow C++ and GLib DEB and RPM packages
    
    * Add missing license header
---
 cpp-linux/.gitignore                        |  26 +++
 cpp-linux/README.md                         |  39 ++++
 cpp-linux/Rakefile                          | 125 +++++++++++++
 cpp-linux/apt/Vagrantfile                   |  53 ++++++
 cpp-linux/apt/build-deb.sh                  |  64 +++++++
 cpp-linux/debian/changelog                  |   5 +
 cpp-linux/debian/compat                     |   1 +
 cpp-linux/debian/control                    | 109 +++++++++++
 cpp-linux/debian/copyright                  | 193 +++++++++++++++++++
 cpp-linux/debian/gir1.2-arrow-1.0.install   |   1 +
 cpp-linux/debian/libarrow-dev.install       |   6 +
 cpp-linux/debian/libarrow-glib-dev.install  |   6 +
 cpp-linux/debian/libarrow-glib-doc.doc-base |   9 +
 cpp-linux/debian/libarrow-glib-doc.install  |   1 +
 cpp-linux/debian/libarrow-glib-doc.links    |   3 +
 cpp-linux/debian/libarrow-glib0.install     |   1 +
 cpp-linux/debian/libarrow-python0.install   |   1 +
 cpp-linux/debian/libarrow0.install          |   1 +
 cpp-linux/debian/patches/series             |   0
 cpp-linux/debian/rules                      |  52 ++++++
 cpp-linux/debian/source/format              |   1 +
 cpp-linux/debian/watch                      |   2 +
 cpp-linux/package-task.rb                   | 275 ++++++++++++++++++++++++++++
 cpp-linux/yum/Vagrantfile                   |  41 +++++
 cpp-linux/yum/arrow.spec.in                 | 224 ++++++++++++++++++++++
 cpp-linux/yum/build-rpm.sh                  | 115 ++++++++++++
 26 files changed, 1354 insertions(+)

diff --git a/cpp-linux/.gitignore b/cpp-linux/.gitignore
new file mode 100644
index 0000000..b85fae7
--- /dev/null
+++ b/cpp-linux/.gitignore
@@ -0,0 +1,26 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+/*.tar.gz
+/apt/.vagrant/
+/apt/repositories/
+/apt/tmp/
+/apt/env.sh
+/yum/.vagrant/
+/yum/repositories/
+/yum/tmp/
+/yum/env.sh
diff --git a/cpp-linux/README.md b/cpp-linux/README.md
new file mode 100644
index 0000000..06d2ba4
--- /dev/null
+++ b/cpp-linux/README.md
@@ -0,0 +1,39 @@
+<!---
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+
+# Linux packages for Apache Arrow C++ and GLib
+
+## Requirements
+
+  * Ruby
+  * Vagrant
+  * VirtualBox
+  * Tools to build tar.gz for Apache Arrow C++ and GLib
+
+## How to build .deb packages
+
+```console
+% rake apt
+```
+
+## How to build .rpm packages
+
+```console
+% rake yum
+```
diff --git a/cpp-linux/Rakefile b/cpp-linux/Rakefile
new file mode 100644
index 0000000..f96fd01
--- /dev/null
+++ b/cpp-linux/Rakefile
@@ -0,0 +1,125 @@
+# -*- ruby -*-
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+require_relative "package-task"
+
+class ApacheArrowPackageTask < PackageTask
+  def initialize
+    release_time = latest_commit_time(arrow_source_dir)
+    super("apache-arrow", detect_version(release_time), release_time)
+    @rpm_package = "arrow"
+  end
+
+  private
+  def arrow_source_dir
+    File.join(__dir__, "..", "arrow")
+  end
+
+  def detect_version(release_time)
+    pom_xml_path = File.join(arrow_source_dir, "java", "pom.xml")
+    version = File.read(pom_xml_path).scan(/^  
<version>(.+?)<\/version>/)[0][0]
+    formatted_release_time = release_time.strftime("%Y%m%d")
+    version.gsub(/-SNAPSHOT\z/) {".#{formatted_release_time}"}
+  end
+
+  def define_archive_task
+    file @archive_name do
+      cd(arrow_source_dir) do
+        sh("git", "archive", "HEAD",
+           "--prefix", "#{@archive_base_name}/",
+           "--output", @archive_name)
+        rm_f(@archive_base_name)
+        sh("tar", "xf", @archive_name)
+        rm_f(@archive_name)
+
+        c_glib_tmp_dir = "c_glib_tmp"
+        rm_rf(c_glib_tmp_dir)
+        mkdir_p(c_glib_tmp_dir)
+        cp_r(@archive_base_name, c_glib_tmp_dir)
+        c_glib_dir = File.expand_path("#{@archive_base_name}/c_glib")
+        rm_rf(c_glib_dir)
+        cd("#{c_glib_tmp_dir}/#{@archive_base_name}") do
+          build_type = "debug"
+          cpp_dir = File.expand_path("cpp")
+          cpp_build_dir = File.expand_path("cpp_build")
+          mkdir_p(cpp_build_dir)
+          cd(cpp_build_dir) do
+            sh("cmake", cpp_dir,
+               "-DCMAKE_BUILD_TYPE=#{build_type}",
+               "-DARROW_BUILD_TESTS=no")
+            sh("make", "-j8")
+          end
+          cd("c_glib") do
+            sh("./autogen.sh")
+            sh("./configure",
+               "--with-arrow-cpp-build-dir=#{cpp_build_dir}",
+               "--with-arrow-cpp-build-type=#{build_type}",
+               "--enable-gtk-doc")
+            sh({"LD_LIBRARY_PATH" => "#{cpp_build_dir}/#{build_type}"},
+               "make", "-j8")
+            sh("make", "dist")
+            tar_gz = Dir.glob("*.tar.gz").first
+            sh("tar", "xf", tar_gz)
+            mv(File.basename(tar_gz, ".tar.gz"),
+               c_glib_dir)
+          end
+        end
+        rm_rf(c_glib_tmp_dir)
+
+        sh("tar", "czf", @full_archive_name, @archive_base_name)
+        rm_rf(@archive_base_name)
+      end
+    end
+  end
+
+  def rpm_depended_packages
+    [
+      "pkg-config",
+      "cmake3",
+      "boost-devel",
+      "git",
+      "jemalloc-devel",
+      "python",
+      "python-devel",
+      "numpy",
+      "gtk-doc",
+      "gobject-introspection-devel",
+    ]
+  end
+
+  def deb_depended_packages
+    [
+      "debhelper",
+      "pkg-config",
+      "cmake",
+      "git",
+      "libboost-system-dev",
+      "libboost-filesystem-dev",
+      "libjemalloc-dev",
+      "python3-dev",
+      "python3-numpy",
+      "libgirepository1.0-dev",
+      "gtk-doc-tools",
+      "libglib2.0-doc",
+    ]
+  end
+end
+
+task = ApacheArrowPackageTask.new
+task.define
diff --git a/cpp-linux/apt/Vagrantfile b/cpp-linux/apt/Vagrantfile
new file mode 100644
index 0000000..4a792bb
--- /dev/null
+++ b/cpp-linux/apt/Vagrantfile
@@ -0,0 +1,53 @@
+# -*- ruby -*-
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Vagrantfile API/syntax version. Don't touch unless you know what you're 
doing!
+VAGRANTFILE_API_VERSION = "2"
+
+Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
+  vms = [
+    {
+      :id => "debian-stretch-amd64",
+      :box => "bento/debian-9.0",
+    },
+    {
+      :id => "ubuntu-16.04-i386",
+      :box => "bento/ubuntu-16.04-i386",
+    },
+    {
+      :id => "ubuntu-16.04-amd64",
+      :box => "bento/ubuntu-16.04",
+    },
+    {
+      :id => "ubuntu-17.04-i386",
+      :box => "bento/ubuntu-17.04-i386",
+    },
+    {
+      :id => "ubuntu-17.04-amd64",
+      :box => "bento/ubuntu-17.04",
+    },
+  ]
+
+  vms.each do |vm|
+    config.vm.define(vm[:id]) do |node|
+      node.vm.box = vm[:box]
+      node.vm.provision(:shell, :privileged => false, :path => "build-deb.sh")
+    end
+  end
+end
diff --git a/cpp-linux/apt/build-deb.sh b/cpp-linux/apt/build-deb.sh
new file mode 100755
index 0000000..a8f06a0
--- /dev/null
+++ b/cpp-linux/apt/build-deb.sh
@@ -0,0 +1,64 @@
+#!/bin/sh
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+LANG=C
+
+run()
+{
+  "$@"
+  if test $? -ne 0; then
+    echo "Failed $@"
+    exit 1
+  fi
+}
+
+. /vagrant/env.sh
+
+run sudo apt-get update
+run sudo apt-get install -y lsb-release
+
+distribution=$(lsb_release --id --short | tr 'A-Z' 'a-z')
+code_name=$(lsb_release --codename --short)
+case "${distribution}" in
+  debian)
+    component=main
+    ;;
+  ubuntu)
+    component=universe
+    ;;
+esac
+
+run sudo apt-get update
+run sudo apt-get install -V -y build-essential devscripts ${DEPENDED_PACKAGES}
+
+run mkdir -p build
+run cp /vagrant/tmp/${PACKAGE}-${VERSION}.tar.gz \
+  build/${PACKAGE}_${VERSION}.orig.tar.gz
+run cd build
+run tar xfz ${PACKAGE}_${VERSION}.orig.tar.gz
+run cd ${PACKAGE}-${VERSION}/
+run cp -rp /vagrant/tmp/debian debian
+# export DEB_BUILD_OPTIONS=noopt
+run debuild -us -uc
+run cd -
+
+package_initial=$(echo "${PACKAGE}" | sed -e 's/\(.\).*/\1/')
+pool_dir="/vagrant/repositories/${distribution}/pool/${code_name}/${component}/${package_initial}/${PACKAGE}"
+run mkdir -p "${pool_dir}/"
+run cp *.tar.* *.dsc *.deb "${pool_dir}/"
diff --git a/cpp-linux/debian/changelog b/cpp-linux/debian/changelog
new file mode 100644
index 0000000..7866716
--- /dev/null
+++ b/cpp-linux/debian/changelog
@@ -0,0 +1,5 @@
+apache-arrow (0.6.0.20170802-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Kouhei Sutou <k...@clear-code.com>  Wed, 02 Aug 2017 22:28:18 -0000
diff --git a/cpp-linux/debian/compat b/cpp-linux/debian/compat
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/cpp-linux/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/cpp-linux/debian/control b/cpp-linux/debian/control
new file mode 100644
index 0000000..147a73c
--- /dev/null
+++ b/cpp-linux/debian/control
@@ -0,0 +1,109 @@
+Source: apache-arrow
+Section: devel
+Priority: optional
+Maintainer: Kouhei Sutou <k...@clear-code.com>
+Build-Depends:
+  debhelper (>= 9),
+  pkg-config,
+  cmake,
+  git,
+  libboost-system-dev,
+  libboost-filesystem-dev,
+  libjemalloc-dev,
+  python3-dev,
+  python3-numpy,
+  libgirepository1.0-dev,
+  gtk-doc-tools,
+  gobject-introspection
+Build-Depends-Indep: libglib2.0-doc
+Standards-Version: 3.9.6
+Homepage: https://arrow.apache.org/
+
+Package: libarrow0
+Section: libs
+Architecture: any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends:
+  ${misc:Depends},
+  ${shlibs:Depends},
+  libjemalloc1
+Description: Apache Arrow is a data processing library for analysis
+ .
+ This package provides library files.
+
+Package: libarrow-python0
+Section: libs
+Architecture: any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends:
+  ${misc:Depends},
+  ${shlibs:Depends},
+  libarrow0 (= ${binary:Version}),
+  python3,
+  python3-numpy
+Description: Apache Arrow is a data processing library for analysis
+ .
+ This package provides library files for Python.
+
+Package: libarrow-dev
+Section: libdevel
+Architecture: any
+Multi-Arch: same
+Depends:
+  ${misc:Depends},
+  libarrow0 (= ${binary:Version})
+Description: Apache Arrow is a data processing library for analysis
+ .
+ This package provides header files.
+
+Package: libarrow-glib0
+Section: libs
+Architecture: any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends:
+  ${misc:Depends},
+  ${shlibs:Depends},
+  libarrow0 (= ${binary:Version})
+Description: Apache Arrow is a data processing library for analysis
+ .
+ This package provides library files.
+
+Package: gir1.2-arrow-1.0
+Section: introspection
+Architecture: any
+Multi-Arch: same
+Depends:
+  ${gir:Depends},
+  ${misc:Depends}
+Description: Apache Arrow is a data processing library for analysis
+ .
+ This package provides GObject Introspection typelib files.
+
+Package: libarrow-glib-dev
+Section: libdevel
+Architecture: any
+Multi-Arch: same
+Depends:
+  ${misc:Depends},
+  libglib2.0-dev,
+  libarrow-dev (= ${binary:Version}),
+  libarrow-glib0 (= ${binary:Version}),
+  gir1.2-arrow-1.0 (= ${binary:Version})
+Suggests: libarrow-glib-doc
+Description: Apache Arrow is a data processing library for analysis
+ .
+ This package provides header files.
+
+Package: libarrow-glib-doc
+Section: doc
+Architecture: all
+Multi-Arch: foreign
+Depends:
+  ${misc:Depends}
+Recommends: libglib2.0-doc
+Description: Apache Arrow is a data processing library for analysis
+ .
+ This package provides documentations.
diff --git a/cpp-linux/debian/copyright b/cpp-linux/debian/copyright
new file mode 100644
index 0000000..9db0ea7
--- /dev/null
+++ b/cpp-linux/debian/copyright
@@ -0,0 +1,193 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: Apache Arrow
+Upstream-Contact: <d...@arrow.apache.org>
+Source: https://dist.apache.org/repos/dist/release/arrow/
+
+Files: *
+Copyright: 2016 The Apache Software Foundation
+License: Apache-2.0
+
+Files: TODO for "This product includes software from the SFrame project"
+Copyright: 2015 Dato, Inc.
+           2009 Carnegie Mellon University.
+License: BSD-3-clause
+
+Files: TODO for "This product includes software from the Numpy project"
+Copyright: 1995, 1996, 1997 Jim Hugunin, hugu...@mit.edu
+           2005 Travis E. Oliphant oliph...@ee.byu.edu Brigham Young University
+License: BSD-3-clause
+
+Files: TODO for "This product includes software from the Feather project"
+Copyright: TODO
+License: Apache-2.0
+
+Files: TODO for "This product includes software from the DyND project"
+Copyright: TODO
+License: BSD-2-clause
+
+Files: TODO for "This product includes software from the LLVM project"
+Copyright: 2003-2007 University of Illinois at Urbana-Champaign.
+License: U-OF-I-BSD-LIKE
+
+Files: TODO for "This product includes software from the google-lint project"
+Copyright: 2009 Google Inc. All rights reserved.
+License: BSD-3-clause
+
+Files: TODO for "This product includes software from the mman-win32 project"
+Copyright: 2010 kutuzov.viktor.84
+License: MIT
+
+Files: TODO for "This product includes software from the LevelDB project"
+Copyright: 2011 The LevelDB Authors. All rights reserved.
+License: BSD-3-clause
+
+Files: TODO for "This product includes software from the CMake project"
+Copyright: 2001-2009 Kitware, Inc.
+           2012-2014 Continuum Analytics, Inc.
+License: BSD-3-clause
+
+Files: TODO for "This product includes software from 
https://github.com/matthew-brett/multibuild";
+Copyright: 2013-2016, Matt Terry and Matthew Brett; all rights reserved.
+License: BSD-2-clause
+
+Files: TODO for "This product includes software from the Ibis project"
+Copyright: 2015 Cloudera, Inc.
+License: Apache-2.0
+
+Files: TODO for "This product includes code from Apache Kudu"
+Copyright: 2016 The Apache Software Foundation
+License: Apache-2.0
+
+License: Apache-2.0
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+ .
+      http://www.apache.org/licenses/LICENSE-2.0
+ .
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ .
+ On Debian systems, the full text of the Apache Software License version 2 can
+ be found in the file `/usr/share/common-licenses/Apache-2.0'.
+
+License: BSD-3-clause
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ .
+ 1. Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in the
+    documentation and/or other materials provided with the distribution.
+ 3. Neither the name of the University nor the names of its contributors
+    may be used to endorse or promote products derived from this software
+    without specific prior written permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.
+
+License: BSD-2-clause
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ .
+ 1) Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ .
+ 2) Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
+ WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+
+License: U-OF-I-BSD-LIKE
+ ==============================================================================
+ LLVM Release License
+ ==============================================================================
+ University of Illinois/NCSA
+ Open Source License
+ .
+ Copyright (c) 2003-2013 University of Illinois at Urbana-Champaign.
+ All rights reserved.
+ .
+ Developed by:
+ .
+     LLVM Team
+ .
+     University of Illinois at Urbana-Champaign
+ .
+     http://llvm.org
+ .
+ Permission is hereby granted, free of charge, to any person obtaining a copy 
of
+ this software and associated documentation files (the "Software"), to deal 
with
+ the Software without restriction, including without limitation the rights to
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+ of the Software, and to permit persons to whom the Software is furnished to do
+ so, subject to the following conditions:
+ .
+     * Redistributions of source code must retain the above copyright notice,
+       this list of conditions and the following disclaimers.
+ .
+     * Redistributions in binary form must reproduce the above copyright 
notice,
+       this list of conditions and the following disclaimers in the
+       documentation and/or other materials provided with the distribution.
+ .
+     * Neither the names of the LLVM Team, University of Illinois at
+       Urbana-Champaign, nor the names of its contributors may be used to
+       endorse or promote products derived from this Software without specific
+       prior written permission.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
FITNESS
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+ CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH 
THE
+ SOFTWARE.
+
+License: MIT
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ .
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
diff --git a/cpp-linux/debian/gir1.2-arrow-1.0.install 
b/cpp-linux/debian/gir1.2-arrow-1.0.install
new file mode 100644
index 0000000..9038727
--- /dev/null
+++ b/cpp-linux/debian/gir1.2-arrow-1.0.install
@@ -0,0 +1 @@
+usr/lib/*/girepository-1.0/
diff --git a/cpp-linux/debian/libarrow-dev.install 
b/cpp-linux/debian/libarrow-dev.install
new file mode 100644
index 0000000..92b5574
--- /dev/null
+++ b/cpp-linux/debian/libarrow-dev.install
@@ -0,0 +1,6 @@
+usr/include/arrow/
+usr/lib/*/libarrow.a
+usr/lib/*/libarrow_*.a
+usr/lib/*/libarrow.so
+usr/lib/*/libarrow_*.so
+usr/lib/*/pkgconfig/arrow.pc
diff --git a/cpp-linux/debian/libarrow-glib-dev.install 
b/cpp-linux/debian/libarrow-glib-dev.install
new file mode 100644
index 0000000..827e4cf
--- /dev/null
+++ b/cpp-linux/debian/libarrow-glib-dev.install
@@ -0,0 +1,6 @@
+usr/include/arrow-glib/
+usr/lib/*/libarrow-glib.a
+usr/lib/*/libarrow-glib.so
+usr/lib/*/pkgconfig/arrow-glib.pc
+usr/share/gir-1.0/
+usr/share/arrow-glib/example/
diff --git a/cpp-linux/debian/libarrow-glib-doc.doc-base 
b/cpp-linux/debian/libarrow-glib-doc.doc-base
new file mode 100644
index 0000000..42bcf3e
--- /dev/null
+++ b/cpp-linux/debian/libarrow-glib-doc.doc-base
@@ -0,0 +1,9 @@
+Document: arrow-glib
+Title: arrow-glib Reference Manual
+Author: Kouhei Sutou
+Abstract: Apache Arrow is a data processing library for analysis.
+Section: Programming
+
+Format: HTML
+Index: /usr/share/doc/libarrow-glib-doc/arrow-glib/index.html
+Files: /usr/share/doc/libarrow-glib-doc/arrow-glib/*.html
diff --git a/cpp-linux/debian/libarrow-glib-doc.install 
b/cpp-linux/debian/libarrow-glib-doc.install
new file mode 100644
index 0000000..7aa63a9
--- /dev/null
+++ b/cpp-linux/debian/libarrow-glib-doc.install
@@ -0,0 +1 @@
+usr/share/doc/libarrow-glib-doc/arrow-glib/
diff --git a/cpp-linux/debian/libarrow-glib-doc.links 
b/cpp-linux/debian/libarrow-glib-doc.links
new file mode 100644
index 0000000..0cf9458
--- /dev/null
+++ b/cpp-linux/debian/libarrow-glib-doc.links
@@ -0,0 +1,3 @@
+usr/share/doc/libglib2.0-doc/glib usr/share/doc/libarrow-glib-doc/glib
+usr/share/doc/libglib2.0-doc/gobject usr/share/doc/libarrow-glib-doc/gobject
+usr/share/doc/libarrow-glib-doc/arrow-glib usr/share/gtk-doc/html/arrow-glib
diff --git a/cpp-linux/debian/libarrow-glib0.install 
b/cpp-linux/debian/libarrow-glib0.install
new file mode 100644
index 0000000..ec369d1
--- /dev/null
+++ b/cpp-linux/debian/libarrow-glib0.install
@@ -0,0 +1 @@
+usr/lib/*/libarrow-glib.so.*
diff --git a/cpp-linux/debian/libarrow-python0.install 
b/cpp-linux/debian/libarrow-python0.install
new file mode 100644
index 0000000..eef3e66
--- /dev/null
+++ b/cpp-linux/debian/libarrow-python0.install
@@ -0,0 +1 @@
+usr/lib/*/libarrow_python.so.*
diff --git a/cpp-linux/debian/libarrow0.install 
b/cpp-linux/debian/libarrow0.install
new file mode 100644
index 0000000..98ef213
--- /dev/null
+++ b/cpp-linux/debian/libarrow0.install
@@ -0,0 +1 @@
+usr/lib/*/libarrow.so.*
diff --git a/cpp-linux/debian/patches/series b/cpp-linux/debian/patches/series
new file mode 100644
index 0000000..e69de29
diff --git a/cpp-linux/debian/rules b/cpp-linux/debian/rules
new file mode 100755
index 0000000..641e07c
--- /dev/null
+++ b/cpp-linux/debian/rules
@@ -0,0 +1,52 @@
+#!/usr/bin/make -f
+# -*- makefile-gmake -*-
+#
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+# This has to be exported to make some magic below work.
+export DH_OPTIONS
+
+BUILD_TYPE=release
+
+%:
+       dh $@ --with gir
+
+override_dh_auto_configure:
+       dh_auto_configure \
+         --sourcedirectory=cpp \
+         --builddirectory=cpp_build \
+         -- \
+         -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) \
+         -DARROW_BUILD_TESTS=OFF \
+         -DARROW_PYTHON=ON \
+         -DPythonInterp_FIND_VERSION=ON \
+         -DPythonInterp_FIND_VERSION_MAJOR=3
+       dh_auto_configure \
+         --sourcedirectory=c_glib \
+         --builddirectory=c_glib_build \
+         -- \
+         --with-arrow-cpp-build-dir=$${PWD}/cpp_build \
+         --with-arrow-cpp-build-type=$(BUILD_TYPE) \
+         --enable-gtk-doc \
+         --with-html-dir=\$${prefix}/share/doc/libarrow-glib-doc
+
+override_dh_auto_build:
+       dh_auto_build                           \
+         --sourcedirectory=cpp                 \
+         --builddirectory=cpp_build
+       env                                                     \
+         LD_LIBRARY_PATH=$${PWD}/cpp_build/$(BUILD_TYPE)       \
+           dh_auto_build                                       \
+             --sourcedirectory=c_glib                          \
+             --builddirectory=c_glib_build
+
+override_dh_auto_install:
+       dh_auto_install                         \
+         --sourcedirectory=cpp                 \
+         --builddirectory=cpp_build
+       dh_auto_install                         \
+         --sourcedirectory=c_glib              \
+         --builddirectory=c_glib_build
+
+# disable 'make check'.
+override_dh_auto_test:
diff --git a/cpp-linux/debian/source/format b/cpp-linux/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/cpp-linux/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/cpp-linux/debian/watch b/cpp-linux/debian/watch
new file mode 100644
index 0000000..5cb3f00
--- /dev/null
+++ b/cpp-linux/debian/watch
@@ -0,0 +1,2 @@
+version=3
+https://dist.apache.org/repos/dist/release/arrow/arrow-(.+)/apache-arrow-(.+).tar.gz
diff --git a/cpp-linux/package-task.rb b/cpp-linux/package-task.rb
new file mode 100644
index 0000000..5268839
--- /dev/null
+++ b/cpp-linux/package-task.rb
@@ -0,0 +1,275 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+require "open-uri"
+require "time"
+
+class PackageTask
+  include Rake::DSL
+
+  def initialize(package, version, release_time)
+    @package = package
+    @version = version
+    @release_time = release_time
+
+    @archive_base_name = "#{@package}-#{@version}"
+    @archive_name = "#{@archive_base_name}.tar.gz"
+    @full_archive_name = File.expand_path(@archive_name)
+
+    @rpm_package = @package
+  end
+
+  def define
+    define_dist_task
+    define_yum_task
+    define_apt_task
+    define_version_task
+  end
+
+  private
+  def env_value(name)
+    value = ENV[name]
+    raise "Specify #{name} environment variable" if value.nil?
+    value
+  end
+
+  def parallel_build?
+    ENV["PARALLEL"] == "yes"
+  end
+
+  def latest_commit_time(git_directory)
+    cd(git_directory) do
+      return Time.iso8601(`git log -n 1 --format=%aI`.chomp).utc
+    end
+  end
+
+  def run_vagrant(id)
+    sh("vagrant", "up", id)
+    sh("vagrant", "destroy", "--force", id)
+  end
+
+  def define_dist_task
+    define_archive_task
+    desc "Create release package"
+    task :dist => [@archive_name]
+  end
+
+  def define_yum_task
+    namespace :yum do
+      distribution = "centos"
+      yum_dir = "yum"
+      repositories_dir = "#{yum_dir}/repositories"
+
+      directory repositories_dir
+
+      desc "Build RPM packages"
+      task :build => [@archive_name, repositories_dir] do
+        tmp_dir = "#{yum_dir}/tmp"
+        rm_rf(tmp_dir)
+        mkdir_p(tmp_dir)
+        cp(@archive_name, tmp_dir)
+
+        env_sh = "#{yum_dir}/env.sh"
+        File.open(env_sh, "w") do |file|
+          file.puts(<<-ENV)
+SOURCE_ARCHIVE=#{@archive_name}
+PACKAGE=#{@rpm_package}
+VERSION=#{@version}
+DEPENDED_PACKAGES="#{rpm_depended_packages.join("\n")}"
+          ENV
+        end
+
+        tmp_distribution_dir = "#{tmp_dir}/#{distribution}"
+        mkdir_p(tmp_distribution_dir)
+        spec = "#{tmp_distribution_dir}/#{@rpm_package}.spec"
+        spec_in = "#{yum_dir}/#{@rpm_package}.spec.in"
+        spec_in_data = File.read(spec_in)
+        spec_data = spec_in_data.gsub(/@(.+?)@/) do |matched|
+          case $1
+          when "PACKAGE"
+            @rpm_package
+          when "VERSION"
+            @version
+          else
+            matched
+          end
+        end
+        File.open(spec, "w") do |spec_file|
+          spec_file.print(spec_data)
+        end
+
+        cd(yum_dir) do
+          sh("vagrant", "destroy", "--force")
+          distribution_versions = {
+            "6" => ["x86_64"],
+            "7" => ["x86_64"],
+          }
+          threads = []
+          distribution_versions.each do |ver, archs|
+            archs.each do |arch|
+              id = "#{distribution}-#{ver}-#{arch}"
+              if parallel_build?
+                threads << Thread.new(id) do |local_id|
+                  run_vagrant(local_id)
+                end
+              else
+                run_vagrant(id)
+              end
+            end
+          end
+          threads.each(&:join)
+        end
+      end
+    end
+
+    desc "Release Yum packages"
+    yum_tasks = [
+      "yum:build",
+    ]
+    task :yum => yum_tasks
+  end
+
+  def define_apt_task
+    namespace :apt do
+      code_names = [
+        ["debian", "stretch"],
+        ["ubuntu", "16.04"],
+        ["ubuntu", "17.04"],
+      ]
+      architectures = [
+        "i386",
+        "amd64",
+      ]
+      debian_dir = "debian"
+      apt_dir = "apt"
+      repositories_dir = "#{apt_dir}/repositories"
+
+      directory repositories_dir
+
+      desc "Build DEB packages"
+      task :build => [@archive_name, repositories_dir] do
+        tmp_dir = "#{apt_dir}/tmp"
+        rm_rf(tmp_dir)
+        mkdir_p(tmp_dir)
+        cp(@archive_name, tmp_dir)
+        cp_r(debian_dir, "#{tmp_dir}/debian")
+
+        env_sh = "#{apt_dir}/env.sh"
+        File.open(env_sh, "w") do |file|
+          file.puts(<<-ENV)
+PACKAGE=#{@package}
+VERSION=#{@version}
+DEPENDED_PACKAGES="#{deb_depended_packages.join("\n")}"
+          ENV
+        end
+
+        cd(apt_dir) do
+          sh("vagrant", "destroy", "--force")
+          threads = []
+          code_names.each do |distribution, code_name|
+            architectures.each do |arch|
+              if arch == "i386"
+                next unless code_name == "17.04"
+              end
+              id = "#{distribution}-#{code_name}-#{arch}"
+              if parallel_build?
+                threads << Thread.new(id) do |local_id|
+                  run_vagrant(local_id)
+                end
+              else
+                run_vagrant(id)
+              end
+            end
+          end
+          threads.each(&:join)
+        end
+      end
+    end
+
+    desc "Release APT repositories"
+    apt_tasks = [
+      "apt:build",
+    ]
+    task :apt => apt_tasks
+  end
+
+  def define_version_task
+    namespace :version do
+      desc "Update versions"
+      task :update do
+        update_debian_changelog
+        update_spec
+      end
+    end
+  end
+
+  def package_version
+    "#{@version}-1"
+  end
+
+  def package_changelog_message
+    "New upstream release."
+  end
+
+  def packager_name
+    ENV["DEBFULLNAME"] || ENV["NAME"] || `git config --get user.name`.chomp
+  end
+
+  def packager_email
+    ENV["DEBEMAIL"] || ENV["EMAIL"] || `git config --get user.email`.chomp
+  end
+
+  def update_content(path)
+    if File.exist?(path)
+      content = File.read(path)
+    else
+      content = ""
+    end
+    content = yield(content)
+    File.open(path, "w") do |file|
+      file.puts(content)
+    end
+  end
+
+  def update_debian_changelog
+    update_content("debian/changelog") do |content|
+      <<-CHANGELOG.rstrip
+#{@package} (#{package_version}) unstable; urgency=low
+
+  * New upstream release.
+
+ -- #{packager_name} <#{packager_email}>  #{@release_time.rfc2822}
+
+#{content}
+      CHANGELOG
+    end
+  end
+
+  def update_spec
+    release_time = @release_time.strftime("%a %b %d %Y")
+    update_content("yum/#{@rpm_package}.spec.in") do |content|
+      content = content.sub(/^(%changelog\n)/, <<-CHANGELOG)
+%changelog
+* #{release_time} #{packager_name} <#{packager_email}> - #{package_version}
+- #{package_changelog_message}
+
+      CHANGELOG
+      content = content.sub(/^(Release:\s+)\d+/, "\\11")
+      content.rstrip
+    end
+  end
+end
diff --git a/cpp-linux/yum/Vagrantfile b/cpp-linux/yum/Vagrantfile
new file mode 100644
index 0000000..32d0f71
--- /dev/null
+++ b/cpp-linux/yum/Vagrantfile
@@ -0,0 +1,41 @@
+# -*- ruby -*-
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Vagrantfile API/syntax version. Don't touch unless you know what you're 
doing!
+VAGRANTFILE_API_VERSION = "2"
+
+Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
+  vms = [
+    {
+      :id => "centos-6-x86_64",
+      :box => "bento/centos-6.9",
+    },
+    {
+      :id => "centos-7-x86_64",
+      :box => "bento/centos-7.3",
+    },
+  ]
+
+  vms.each do |vm|
+    config.vm.define(vm[:id]) do |node|
+      node.vm.box = vm[:box]
+      node.vm.provision(:shell, :path => "build-rpm.sh")
+    end
+  end
+end
diff --git a/cpp-linux/yum/arrow.spec.in b/cpp-linux/yum/arrow.spec.in
new file mode 100644
index 0000000..e2a4a36
--- /dev/null
+++ b/cpp-linux/yum/arrow.spec.in
@@ -0,0 +1,224 @@
+# -*- rpm -*-
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+%define _centos_ver %{?centos_ver:%{centos_ver}}%{!?centos_ver:7}
+
+%define use_python %{_centos_ver} >= 7
+%define use_glib %{_centos_ver} >= 7
+
+Name:          @PACKAGE@
+Version:       @VERSION@
+Release:       1%{?dist}
+Summary:       Apache Arrow is a data processing library for analysis
+
+Group:         Development/Libraries
+License:       Apache-2.0
+URL:           https://arrow.apache.org/
+Source0:       
https://dist.apache.org/repos/dist/release/arrow/arrow-%{version}/apache-@PACKAGE@-%{version}.tar.gz
+
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n)
+BuildRequires: pkgconfig
+BuildRequires: gcc-c++
+BuildRequires: cmake3
+BuildRequires: boost-devel
+BuildRequires: git
+BuildRequires: jemalloc-devel
+%if %{use_python}
+BuildRequires: python-devel
+BuildRequires: numpy
+%endif
+%if %{use_glib}
+BuildRequires: gtk-doc
+BuildRequires: gobject-introspection-devel
+%endif
+
+%description
+Apache Arrow is a data processing library for analysis.
+
+%prep
+%setup -q -n apache-@PACKAGE@-%{version}
+
+%build
+build_type=release
+mkdir cpp/build
+cd cpp/build
+%cmake3 .. \
+  -DCMAKE_BUILD_TYPE=$build_type \
+%if %{use_python}
+  -DARROW_PYTHON=yes \
+%endif
+%if %{_centos_ver} == 6
+  -DARROW_BOOST_VENDORED=yes \
+%endif
+  -DARROW_BUILD_TESTS=no
+make %{?_smp_mflags}
+cd -
+
+%if %{use_glib}
+cd c_glib
+%configure \
+  --with-arrow-cpp-build-dir=$PWD/../cpp/build \
+  --with-arrow-cpp-build-type=$build_type \
+  --enable-gtk-doc
+sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
+sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
+LD_LIBRARY_PATH=$PWD/arrow-glib/.libs/:$PWD/../cpp/build/$build_type \
+  make %{?_smp_mflags}
+cd -
+%endif
+
+%install
+cd cpp/build
+make install DESTDIR=$RPM_BUILD_ROOT
+cd -
+
+%if %{use_glib}
+cd c_glib
+make install DESTDIR=$RPM_BUILD_ROOT
+rm $RPM_BUILD_ROOT%{_libdir}/*.la
+cd -
+%endif
+
+%package libs
+Summary:       Runtime libraries for Apache Arrow C++
+Group:         System Environment/Libraries
+License:       Apache-2.0
+Requires:      boost-system
+Requires:      boost-filesystem
+Requires:      jemalloc
+
+%description libs
+This package contains the libraries for Apache Arrow C++.
+
+%files libs
+%defattr(-,root,root,-)
+%doc README.md LICENSE.txt NOTICE.txt
+%{_libdir}/libarrow.so.*
+
+%package devel
+Summary:       Libraries and header files for Apache Arrow C++
+Group:         Development/Libraries
+License:       Apache-2.0
+Requires:      %{name}-libs = %{version}-%{release}
+
+%description devel
+Libraries and header files for Apache Arrow C++.
+
+%files devel
+%defattr(-,root,root,-)
+%doc README.md LICENSE.txt NOTICE.txt
+%{_includedir}/arrow/
+%{_libdir}/libarrow.a
+%{_libdir}/libarrow.so
+%{_libdir}/pkgconfig/arrow.pc
+
+%if %{use_python}
+%package python-libs
+Summary:       Apache Arrow CPython extensions
+Group:         System Environment/Libraries
+License:       Apache-2.0
+Requires:      arrow-libs = %{version}-%{release}
+Requires:      python2
+
+%description python-libs
+This package contains the Apache Arrow CPython extensions.
+
+%files python-libs
+%defattr(-,root,root,-)
+%doc README.md LICENSE.txt NOTICE.txt
+%{_libdir}/libarrow_python.so.*
+
+%package python-devel
+Summary:       Libraries and header files for Apache Arrow CPython extensions
+Group:         Development/Libraries
+License:       Apache-2.0
+Requires:      arrow-devel = %{version}-%{release}
+Requires:      %{name}-libs = %{version}-%{release}
+Requires:      python-devel
+
+%description python-devel
+Libraries and header files for Apache Arrow CPython extensions.
+
+%files python-devel
+%defattr(-,root,root,-)
+%doc README.md LICENSE.txt NOTICE.txt
+%{_libdir}/libarrow_python.a
+%{_libdir}/libarrow_python.so
+%{_libdir}/pkgconfig/arrow-python.pc
+%endif
+
+%if %{use_glib}
+%package glib-libs
+Summary:       Runtime libraries for Apache Arrow GLib
+Group:         System Environment/Libraries
+License:       Apache-2.0
+Requires:      arrow-libs = %{version}-%{release}
+Requires:      glib2
+
+%description glib-libs
+This package contains the libraries for Apache Arrow GLib.
+
+%files glib-libs
+%defattr(-,root,root,-)
+%doc README.md LICENSE.txt NOTICE.txt
+%{_libdir}/libarrow-glib.so.*
+%{_datadir}/gir-1.0/*.gir
+
+%package glib-devel
+Summary:       Libraries and header files for Apache Arrow GLib
+Group:         Development/Libraries
+License:       Apache-2.0
+Requires:      arrow-devel = %{version}-%{release}
+Requires:      %{name}-libs = %{version}-%{release}
+Requires:      glib2-devel
+Requires:      gobject-introspection-devel
+
+%description glib-devel
+Libraries and header files for Apache Arrow GLib.
+
+%files glib-devel
+%defattr(-,root,root,-)
+%doc README.md LICENSE.txt NOTICE.txt
+%{_includedir}/arrow-glib/
+%{_libdir}/libarrow-glib.a
+%{_libdir}/libarrow-glib.so
+%{_libdir}/pkgconfig/arrow-glib.pc
+%{_libdir}/girepository-1.0/*.typelib
+%{_datadir}/arrow-glib/example/
+
+%package glib-doc
+Summary:       Documentation for Apache Arrow GLib
+Group:         Documentation
+License:       Apache-2.0
+Requires:      arrow-devel = %{version}-%{release}
+Requires:      %{name}-libs = %{version}-%{release}
+
+%description glib-doc
+Documentation for Apache Arrow GLib.
+
+%files glib-doc
+%defattr(-,root,root,-)
+%doc README.md LICENSE.txt NOTICE.txt
+%{_docdir}/arrow-glib/
+%{_datadir}/gtk-doc/html/arrow-glib/
+%endif
+
+%changelog
+* Wed Aug 02 2017 Kouhei Sutou <k...@clear-code.com> - 0.6.0.20170802-1
+- New upstream release.
diff --git a/cpp-linux/yum/build-rpm.sh b/cpp-linux/yum/build-rpm.sh
new file mode 100755
index 0000000..9fdb50d
--- /dev/null
+++ b/cpp-linux/yum/build-rpm.sh
@@ -0,0 +1,115 @@
+#!/bin/sh
+# -*- sh-indentation: 2; sh-basic-offset: 2 -*-
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+run()
+{
+  "$@"
+  if test $? -ne 0; then
+    echo "Failed $@"
+    exit 1
+  fi
+}
+
+rpmbuild_options=
+
+. /vagrant/env.sh
+
+distribution=$(cut -d " " -f 1 /etc/redhat-release | tr "A-Z" "a-z")
+if grep -q Linux /etc/redhat-release; then
+  distribution_version=$(cut -d " " -f 4 /etc/redhat-release)
+else
+  distribution_version=$(cut -d " " -f 3 /etc/redhat-release)
+fi
+distribution_version=$(echo ${distribution_version} | sed -e 's/\..*$//g')
+
+architecture="$(arch)"
+case "${architecture}" in
+  i*86)
+    architecture=i386
+    ;;
+esac
+
+run yum install -y epel-release
+run yum groupinstall -y "Development Tools"
+
+if [ "${distribution_version}" = 6 ]; then
+  # libarchive-3 is required for cmake3
+  srpm_download_url=http://vault.centos.org/7.3.1611/os/Source/SPackages
+  libarchive_srpm_base=libarchive-3.1.2-10.el7_2.src.rpm
+  run wget $srpm_download_url/$libarchive_srpm_base
+  run yum install -y yum-utils autoconf268
+  run yum-builddep -y --nogpgcheck $libarchive_srpm_base
+  run env AUTOM4TE=autom4te268 rpmbuild --rebuild $libarchive_srpm_base
+  run yum install -y ~/rpmbuild/RPMS/*/libarchive-3.*.rpm
+  run rm -rf ~/rpmbuild/
+
+  run yum install -y centos-release-scl
+  run yum install -y devtoolset-6
+fi
+
+run yum install -y rpm-build rpmdevtools tar ${DEPENDED_PACKAGES}
+
+if [ -x /usr/bin/rpmdev-setuptree ]; then
+  rm -rf .rpmmacros
+  run rpmdev-setuptree
+else
+  run cat <<EOM > ~/.rpmmacros
+%_topdir ${HOME}/rpmbuild
+EOM
+  run mkdir -p ~/rpmbuild/SOURCES
+  run mkdir -p ~/rpmbuild/SPECS
+  run mkdir -p ~/rpmbuild/BUILD
+  run mkdir -p ~/rpmbuild/RPMS
+  run mkdir -p ~/rpmbuild/SRPMS
+fi
+
+repository="/vagrant/repositories/${distribution}/${distribution_version}"
+rpm_dir="${repository}/${architecture}/Packages"
+srpm_dir="${repository}/source/SRPMS"
+run mkdir -p "${rpm_dir}" "${srpm_dir}"
+
+# for debug
+# rpmbuild_options="$rpmbuild_options --define 'optflags -O0 -g3'"
+
+cd
+
+if [ -n "${SOURCE_ARCHIVE}" ]; then
+  run cp /vagrant/tmp/${SOURCE_ARCHIVE} rpmbuild/SOURCES/
+else
+  run cp /vagrant/tmp/${PACKAGE}-${VERSION}.* rpmbuild/SOURCES/
+fi
+run cp \
+    /vagrant/tmp/${distribution}/${PACKAGE}.spec \
+    rpmbuild/SPECS/
+
+cat <<BUILD > build.sh
+#!/bin/bash
+
+rpmbuild -ba ${rpmbuild_options} rpmbuild/SPECS/${PACKAGE}.spec
+BUILD
+run chmod +x build.sh
+if [ "${distribution_version}" = 6 ]; then
+  run scl enable devtoolset-6 ./build.sh
+else
+  run ./build.sh
+fi
+
+run mv rpmbuild/RPMS/*/* "${rpm_dir}/"
+run mv rpmbuild/SRPMS/* "${srpm_dir}/"

-- 
To stop receiving notification emails like this one, please contact
['"commits@arrow.apache.org" <commits@arrow.apache.org>'].

Reply via email to