version/spec: init

This is the second step in a repo-wide versioning system after the new
build status generator.

It introduces a proto representation of the essential version data which
is attached to artifacts generated from this repository.

The definition encompasses an informal spec on how this data can be
serialized to a SemVer 2.0.0 version string, which will be used in human
readable output and with interoperability with external systems.

Change-Id: I3f78e34af1f063fcf6035a0258a383b5d3f8adb6
Reviewed-on: https://review.monogon.dev/c/monogon/+/2331
Reviewed-by: Lorenz Brun <lorenz@monogon.tech>
Tested-by: Jenkins CI
diff --git a/version/spec/BUILD.bazel b/version/spec/BUILD.bazel
new file mode 100644
index 0000000..7bdb7a0
--- /dev/null
+++ b/version/spec/BUILD.bazel
@@ -0,0 +1,23 @@
+load("@rules_proto//proto:defs.bzl", "proto_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library")
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+
+proto_library(
+    name = "spec_proto",
+    srcs = ["spec.proto"],
+    visibility = ["//visibility:public"],
+)
+
+go_proto_library(
+    name = "spec_go_proto",
+    importpath = "source.monogon.dev/version/spec",
+    proto = ":spec_proto",
+    visibility = ["//visibility:public"],
+)
+
+go_library(
+    name = "spec",
+    embed = [":spec_go_proto"],
+    importpath = "source.monogon.dev/version/spec",
+    visibility = ["//visibility:public"],
+)