summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2014-09-20 08:04:38 (EDT)
committer P. J. McDermott <pj@pehjota.net>2014-09-20 08:06:04 (EDT)
commit54c1dc2ce325b82e16cc9cce895b7d442b2f4f21 (patch)
treedb4bd7b3210264ce33a713b18e0e33f5d341e7d0 /build
parent2b91eb6d1ea7369d02abb225f59580a0f72b078a (diff)
/etc/os-release: New file
Diffstat (limited to 'build')
-rwxr-xr-xbuild11
1 files changed, 9 insertions, 2 deletions
diff --git a/build b/build
index b58f810..97296cd 100755
--- a/build
+++ b/build
@@ -7,11 +7,18 @@ include ../macros.$(OPK_HOST_ARCH_KERNEL).mk
version = $$(printf '%s\n' '$(OPK_SOURCE_VERSION)' | \
sed 's|\(^[0-9][0-9]*\.[0-9][0-9]*\).*$$|\1|')
+dist_id = $$(printf '%s\n' "$${dist_name}" | tr '[A-Z]' '[a-z]' | \
+ sed 's|[!a-z0-9_]|_|g')
+
# Set the distribution name in dist-vars.sh, not here.
script = \
s|@DISTRIBUTION@|$${dist_name}|; \
s|@OS@|$(os)|; \
- s|@VERSION@|$(version)|;
+ s|@VERSION@|$(version)|; \
+ s|@DISTRIBUTION_ID@|$(dist_id)|; \
+ s|@DISTRIBUTION_ANSI_COLOR@|$(dist_ansi_color)|; \
+ s|@DISTRIBUTION_HOME_URL@|$(dist_home_url)|; \
+ s|@DISTRIBUTION_BUG_URL@|$(dist_bug_url)|;
build:
@@ -36,7 +43,7 @@ install: build
sed ':l; N; $$!bl; s/\([^\n]\)\n\([^\n]\)/\1 \2/g' src/etc/motd | \
sed "$(script)" | fold -s -w 73 | sed 's/[ \t]*$$//' \
>>base-files.data/etc/motd; \
- for file in /etc/issue; do \
+ for file in /etc/issue /etc/os-release; do \
sed "$(script)" "src/$${file}" >"base-files.data/$${file}"; \
done
printf '%s\n' '$(OPK_HOST_ARCH)' >'base-files.data/etc/proteanos_arch'