Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

create_snf-server_debian 1.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. #!/bin/bash
  2. #
  3. # Script to create a debian package for SNFServer.
  4. #
  5. # Usage: create_snf-server_debian X.Y.Z
  6. #
  7. # where X.Y.Z is the version of SNFServer.
  8. #
  9. # $Id: configure.in,v 1.33 2008/02/08 15:10:17 adeniz Exp $
  10. #
  11. # Author: Alban Deniz
  12. #
  13. # Copyright (C) 2013 by MicroNeil Corporation. All rights reserved.
  14. # See www.armresearch.com for the copyright terms.
  15. #
  16. #######################################################################
  17. VERSION=$1
  18. # Output message and exit.
  19. error_exit() {
  20. echo Error running \'$1\' in directory $(pwd).
  21. exit 1
  22. }
  23. # Create the tarball distribution.
  24. make dist
  25. if [ $? -ne 0 ]
  26. then
  27. error_exit "make dist"
  28. fi
  29. # Prepare the directory.
  30. rm -rf snf-server-$VERSION
  31. if [ $? -ne 0 ]
  32. then
  33. error_exit "rm -rf snf-server-$VERSION"
  34. fi
  35. tar xvzf snf-server-$VERSION.tar.gz
  36. if [ $? -ne 0 ]
  37. then
  38. error_exit "tar xvzf snf-server-$VERSION.tar.gz"
  39. fi
  40. cd snf-server-$VERSION
  41. if [ $? -ne 0 ]
  42. then
  43. error_exit "cd snf-server-$VERSION"
  44. fi
  45. # Initialize the package.
  46. echo | dh_make --single --copyright artistic -f ../snf-server-$VERSION.tar.gz
  47. if [ $? -ne 0 ]
  48. then
  49. error_exit "echo | dh_make --single --copyright artistic -f ../snf-server-$VERSION.tar.gz"
  50. fi
  51. # Remove unneeded directory.
  52. mv debian debian.orig
  53. if [ $? -ne 0 ]
  54. then
  55. error_exit "mv debian debian.orig"
  56. exit $ERROR_EXIT
  57. fi
  58. # Copy package files.
  59. cp --archive ../Packages/Ubuntu/snf-server debian
  60. if [ $? -ne 0 ]
  61. then
  62. error_exit "cp --archive ../Packages/Ubuntu/snf-server debian"
  63. exit $ERROR_EXIT
  64. fi
  65. # Build the source package.
  66. debuild -S -us -uc -rfakeroot
  67. if [ $? -ne 0 ]
  68. then
  69. error_exit "debuild -S -us -uc -rfakeroot"
  70. fi
  71. # Build the binary package.
  72. dpkg-buildpackage -rfakeroot -us -uc
  73. if [ $? -ne 0 ]
  74. then
  75. error_exit "dpkg-buildpackage -rfakeroot -us -uc"
  76. fi
  77. # Success.
  78. exit 0