debian_9.sh 1.1 KB

123456789101112131415161718
  1. #!/bin/bash -xe
  2. BUILDPKGS='build-essential dpkg-dev autoconf libtool rpm alien libssl-dev libxt-dev libpq-dev libexpat1-dev libedit-dev libncurses5-dev libical-dev libhwloc-dev pkg-config tcl-dev tk-dev python-dev swig'
  3. DEPPKGS='expat postgresql postgresql-contrib'
  4. TESTPKGS='python-pip sudo man-db'
  5. if [ "x${DEBIAN_FRONTEND}x" == "xx" ]; then
  6. export DEBIAN_FRONTEND=noninteractive
  7. fi
  8. ${DOCKER_EXEC} apt-get -qq update
  9. ${DOCKER_EXEC} apt-get install -y ${BUILDPKGS} ${DEPPKGS} ${TESTPKGS}
  10. ${DOCKER_EXEC} ./autogen.sh
  11. ${DOCKER_EXEC} ./configure
  12. ${DOCKER_EXEC} make dist
  13. ${DOCKER_EXEC} /bin/bash -c 'mkdir -p /root/rpmbuild/SOURCES/; cp -fv pbspro-*.tar.gz /root/rpmbuild/SOURCES/'
  14. ${DOCKER_EXEC} /bin/bash -c 'CFLAGS="-g -O2 -Wall -Werror" rpmbuild -bb --nodeps pbspro.spec'
  15. ${DOCKER_EXEC} /bin/bash -c 'alien --to-deb --scripts /root/rpmbuild/RPMS/x86_64/pbspro-server-??.*.x86_64.rpm'
  16. ${DOCKER_EXEC} /bin/bash -c 'dpkg -i pbspro-server_*_amd64.deb'
  17. ${DOCKER_EXEC} /bin/bash -c 'sed -i "s@PBS_START_MOM=0@PBS_START_MOM=1@" /etc/pbs.conf'
  18. ${DOCKER_EXEC} /etc/init.d/pbs start