1 $! File: stage_curl_install.com
5 $! This updates or removes the GNV$CURL.EXE and related files for the
6 $! new_gnu:[*...] directory tree for running the self tests.
8 $! The files installed/removed are:
9 $! [usr.bin]gnv$curl.exe
10 $! [usr.bin]curl-config.
11 $! [usr.lib]gnv$libcurl.exe
12 $! [usr.bin]curl. hard link for [usr.bin]gnv$curl.exe
13 $! [usr.include.curl]curl.h
14 $! [usr.include.curl]curlver.h
15 $! [usr.include.curl]easy.h
16 $! [usr.include.curl]mprintf.h
17 $! [usr.include.curl]multi.h
18 $! [usr.include.curl]stdcheaders.h
19 $! [usr.include.curl]typecheck-gcc.h
20 $! [usr.lib.pkgconfig]libcurl.pc
21 $! [usr.share.man.man1]curl-config.1
22 $! [usr.share.man.man1]curl.1
23 $! [usr.share.man.man3]curl*.3
24 $! [usr.share.man.man3]libcurl*.3
25 $! Future: A symbolic link to the release notes?
27 $! Copyright 2012, John Malmberg
29 $! Permission to use, copy, modify, and/or distribute this software for any
30 $! purpose with or without fee is hereby granted, provided that the above
31 $! copyright notice and this permission notice appear in all copies.
33 $! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
34 $! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
35 $! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
36 $! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
37 $! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
38 $! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
39 $! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
42 $! 20-Aug-2012 J. Malmberg
44 $!===========================================================================
46 $ arch_type = f$getsyi("ARCH_NAME")
47 $ arch_code = f$extract(0, 1, arch_type)
49 $ if arch_code .nes. "V"
51 $ set proc/parse=extended
55 $! If the first parameter begins with "r" or "R" then this is to
56 $! remove the files instead of installing them.
57 $ remove_filesq = f$edit(p1, "upcase,trim")
58 $ remove_filesq = f$extract(0, 1, remove_filesq)
60 $ if remove_filesq .eqs. "R" then remove_files = 1
63 $! If we are staging files, make sure that the libcurl.pc and curl-config
65 $ if remove_files .eq. 0
67 $ if f$search("[--]libcurl.pc") .eqs. ""
69 $ @build_libcurl_pc.com
71 $ if f$search("[--]curl-config") .eqs. ""
73 $ @build_curl-config_script.com
80 $ dest_dirs1 = "[usr],[usr.bin],[usr.include],[usr.include.curl]"
81 $ dest_dirs2 = ",[usr.bin],[usr.lib.pkgconfig],[usr.share]"
82 $ dest_dirs3 = ",[usr.share.man],[usr.share.man.man1],[usr.share.man.man3]"
83 $ dest_dirs = dest_dirs1 + dest_dirs2 + dest_dirs3
86 $! Alias links needed.
87 $!-------------------------
88 $ source_curl = "gnv$curl.exe"
89 $ dest_curl = "[bin]gnv$curl.exe"
90 $ curl_links = "[bin]curl."
91 $ new_gnu = "new_gnu:"
94 $! Create the directories if they do not exist
95 $!---------------------------------------------
98 $ this_dir = f$element(i, ",", dest_dirs)
100 $ if this_dir .eqs. "" then goto curl_dir_loop
101 $ if this_dir .eqs. "," then goto curl_dir_loop_end
102 $! Just create the directories, do not delete them.
103 $! --------------------------------------------------
104 $ if remove_files .eq. 0
106 $ create/dir 'new_gnu''this_dir'/prot=(o:rwed)
112 $! Need to add in the executable file
113 $!-----------------------------------
114 $ if remove_files .eq. 0
116 $ copy [--.src]curl.exe 'new_gnu'[usr.bin]gnv$curl.exe/prot=w:re
117 $ copy [--]curl-config. 'new_gnu'[usr.bin]curl-config./prot=w:re
118 $ copy sys$disk:[]gnv$libcurl.exe 'new_gnu'[usr.lib]gnv$libcurl.exe/prot=w:re
121 $ if remove_files .eq. 0
123 $ set file/enter='new_gnu'[bin]curl. 'new_gnu'[usr.bin]gnv$curl.exe
125 $ file = "''new_gnu'[bin]curl."
126 $ if f$search(file) .nes. "" then set file/remove 'file';*
130 $ if remove_files .eq. 0
132 $ copy [--.include.curl]curl.h 'new_gnu'[usr.include.curl]curl.h
133 $ copy [--.include.curl]system.h -
134 'new_gnu'[usr.include.curl]system.h
135 $ copy [--.include.curl]curlver.h -
136 'new_gnu'[usr.include.curl]curlver.h
137 $ copy [--.include.curl]easy.h -
138 'new_gnu'[usr.include.curl]easy.h
139 $ copy [--.include.curl]mprintf.h -
140 'new_gnu'[usr.include.curl]mprintf.h
141 $ copy [--.include.curl]multi.h -
142 'new_gnu'[usr.include.curl]multi.h
143 $ copy [--.include.curl]stdcheaders.h -
144 'new_gnu'[usr.include.curl]stdcheaders.h
145 $ copy [--.include.curl]typecheck-gcc.h -
146 'new_gnu'[usr.include.curl]typecheck-gcc.h
147 $ copy [--]libcurl.pc 'new_gnu'[usr.lib.pkgconfig]libcurl.pc
149 $ copy [--.docs]curl-config.1 'new_gnu'[usr.share.man.man1]curl-config.1
150 $ copy [--.docs]curl.1 'new_gnu'[usr.share.man.man1]curl.1
152 $ copy [--.docs.libcurl]*.3 -
153 'new_gnu'[usr.share.man.man3]*.3
156 $ file = "''new_gnu'[usr.bin]curl-config."
157 $ if f$search(file) .nes. "" then delete 'file';*
158 $ file = "''new_gnu'[usr.bin]gnv$curl.exe"
159 $ if f$search(file) .nes. "" then delete 'file';*
160 $ file = "''new_gnu'[usr.lib]gnv$libcurl.exe"
161 $ if f$search(file) .nes. "" then delete 'file';*
162 $ file = "''new_gnu'[usr.include.curl]*.h"
163 $ if f$search(file) .nes. "" then delete 'file';*
164 $ file = "''new_gnu'[usr.share.man.man1]curl-config.1"
165 $ if f$search(file) .nes. "" then delete 'file';*
166 $ file = "''new_gnu'[usr.share.man.man1]curl.1"
167 $ if f$search(file) .nes. "" then delete 'file';*
168 $ file = "''new_gnu'[usr.share.man.man3]curl*.3"
169 $ if f$search(file) .nes. "" then delete 'file';*
170 $ file = "''new_gnu'[usr.share.man.man3]libcurl*.3"
171 $ if f$search(file) .nes. "" then delete 'file';*