| #!/usr/bin/make -f |
| # |
| # 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. |
| |
| # -*- makefile -*- |
| |
| # 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 |
| |
| hive_pkg_name=hive |
| |
| %: |
| dh $@ |
| |
| override_dh_auto_build: |
| mkdir -p /tmp/debian-hive/.ivy |
| bash debian/do-component-build |
| touch $@ |
| |
| .PHONY: server2 |
| .PHONY: metastore |
| .PHONY: hcatalog-server |
| .PHONY: webhcat-server |
| server2 metastore hcatalog-server webhcat-server: |
| bash debian/init.d.tmpl debian/hive-$@.svc deb debian/${hive_pkg_name}-$@.init |
| |
| override_dh_auto_install: server2 metastore hcatalog-server webhcat-server |
| cp debian/hive-site.xml . |
| cp debian/hive.1 . |
| cp debian/hive-hcatalog.1 . |
| bash debian/install_hive.sh \ |
| --prefix=debian/tmp \ |
| --build-dir=build/dist \ |
| --doc-dir=debian/tmp/usr/share/doc/${hive_pkg_name} |
| # We need to get rid of jars that happen to be shipped in other CDH packages |
| rm -f debian/tmp/usr/lib/hive/lib/hbase-*.jar debian/tmp/usr/lib/hive/lib/zookeeper-*.jar |
| ln -s /usr/lib/hbase/hbase.jar debian/tmp/usr/lib/hive/lib |
| ln -s /usr/lib/zookeeper/zookeeper.jar debian/tmp/usr/lib/hive/lib |
| # Workaround for BIGTOP-583 |
| rm -f debian/tmp/usr/lib/hive/lib/slf4j-log4j12-*.jar |
| bash debian/build-hive-install-file.sh >> debian/hive.install |
| |
| # Hive source contains a directory docs/changes that is interpreted a special way in Debian 7+ packaging |
| mv docs/changes docs/changes_ |