diff --git a/Makefile b/Makefile index 3ff03ee942..bae7c8208c 100644 --- a/Makefile +++ b/Makefile @@ -55,6 +55,7 @@ all: $(PAGES) cd rfc && make cd dev && make cd windows && make + cd qnx && make cd tiny && make cd logo && make cd trurl && make diff --git a/qnx/Makefile b/qnx/Makefile new file mode 100644 index 0000000000..f145eaf7d7 --- /dev/null +++ b/qnx/Makefile @@ -0,0 +1,20 @@ +ROOT=.. + +SRCROOT=$(ROOT)/cvssource +DOCROOT=$(SRCROOT)/docs + +include $(ROOT)/mainparts.mk +include $(ROOT)/setup.mk + +PAGES=index.html + +all: $(PAGES) + +index.html: _index.html $(MAINPARTS) files.gen + $(ACTION) + +files.gen: mkfiles.pl dl/* + ./mkfiles.pl >$@ + +clean: + rm -f $(PAGES) *.gen diff --git a/qnx/_index.html b/qnx/_index.html new file mode 100644 index 0000000000..637d166357 --- /dev/null +++ b/qnx/_index.html @@ -0,0 +1,95 @@ +#include "_doctype.html" + + curl for QNX +#include "css.t" + + + +#define CURL_URL /qnx +#define QNX_MAIN + +#include "_menu.html" +#include "setup.t" +#include "files.gen" + +WHERE2(Download, "/download.html", QNX) + +TITLE(curl for QNX) +
+Related: +
Changelog +
License +
Support +
+

+ These are official curl and libcurl builds for QNX. + +

+ +#ifdef QNX_SDK70_DATE +# define QNX_CURLDATE QNX_SDK70_DATE +#else +# ifdef QNX_SDK71_DATE +# define QNX_CURLDATE QNX_SDK71_DATE +# else +# define QNX_CURLDATE QNX_SDK80_DATE +# endif +#endif + + + + + + + + +
curl version QNX_CURLVER
Build QNX_CURLVER_PACKAGE
Date QNX_CURLDATE
Changes QNX_CURLVER changelog
+ +#ifdef QNX_SDK80_FILENAME +

+ curl for SDK 8.0 + curl QNX_CURLVER for SDK 8.0
+#ifdef QNX_SDK80_SIG +GPG signature: here
+#endif +Size: QNX_SDK80_SIZE
+sha256: QNX_SDK80_SHA256 +#endif + +#ifdef QNX_SDK71_FILENAME +

+ curl for SDK 7.1 + curl QNX_CURLVER for SDK 7.1
+#ifdef QNX_SDK71_SIG +GPG signature: here
+#endif +Size: QNX_SDK71_SIZE
+sha256: QNX_SDK71_SHA256 +#endif + +#ifdef QNX_SDK70_FILENAME +

+ curl for SDK 7.0 +

+ curl QNX_CURLVER for SDK 7.0 +
+#ifdef QNX_SDK70_SIG +GPG signature: here
+#endif +Size: QNX_SDK70_SIZE
+sha256: QNX_SDK70_SHA256 +
+#endif + +SUBTITLE(Contents) +

+ The download archives contain curl and libcurl for all supported targets for + each indvidual SDK branch - as gzipped tarballs. + +#include "_footer.html" + + diff --git a/qnx/mkfiles.pl b/qnx/mkfiles.pl new file mode 100755 index 0000000000..3c786e7841 --- /dev/null +++ b/qnx/mkfiles.pl @@ -0,0 +1,106 @@ +#!/usr/bin/perl + +#use Time::localtime; +use POSIX qw(strftime); + +my $url="/qnx/"; + +sub getdl { + my ($dir)=@_; # where the download files are + opendir(DIR, $dir) || return ""; + my @files = readdir(DIR); + closedir DIR; + return @files; +} + +sub filetime { + my ($filename)=@_; + + my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size, + $atime,$mtime,$ctime,$blksize,$blocks) + = stat($filename); + + return $mtime; +} + +sub filesize { + my ($filename)=@_; + + my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size, + $atime,$mtime,$ctime,$blksize,$blocks) + = stat($filename); + + return $size; +} + +sub checksum { + my ($f) = @_; + my @o = `sha256sum $f 2>/dev/null`; + my $sh = $o[0]; + $sh =~ s/([^ ]*).*/$1/; + chomp $sh; + return $sh; +} + + +my $dl = "dl"; +my @files = getdl($dl); + +for(@files) { + my $file = $_; + if($file =~ /^curl-([0-9.-]+)-qnxsdp(\S+)\.(tar\.gz)$/) { + my ($version, $sdk, $ext)=($1, $2, $3, $4); + $sdk =~ s/[^0-9]//; # remove non-digits from SDK + $sdk{$version}.="$sdk,"; + $file{$version.$sdk}=$file; + my $fsize = filesize("$dl/$file"); + + $size{$version.$sdk}=sprintf("%.1f MB", $fsize/(1024*1024)); + + my $when = filetime("$dl/$file"); + my $d = strftime "%Y-%m-%d", gmtime($when); + $date{$version.$sdk}=$d; + $versions{$version}++; + if(-e "$dl/$file.asc") { + # a GPG signature + $gpg{$version.$sdk}="$dl/$file.asc"; + } + } +} + +sub num { + my ($t)=@_; + if($t =~ /^(\d)\.(\d+)\.(\d+)-(\d+)/) { + return 1000000*$1 + 10000*$2 + 100+$3 + $4; + } + return 0; +} + +my $gen=0; +for my $version (reverse sort { num($a) <=> num($b) } keys %versions) { + my $build = 1; + my $officialver = $version; + if($officialver =~ s/-(\d)\z//g) { + $build = $1; + } + my $link = $officialver; + $link =~ s/\./_/g; + print "#define QNX_CURLVER $officialver\n"; + print "#define QNX_CURLVER_PACKAGE $version\n"; + print "#define QNX_CURLVER_LINK curl-$link\n\n"; + + for my $s (sort split(',', $sdk{$version})) { + printf("#define QNX_SDK%s_FILENAME dl/%s\n", $s, $file{$version.$s}); + printf("#define QNX_SDK%s_SIZE %s\n", $s, $size{$version.$s}); + printf("#define QNX_SDK%s_DATE %s\n", $s, $date{$version.$s}); + + if($gpg{$version.$s}) { + printf("#define QNX_SDK%s_SIG %s\n", $s, $gpg{$version.$s}); + } + + my $sha = checksum("$dl/$file{$version.$s}"); + printf("#define QNX_SDK%s_SHA256 %s\n", $s, $sha); + } + last; +} +