GNS3 Docker Images
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

build_ostinato 1.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #!/bin/sh
  2. set -e -x
  3. DEB_VERSION=0.9-0.1
  4. GIT_COMMIT=v0.9
  5. owner=$(stat -c "%u:%g" /build)
  6. cd
  7. apt-get update
  8. apt-get install -y --no-install-recommends build-essential debhelper
  9. apt-get install -y --no-install-recommends git ca-certificates
  10. apt-get install -y --no-install-recommends libpcap-dev libprotobuf-dev libqt4-dev protobuf-compiler
  11. git clone https://github.com/pstavirs/ostinato.git
  12. cd ostinato
  13. [ -n "$GIT_COMMIT" ] && git checkout "$GIT_COMMIT"
  14. [ -d binding ] || git revert -n ed007cac
  15. tar xf /build/ostinato_*.debian.tar.xz
  16. if [ -n "$DEB_VERSION" ]; then
  17. cat - debian/changelog > debian/changelog.new << EOF
  18. ostinato (${DEB_VERSION}) unstable; urgency=low
  19. * New upstream release.
  20. -- Bernhard Ehlers <be@bernhard-ehlers.de> $(TZ=CET date -R)
  21. EOF
  22. mv debian/changelog.new debian/changelog
  23. fi
  24. dpkg-buildpackage -us -uc -b
  25. chown "$owner" ../ostinato_*.deb
  26. cp -p ../ostinato_*.deb /build/
  27. cd binding
  28. apt-get install -y --no-install-recommends python python-setuptools
  29. python setup.py sdist
  30. [ -n "$DEB_VERSION" ] && mv dist/python-ostinato-*.tar.gz "dist/python-ostinato-$DEB_VERSION.tar.gz"
  31. chown "$owner" dist/python-ostinato-*.tar.gz
  32. cp -p dist/python-ostinato-*.tar.gz /build/