pcsi_product_gnv_curl.com 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  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 2013 - 2022, 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. $! SPDX-License-Identifier: ISC
  23. $!
  24. $! 16-Jun-2009 J.Malmberg
  25. $!
  26. $!=========================================================================
  27. $!
  28. $! Save default
  29. $ default_dir = f$environment("DEFAULT")
  30. $!
  31. $! Put things back on error.
  32. $ on warning then goto all_exit
  33. $!
  34. $!
  35. $ can_build = 1
  36. $ producer = f$trnlnm("GNV_PCSI_PRODUCER")
  37. $ if producer .eqs. ""
  38. $ then
  39. $ write sys$output "GNV_PCSI_PRODUCER logical name has not been set."
  40. $ can_build = 0
  41. $ endif
  42. $ producer_full_name = f$trnlnm("GNV_PCSI_PRODUCER_FULL_NAME")
  43. $ if producer_full_name .eqs. ""
  44. $ then
  45. $ write sys$output -
  46. "GNV_PCSI_PRODUCER_FULL_NAME logical name has not been set."
  47. $ can_build = 0
  48. $ endif
  49. $ stage_root_name = f$trnlnm("STAGE_ROOT")
  50. $ if stage_root_name .eqs. ""
  51. $ then
  52. $ write sys$output "STAGE_ROOT logical name has not been set."
  53. $ can_build = 0
  54. $ endif
  55. $!
  56. $ if (can_build .eq. 0)
  57. $ then
  58. $ write sys$output "Not able to build a kit."
  59. $ goto all_exit
  60. $ endif
  61. $!
  62. $! Make sure that the kit name is up to date for this build
  63. $!----------------------------------------------------------
  64. $ @MAKE_PCSI_CURL_KIT_NAME.COM
  65. $!
  66. $!
  67. $! Make sure that the image is built
  68. $!----------------------------------
  69. $ arch_name = f$edit(f$getsyi("arch_name"),"UPCASE")
  70. $ if f$search("[--.src]curl.exe") .eqs. ""
  71. $ then
  72. $ build_it = 1
  73. $ libfile = "[.packages.vms.''arch_name']curllib.olb"
  74. $ if f$search(libfile) .nes. ""
  75. $ then
  76. $ build_it = 0
  77. $ else
  78. $ ! GNV based build
  79. $ libfile = "[.lib.^.libs]libcurl.a"
  80. $ if f$search(libfile) .nes. ""
  81. $ then
  82. $ build_it = 0;
  83. $ endif
  84. $ endif
  85. $ if build_it .eq. 1
  86. $ then
  87. $ @build_vms list
  88. $ endif
  89. $ @gnv_link_curl.com
  90. $ endif
  91. $!
  92. $! Make sure that the release note file name is up to date
  93. $!---------------------------------------------------------
  94. $ @BUILD_GNV_CURL_RELEASE_NOTES.COM
  95. $!
  96. $!
  97. $! Make sure that the source has been backed up.
  98. $!----------------------------------------------
  99. $ arch_type = f$getsyi("ARCH_NAME")
  100. $ arch_code = f$extract(0, 1, arch_type)
  101. $ @backup_gnv_curl_src.com
  102. $!
  103. $! Regenerate the PCSI description file.
  104. $!--------------------------------------
  105. $ @BUILD_GNV_CURL_PCSI_DESC.COM
  106. $!
  107. $! Regenerate the PCSI Text file.
  108. $!---------------------------------
  109. $ @BUILD_GNV_CURL_PCSI_TEXT.COM
  110. $!
  111. $!
  112. $! Parse the kit name into components.
  113. $!---------------------------------------
  114. $ kit_name = f$trnlnm("GNV_PCSI_KITNAME")
  115. $ if kit_name .eqs. ""
  116. $ then
  117. $ write sys$output "@MAKE_PCSI_CURL_KIT_NAME.COM has not been run."
  118. $ goto all_exit
  119. $ endif
  120. $ producer = f$element(0, "-", kit_name)
  121. $ base = f$element(1, "-", kit_name)
  122. $ product_name = f$element(2, "-", kit_name)
  123. $ mmversion = f$element(3, "-", kit_name)
  124. $ majorver = f$extract(0, 3, mmversion)
  125. $ minorver = f$extract(3, 2, mmversion)
  126. $ updatepatch = f$element(4, "-", kit_name)
  127. $ if updatepatch .eqs. "" then updatepatch = ""
  128. $!
  129. $ version_fao = "!AS.!AS"
  130. $ mmversion = f$fao(version_fao, "''majorver'", "''minorver'")
  131. $ if updatepatch .nes. ""
  132. $ then
  133. $ version = "''mmversion'" + "-" + updatepatch
  134. $ else
  135. $ version = "''mmversion'"
  136. $ endif
  137. $!
  138. $ @stage_curl_install remove
  139. $ @stage_curl_install
  140. $!
  141. $! Move to the base directories
  142. $ set def [--]
  143. $ current_default = f$environment("DEFAULT")
  144. $ my_dir = f$parse(current_default,,,"DIRECTORY") - "[" - "<" - ">" - "]"
  145. $!
  146. $!
  147. $!
  148. $ source = "''default_dir'"
  149. $ src1 = "new_gnu:[usr.bin],"
  150. $ src2 = "new_gnu:[usr.include.curl],"
  151. $ src3 = "new_gnu:[usr.lib],"
  152. $ src4 = "new_gnu:[usr.lib.pkgconfig],"
  153. $ src5 = "new_gnu:[usr.share.man.man1],"
  154. $ src6 = "new_gnu:[usr.share.man.man3],"
  155. $ src7 = "new_gnu:[vms_src],"
  156. $ src8 = "new_gnu:[common_src],"
  157. $ src9 = "prj_root:[''my_dir'],prj_root:[''my_dir'.src]"
  158. $ gnu_src = src1 + src2 + src3 + src4 + src5 + src6 + src7 + src8 + src9
  159. $!
  160. $!
  161. $ base = ""
  162. $ if arch_name .eqs. "ALPHA" then base = "AXPVMS"
  163. $ if arch_name .eqs. "IA64" then base = "I64VMS"
  164. $ if arch_name .eqs. "VAX" then base = "VAXVMS"
  165. $!
  166. $ if base .eqs. "" then exit 44
  167. $!
  168. $ pcsi_option = "/option=noconfirm"
  169. $ if arch_code .eqs. "V"
  170. $ then
  171. $ pcsi_option = ""
  172. $ endif
  173. $!
  174. $!
  175. $product package 'product_name' -
  176. /base='base' -
  177. /producer='producer' -
  178. /source='source' -
  179. /destination=STAGE_ROOT:[KIT] -
  180. /material=('gnu_src','source') -
  181. /format=sequential 'pcsi_option'
  182. $!
  183. $!
  184. $! VAX can not do a compressed kit.
  185. $! ZIP -9 "-V" does a better job, so no reason to normally build a compressed
  186. $! kit.
  187. $!----------------------------------
  188. $if p1 .eqs. "COMPRESSED"
  189. $then
  190. $ if arch_code .nes. "V"
  191. $ then
  192. $ product copy /options=(novalidate, noconfirm) /format=compressed -
  193. 'product_name' -
  194. /source=stage_root:[kit]/dest=stage_root:[kit] -
  195. /version='version'/base='base'
  196. $ endif
  197. $endif
  198. $!
  199. $all_exit:
  200. $ set def 'default_dir'
  201. $ exit