pcsi_product_gnv_curl.com 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. $! File: PCSI_PRODUCT_GNV_CURL.COM
  2. $!
  3. $! $Id$
  4. $!
  5. $! This command file packages up the product CURL into a sequential
  6. $! format kit
  7. $!
  8. $! Copyright 2009 - 2020, John Malmberg
  9. $!
  10. $! Permission to use, copy, modify, and/or distribute this software for any
  11. $! purpose with or without fee is hereby granted, provided that the above
  12. $! copyright notice and this permission notice appear in all copies.
  13. $!
  14. $! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  15. $! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  16. $! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  17. $! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  18. $! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  19. $! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
  20. $! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  21. $!
  22. $! 16-Jun-2009 J.Malmberg
  23. $!
  24. $!=========================================================================
  25. $!
  26. $! Save default
  27. $ default_dir = f$environment("DEFAULT")
  28. $!
  29. $! Put things back on error.
  30. $ on warning then goto all_exit
  31. $!
  32. $!
  33. $ can_build = 1
  34. $ producer = f$trnlnm("GNV_PCSI_PRODUCER")
  35. $ if producer .eqs. ""
  36. $ then
  37. $ write sys$output "GNV_PCSI_PRODUCER logical name has not been set."
  38. $ can_build = 0
  39. $ endif
  40. $ producer_full_name = f$trnlnm("GNV_PCSI_PRODUCER_FULL_NAME")
  41. $ if producer_full_name .eqs. ""
  42. $ then
  43. $ write sys$output -
  44. "GNV_PCSI_PRODUCER_FULL_NAME logical name has not been set."
  45. $ can_build = 0
  46. $ endif
  47. $ stage_root_name = f$trnlnm("STAGE_ROOT")
  48. $ if stage_root_name .eqs. ""
  49. $ then
  50. $ write sys$output "STAGE_ROOT logical name has not been set."
  51. $ can_build = 0
  52. $ endif
  53. $!
  54. $ if (can_build .eq. 0)
  55. $ then
  56. $ write sys$output "Not able to build a kit."
  57. $ goto all_exit
  58. $ endif
  59. $!
  60. $! Make sure that the kit name is up to date for this build
  61. $!----------------------------------------------------------
  62. $ @MAKE_PCSI_CURL_KIT_NAME.COM
  63. $!
  64. $!
  65. $! Make sure that the image is built
  66. $!----------------------------------
  67. $ arch_name = f$edit(f$getsyi("arch_name"),"UPCASE")
  68. $ if f$search("[--.src]curl.exe") .eqs. ""
  69. $ then
  70. $ build_it = 1
  71. $ libfile = "[.packages.vms.''arch_name']curllib.olb"
  72. $ if f$search(libfile) .nes. ""
  73. $ then
  74. $ build_it = 0
  75. $ else
  76. $ ! GNV based build
  77. $ libfile = "[.lib.^.libs]libcurl.a"
  78. $ if f$search(libfile) .nes. ""
  79. $ then
  80. $ build_it = 0;
  81. $ endif
  82. $ endif
  83. $ if build_it .eq. 1
  84. $ then
  85. $ @build_vms list
  86. $ endif
  87. $ @gnv_link_curl.com
  88. $ endif
  89. $!
  90. $! Make sure that the release note file name is up to date
  91. $!---------------------------------------------------------
  92. $ @BUILD_GNV_CURL_RELEASE_NOTES.COM
  93. $!
  94. $!
  95. $! Make sure that the source has been backed up.
  96. $!----------------------------------------------
  97. $ arch_type = f$getsyi("ARCH_NAME")
  98. $ arch_code = f$extract(0, 1, arch_type)
  99. $ @backup_gnv_curl_src.com
  100. $!
  101. $! Regenerate the PCSI description file.
  102. $!--------------------------------------
  103. $ @BUILD_GNV_CURL_PCSI_DESC.COM
  104. $!
  105. $! Regenerate the PCSI Text file.
  106. $!---------------------------------
  107. $ @BUILD_GNV_CURL_PCSI_TEXT.COM
  108. $!
  109. $!
  110. $! Parse the kit name into components.
  111. $!---------------------------------------
  112. $ kit_name = f$trnlnm("GNV_PCSI_KITNAME")
  113. $ if kit_name .eqs. ""
  114. $ then
  115. $ write sys$output "@MAKE_PCSI_CURL_KIT_NAME.COM has not been run."
  116. $ goto all_exit
  117. $ endif
  118. $ producer = f$element(0, "-", kit_name)
  119. $ base = f$element(1, "-", kit_name)
  120. $ product_name = f$element(2, "-", kit_name)
  121. $ mmversion = f$element(3, "-", kit_name)
  122. $ majorver = f$extract(0, 3, mmversion)
  123. $ minorver = f$extract(3, 2, mmversion)
  124. $ updatepatch = f$element(4, "-", kit_name)
  125. $ if updatepatch .eqs. "" then updatepatch = ""
  126. $!
  127. $ version_fao = "!AS.!AS"
  128. $ mmversion = f$fao(version_fao, "''majorver'", "''minorver'")
  129. $ if updatepatch .nes. ""
  130. $ then
  131. $ version = "''mmversion'" + "-" + updatepatch
  132. $ else
  133. $ version = "''mmversion'"
  134. $ endif
  135. $!
  136. $ @stage_curl_install remove
  137. $ @stage_curl_install
  138. $!
  139. $! Move to the base directories
  140. $ set def [--]
  141. $ current_default = f$environment("DEFAULT")
  142. $ my_dir = f$parse(current_default,,,"DIRECTORY") - "[" - "<" - ">" - "]"
  143. $!
  144. $!
  145. $!
  146. $ source = "''default_dir'"
  147. $ src1 = "new_gnu:[usr.bin],"
  148. $ src2 = "new_gnu:[usr.include.curl],"
  149. $ src3 = "new_gnu:[usr.lib],"
  150. $ src4 = "new_gnu:[usr.lib.pkgconfig],"
  151. $ src5 = "new_gnu:[usr.share.man.man1],"
  152. $ src6 = "new_gnu:[usr.share.man.man3],"
  153. $ src7 = "new_gnu:[vms_src],"
  154. $ src8 = "new_gnu:[common_src],"
  155. $ src9 = "prj_root:[''my_dir'],prj_root:[''my_dir'.src]"
  156. $ gnu_src = src1 + src2 + src3 + src4 + src5 + src6 + src7 + src8 + src9
  157. $!
  158. $!
  159. $ base = ""
  160. $ if arch_name .eqs. "ALPHA" then base = "AXPVMS"
  161. $ if arch_name .eqs. "IA64" then base = "I64VMS"
  162. $ if arch_name .eqs. "VAX" then base = "VAXVMS"
  163. $!
  164. $ if base .eqs. "" then exit 44
  165. $!
  166. $ pcsi_option = "/option=noconfirm"
  167. $ if arch_code .eqs. "V"
  168. $ then
  169. $ pcsi_option = ""
  170. $ endif
  171. $!
  172. $!
  173. $product package 'product_name' -
  174. /base='base' -
  175. /producer='producer' -
  176. /source='source' -
  177. /destination=STAGE_ROOT:[KIT] -
  178. /material=('gnu_src','source') -
  179. /format=sequential 'pcsi_option'
  180. $!
  181. $!
  182. $! VAX can not do a compressed kit.
  183. $! ZIP -9 "-V" does a better job, so no reason to normally build a compressed
  184. $! kit.
  185. $!----------------------------------
  186. $if p1 .eqs. "COMPRESSED"
  187. $then
  188. $ if arch_code .nes. "V"
  189. $ then
  190. $ product copy /options=(novalidate, noconfirm) /format=compressed -
  191. 'product_name' -
  192. /source=stage_root:[kit]/dest=stage_root:[kit] -
  193. /version='version'/base='base'
  194. $ endif
  195. $endif
  196. $!
  197. $all_exit:
  198. $ set def 'default_dir'
  199. $ exit