aboutsummaryrefslogtreecommitdiff
path: root/crypto/openssl/freebsd/dump_version_from_configdata.pl
blob: b6137718ba544587ba649de8ee468932a73761f0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env perl
#
# This dumps out the values needed to generate manpages and other artifacts
# which include the release version/date.
#
# See also: `secure/lib/libcrypto/Makefile.version`.

use Cwd qw(realpath);
use File::Basename qw(dirname);
use Time::Piece;

use lib dirname(dirname(realpath($0)));

use configdata qw(%config);

$OPENSSL_DATE = Time::Piece->strptime($config{"release_date"}, "%d %b %Y")->strftime("%Y-%m-%d");

$OPENSSL_VER = "$config{'major'}.$config{'minor'}.$config{'patch'}";

print("OPENSSL_VER=\t${OPENSSL_VER}\n");
print("OPENSSL_DATE=\t${OPENSSL_DATE}\n");