build.sh 758 B

1234567891011121314151617181920212223
  1. #!/bin/sh
  2. set -e
  3. VERSION=`cat ../version`-0
  4. if [ ! $ARCH ]; then
  5. ARCH=`dpkg --print-architecture`
  6. fi
  7. rm -r data 2>/dev/null || true
  8. cp -r static data
  9. mkdir -p data/usr data/usr/sbin data/DEBIAN
  10. sed "s/%ARCHITECTURE%/${ARCH}/" -i data/DEBIAN/control
  11. sed "s/%VERSION%/${VERSION}/" -i data/DEBIAN/control
  12. if [ -n "${NACL_SHARED}" ]; then
  13. sed "s/\\(Depends: .*\\)/\\1, libnacl | libnacl-ref | libnacl-build/" -i data/DEBIAN/control
  14. fi
  15. cp ../out/quicktun.raw data/usr/sbin/
  16. cp ../out/quicktun.nacl0 data/usr/sbin/
  17. cp ../out/quicktun.nacltai data/usr/sbin/
  18. cp ../out/quicktun.debian data/usr/sbin/
  19. cp ../out/quicktun.keypair data/usr/sbin/
  20. cp ../out/quicktun data/usr/sbin/
  21. fakeroot dpkg-deb --build data quicktun-${VERSION}_${ARCH}.deb
  22. mv quicktun*.deb ../out/