#!/usr/bin/env ksh #****************************************************************************** # @(#) build script for HC RPM packages (uses 'rpmbuild') #****************************************************************************** # @(#) Copyright (C) 2014 by KUDOS BVBA (info@kudos.be). All rights reserved. # # This program is a free software; you can redistribute it and/or modify # it under the same terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details #****************************************************************************** #****************************************************************************** # Requires following build (dir) structures: # # hc_build_linux_rpms.sh # BUILD/ # BUILDROOT/ # RPMS/ # opt/ # opt/hc/bin/ # opt/hc/lib/*/ # etc/opt/hc/ # SPECS/ # SRPMS/ # # Build order: # 1) Copy sources/scripts to the correct locations # 2) Copy template, build and installer script files into correct locations # 3) Execute hc_build_linux_rpms.sh # 4) RPM packages may be found in the RPMS directory #****************************************************************************** BUILD_DIR="$(dirname $0)" # clean up previous packages rm -f ${BUILD_DIR}/RPMS/*/* >/dev/null # build main packages rpmbuild -bb ${BUILD_DIR}/SPECS/hc-linux.spec rpmbuild -bb ${BUILD_DIR}/SPECS/hc-linux-platform.spec # build core plugins rpmbuild -bb ${BUILD_DIR}/SPECS/hc-notify-eif.spec rpmbuild -bb ${BUILD_DIR}/SPECS/hc-notify-sms.spec rpmbuild -bb ${BUILD_DIR}/SPECS/hc-display-init.spec rpmbuild -bb ${BUILD_DIR}/SPECS/hc-display-json.spec rpmbuild -bb ${BUILD_DIR}/SPECS/hc-display-csv.spec rpmbuild -bb ${BUILD_DIR}/SPECS/hc-display-terse.spec rpmbuild -bb ${BUILD_DIR}/SPECS/hc-display-zenoss.spec print "List of built packages:" ls -l ${BUILD_DIR}/RPMS/*/* exit 0 #****************************************************************************** # END of script #******************************************************************************