Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

create_snf-server_debian 2.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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. # Create the required changelog file with this version.
  66. echo "snf-server ($VERSION-1) stable; urgency=low
  67. * Initial release
  68. -- support <support@armresearch.com> $(date +'%a, %d %b %Y %H:%M:%S %z')
  69. " > debian/changelog
  70. # Build the source package.
  71. debuild -S -us -uc -rfakeroot
  72. if [ $? -ne 0 ]
  73. then
  74. error_exit "debuild -S -us -uc -rfakeroot"
  75. fi
  76. # Build the binary package.
  77. dpkg-buildpackage -rfakeroot -us -uc
  78. if [ $? -ne 0 ]
  79. then
  80. error_exit "dpkg-buildpackage -rfakeroot -us -uc"
  81. fi
  82. # Success.
  83. exit 0