From 1588f942581f96a0a540265eaa89f9b554d68908 Mon Sep 17 00:00:00 2001 From: Henry Gebhardt Date: Wed, 20 Jun 2012 01:16:51 +0200 Subject: sys-apps/baselayout-systemd-1: fix #420683, add URLs --- sys-apps/baselayout-systemd/Manifest | 2 +- .../baselayout-systemd/baselayout-systemd-0.ebuild | 142 -------------------- .../baselayout-systemd/baselayout-systemd-1.ebuild | 144 +++++++++++++++++++++ 3 files changed, 145 insertions(+), 143 deletions(-) delete mode 100644 sys-apps/baselayout-systemd/baselayout-systemd-0.ebuild create mode 100644 sys-apps/baselayout-systemd/baselayout-systemd-1.ebuild diff --git a/sys-apps/baselayout-systemd/Manifest b/sys-apps/baselayout-systemd/Manifest index 96683b5..935759a 100644 --- a/sys-apps/baselayout-systemd/Manifest +++ b/sys-apps/baselayout-systemd/Manifest @@ -1,2 +1,2 @@ -EBUILD baselayout-systemd-0.ebuild 3278 RMD160 9ed2db0d5c41a0ec4f310f34276e02b4f555b49c SHA1 5314e41579cf97eb73ae9fb27611dce4932f447c SHA256 065ab90f943e5e10a7d9d32e5ce156b5d4b7c485718c67d41bb936e7c22dc856 +EBUILD baselayout-systemd-1.ebuild 3407 RMD160 563fdbd3fe72799e4bf65415095708040ee9a152 SHA1 3416afb6eea240e8bba2ea587f023db28629c38d SHA256 9882404656e4eac9a3a360f60f8be3316937d69fb8a2012165a7f49e053cdf85 MISC metadata.xml 561 RMD160 bfdb1a962cf3c21cb538efd7c443c8797ec06aa6 SHA1 733ab5f6d757cf5018fbeeddd60f465f5acae1c0 SHA256 545fa104c21104c630bda9cd87ed00bc848a237bcc0aca2a24a638ef955d3e53 diff --git a/sys-apps/baselayout-systemd/baselayout-systemd-0.ebuild b/sys-apps/baselayout-systemd/baselayout-systemd-0.ebuild deleted file mode 100644 index 908b3fe..0000000 --- a/sys-apps/baselayout-systemd/baselayout-systemd-0.ebuild +++ /dev/null @@ -1,142 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI=4 - -DESCRIPTION="Standard system configuration files" -HOMEPAGE="http://0pointer.de/blog/projects/the-new-configuration-files.html" -SRC_URI="" -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64" - -# guess: guess the configuration from existing file, from openrc, or by -# executing commands, in that order -IUSE="+guess" - -DEPEND="" -RDEPEND="${DEPEND}" - -parse_value() { - local vname="$1" - local fname="$2" - local value - - test -e "${fname}" || return - - value="$(grep -i "^${vname}" "${fname}")" - value="${value#*=}" - value="${value#\"}" - value="${value%\"}" - value="${value#\'}" - value="${value%\'}" - - echo -n "${value}" -} - -claim-file() { - local fname="$1" - local bname="$(basename "${fname}")" - - if test -e "${fname}"; then - cat "${fname}" >"${bname}" - else - return 1 - fi -} - -etc-hostname() { - claim-file /etc/hostname && return - - local hostname - local fname=/etc/conf.d/hostname - - use guess || ewarn "/etc/hostname must be manually created" - use guess || return - - if test -e "${fname}"; then - echo "$(parse_value hostname "${fname}")" >hostname - else - echo "$(hostname)" >hostname - fi - - einfo "guessed hostname: \"$(cat hostname)\"" -} - -print-if-nonempty-k-v-new-file() { - print_if_nonempty_k_v_file="$1" - test -e "$1" && rm "$1" -} - -print-if-nonempty-k-v() { - local str="$@" - local key="${str%%=*}" - local value="${str#*=}" - - test -n "${value}" && - echo "${key}=${value}" >>"${print_if_nonempty_k_v_file}" - - return 0 -} - -etc-vconsole.conf() { - claim-file /etc/vconsole.conf && return - - use guess || return - - #local vc_unicode="`parse_value unicode /etc/rc.conf`" - #local utf8="YES" - local vc_font="`parse_value consolefont /etc/conf.d/consolefont`" - local vc_font_map="`parse_value consoletranslation /etc/conf.d/consolefont`" - local vc_font_unimap="`parse_value unicodemap /etc/conf.d/consolefont`" - local vc_keymap="`parse_value keymap /etc/conf.d/keymaps`" - local vc_keymap_toggle="`parse_value keymap_toggle /etc/vconsole.conf`" - - print-if-nonempty-k-v-new-file vconsole.conf - print-if-nonempty-k-v KEYMAP="$vc_keymap" - print-if-nonempty-k-v KEYMAP_TOGGLE="$vc_keymap_toggle" - print-if-nonempty-k-v FONT="$vc_font" - print-if-nonempty-k-v FONT_MAP="$vc_font_map" - print-if-nonempty-k-v FONT_UNIMAP="$vc_font_unimap" -} - -etc-locale.conf() { - claim-file /etc/locale.conf && return - - use guess || return - - local fname=/etc/profile.env - - print-if-nonempty-k-v-new-file locale.conf - for vn in LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY \ - LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT \ - LC_IDENTIFICATION; do - print-if-nonempty-k-v ${vn}="$(parse_value "export $vn" "${fname}")" - done -} - -etc-os-release() { - # VERSION and VERSION_ID can be unset for rolling releases - print-if-nonempty-k-v-new-file os-release - print-if-nonempty-k-v NAME=Gentoo - print-if-nonempty-k-v ID=gentoo - print-if-nonempty-k-v PRETTY_NAME=\"Gentoo Linux\" - print-if-nonempty-k-v ANSI_COLOR="1;32" -} - -src_unpack() { - mkdir -p "${S}" -} - -src_configure() { - etc-hostname && einfo "hostname" - etc-vconsole.conf && einfo "vconsole.conf" - etc-locale.conf && einfo "locale.conf" - etc-os-release && einfo "os-release" -} - -src_install() { - insinto /etc - doins * -} diff --git a/sys-apps/baselayout-systemd/baselayout-systemd-1.ebuild b/sys-apps/baselayout-systemd/baselayout-systemd-1.ebuild new file mode 100644 index 0000000..4e9ff4c --- /dev/null +++ b/sys-apps/baselayout-systemd/baselayout-systemd-1.ebuild @@ -0,0 +1,144 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=4 + +DESCRIPTION="Standard system configuration files" +HOMEPAGE="http://0pointer.de/blog/projects/the-new-configuration-files.html" +SRC_URI="" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64" + +# guess: guess the configuration from existing file, from openrc, or by +# executing commands, in that order +IUSE="+guess" + +DEPEND="" +RDEPEND="${DEPEND}" + +parse_value() { + local vname="$1" + local fname="$2" + local value + + test -e "${fname}" || return + + value="$(grep -i "^${vname}" "${fname}")" + value="${value#*=}" + value="${value#\"}" + value="${value%\"}" + value="${value#\'}" + value="${value%\'}" + + echo -n "${value}" +} + +claim-file() { + local fname="$1" + local bname="$(basename "${fname}")" + + if test -e "${fname}"; then + cat "${fname}" >"${bname}" + else + return 1 + fi +} + +etc-hostname() { + claim-file /etc/hostname && return + + local hostname + local fname=/etc/conf.d/hostname + + use guess || ewarn "/etc/hostname must be manually created" + use guess || return + + if test -e "${fname}"; then + echo "$(parse_value hostname "${fname}")" >hostname + else + echo "$(hostname)" >hostname + fi + + einfo "guessed hostname: \"$(cat hostname)\"" +} + +print-if-nonempty-k-v-new-file() { + print_if_nonempty_k_v_file="$1" + test -e "$1" && rm "$1" +} + +print-if-nonempty-k-v() { + local str="$@" + local key="${str%%=*}" + local value="${str#*=}" + + test -n "${value}" && + echo "${key}=${value}" >>"${print_if_nonempty_k_v_file}" + + return 0 +} + +etc-vconsole.conf() { + claim-file /etc/vconsole.conf && return + + use guess || return + + #local vc_unicode="`parse_value unicode /etc/rc.conf`" + #local utf8="YES" + local vc_font="`parse_value consolefont /etc/conf.d/consolefont`" + local vc_font_map="`parse_value consoletranslation /etc/conf.d/consolefont`" + local vc_font_unimap="`parse_value unicodemap /etc/conf.d/consolefont`" + local vc_keymap="`parse_value keymap /etc/conf.d/keymaps`" + local vc_keymap_toggle="`parse_value keymap_toggle /etc/vconsole.conf`" + + print-if-nonempty-k-v-new-file vconsole.conf + print-if-nonempty-k-v KEYMAP="$vc_keymap" + print-if-nonempty-k-v KEYMAP_TOGGLE="$vc_keymap_toggle" + print-if-nonempty-k-v FONT="$vc_font" + print-if-nonempty-k-v FONT_MAP="$vc_font_map" + print-if-nonempty-k-v FONT_UNIMAP="$vc_font_unimap" +} + +etc-locale.conf() { + claim-file /etc/locale.conf && return + + use guess || return + + local fname=/etc/profile.env + + print-if-nonempty-k-v-new-file locale.conf + for vn in LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY \ + LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT \ + LC_IDENTIFICATION; do + print-if-nonempty-k-v ${vn}="$(parse_value "export $vn" "${fname}")" + done +} + +etc-os-release() { + # VERSION and VERSION_ID can be unset for rolling releases + print-if-nonempty-k-v-new-file os-release + print-if-nonempty-k-v NAME=Gentoo + print-if-nonempty-k-v ID=gentoo + print-if-nonempty-k-v PRETTY_NAME=\"Gentoo Linux\" + print-if-nonempty-k-v ANSI_COLOR=\"1\;32\" + print-if-nonempty-k-v HOME_URL=\"http://www.gentoo.org/\" + print-if-nonempty-k-v BUG_REPORT_URL=\"https://bugs.gentoo.org/\" +} + +src_unpack() { + mkdir -p "${S}" +} + +src_configure() { + etc-hostname && einfo "hostname" + etc-vconsole.conf && einfo "vconsole.conf" + etc-locale.conf && einfo "locale.conf" + etc-os-release && einfo "os-release" +} + +src_install() { + insinto /etc + doins * +} -- cgit v1.2.3-65-gdbad