xref: /freebsd/crypto/openssl/freebsd/dump_version_from_configdata.pl (revision 267f8c1f4b09431b335d5f48d84586047471f978)
1#!/usr/bin/env perl
2#
3# This dumps out the values needed to generate manpages and other artifacts
4# which include the release version/date.
5#
6# See also: `secure/lib/libcrypto/Makefile.version`.
7
8use Cwd qw(realpath);
9use File::Basename qw(dirname);
10use Time::Piece;
11
12use lib dirname(dirname(realpath($0)));
13
14use configdata qw(%config);
15
16$OPENSSL_DATE = Time::Piece->strptime($config{"release_date"}, "%d %b %Y")->strftime("%Y-%m-%d");
17
18$OPENSSL_VER = "$config{'major'}.$config{'minor'}.$config{'patch'}";
19
20print("OPENSSL_VER=\t${OPENSSL_VER}\n");
21print("OPENSSL_DATE=\t${OPENSSL_DATE}\n");
22