From 644110a847c5911c2eb04eb53c93031740561efc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Thu, 28 Nov 2019 02:34:44 +0100 Subject: Initial import of an ebuilds tree from Fat-Zer's (Alexander Golubev) repository. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- Documentation/scripts/test_separate_compilation.sh | 85 ++++++++++++++++++++++ Documentation/scripts/update-keywords-lists | 32 ++++++++ Documentation/scripts/usefull_commands | 15 ++++ Documentation/scripts/write-ebuild.sh | 60 +++++++++++++++ 4 files changed, 192 insertions(+) create mode 100755 Documentation/scripts/test_separate_compilation.sh create mode 100755 Documentation/scripts/update-keywords-lists create mode 100644 Documentation/scripts/usefull_commands create mode 100755 Documentation/scripts/write-ebuild.sh (limited to 'Documentation/scripts') diff --git a/Documentation/scripts/test_separate_compilation.sh b/Documentation/scripts/test_separate_compilation.sh new file mode 100755 index 00000000..75b980f1 --- /dev/null +++ b/Documentation/scripts/test_separate_compilation.sh @@ -0,0 +1,85 @@ +#!/bin/bash +# !!!WARNING!!! use with caution +# +# This script suppose the kdelibs to be installed +# how to use : +# dependecies_test_compilation >"$pkg_use_file" + pkg_failed=no + # check for it can be emerged due to depenencies uses + emerge -p "$pkg" + if [ "$?" != 0 ]; then + #try unmask uses + CONFIG_PROTECT_MASK="/etc/portage" emerge ${EMERGE_AUTOUNMASK_OPTS} "$pkg" + emerge -p "$pkg" + if [ "$?" != 0 ]; then + # we can't emerge the package + mkdir -p "${LOGS_DIR}/${pkg}" + emerge -p "$pkg" >"${LOGS_DIR}/${pkg}/emerge_failed" 2>&1 + pkg_failed=yes + fi + fi + + if [ "$pkg_failed" == no ]; then + emerge -1 "$pkg" + if [ "$?" != 0 ]; then + mkdir -p "${LOGS_DIR}/${pkg}" + for f_pkg in $(cd /var/tmp/portage/ && ls -d */*); do + cp "/var/tmp/portage/${f_pkg}/temp/build.log" "${LOGS_DIR}/${pkg}/${f_pkg/\//_}.build" + done + pkg_failed=yes + fi + fi + + if [ "$pkg_failed" == no ]; then + echo "$pkg" >>"${SUCCESS_LIST}" + else + echo "$pkg" >>"${FAIL_LIST}" + fi + + # restoring config + rm -rf ${PORTAGE_CONFIG} + tar -xf "${CONFIG_BAK}" -C / + + # let's clean system + ( emerge -NuD world && + emerge --depclean && + emerge -NuD world && + revdep-rebuild && + rm -rf /var/tmp/portage ) || die "cleaning failed" +done diff --git a/Documentation/scripts/update-keywords-lists b/Documentation/scripts/update-keywords-lists new file mode 100755 index 00000000..9390cdfb --- /dev/null +++ b/Documentation/scripts/update-keywords-lists @@ -0,0 +1,32 @@ +#!/bin/bash + +DOC="Documentation" +KEYWORDS_LIVE="$DOC/trinity.live.keywords" +KEYWORDS_3_5_13_2="$DOC/trinity.3.5.13.2.keywords" + +resort() { + cp "${1}" "${1}.bak" + cat "${1}.bak" | sort -u >"$1" && rm "${1}.bak" +} + +find trinity-base/ trinity-apps/ -iname '*9999.ebuild' | while read eb; do + PN="$(basename $(dirname ${eb}))" + C="$(basename $(dirname $(dirname ${eb})))" + P="$(basename ${eb%%.ebuild})" + if ! grep "^~$C/$P " "${KEYWORDS_LIVE}" >/dev/null 2>&1; then + echo "~$C/$P **" | tee -a "${KEYWORDS_LIVE}" + fi +done + +resort "${KEYWORDS_LIVE}" + + +find trinity-base/ trinity-apps -iname '*3.5.13.2.ebuild' | while read eb; do + PN="$(basename $(dirname ${eb}))" + C="$(basename $(dirname $(dirname ${eb})))" + P="$(basename ${eb%%.ebuild})" + if ! grep "^~$C/$P" "${KEYWORDS_3_5_13_2}" >/dev/null 2>&1; then + echo "~$C/$P" | tee -a "${KEYWORDS_3_5_13_2}" + fi +done +resort "${KEYWORDS_3_5_13_2}" diff --git a/Documentation/scripts/usefull_commands b/Documentation/scripts/usefull_commands new file mode 100644 index 00000000..8ecaa988 --- /dev/null +++ b/Documentation/scripts/usefull_commands @@ -0,0 +1,15 @@ +# Per ebuild check and commit +for I in ; do cp kate/metadata.xml $I; ebuild $I/$I-3.9999.ebuild digest; git add $I; git commit -m $I; done +for I in kstart ksystraycmd ksysguard nsplugin kate kxkb ; do cp kate/metadata.xml $I; ebuild $I/$I-3.9999.ebuild digest; git add $I; git commit -m $I; done + +# update trinity live lists +find trinity-base/ -iname '*9999.ebuild' | while read eb; do PN="$(basename $(dirname ${eb}))"; C="$(basename $(dirname $(dirname ${eb})))"; P="$(basename ${eb%%.ebuild})"; echo "~$C/$P"' **'; done | tee Documentation/trinity.live.keywords + +# update all manifests +find . -iname *.ebuild | while read eb; do ebuild $eb digest; done + +# run ./test_separate_compilation.sh +cat Documentation/derived-lists/ | sed 's/#.*//;s/^\s*//;s/\s*$//;/^\s*$/d' |xargs bash ./test_separate_compilation.sh + +# update manifests which older thatn ebuilds +find . -iname *.ebuild | while read eb; do ma="$(dirname $eb)/Manifest"; find $(dirname $eb) -type f | while read f; do [ $f -nt $ma ] && ebuild $eb digest && touch $ma; done; done diff --git a/Documentation/scripts/write-ebuild.sh b/Documentation/scripts/write-ebuild.sh new file mode 100755 index 00000000..c567bd6f --- /dev/null +++ b/Documentation/scripts/write-ebuild.sh @@ -0,0 +1,60 @@ +#!/bin/bash +# Usage ; write-ebuild.sh [ [DESCRIPTION] +export LC_ALL=C + +EAPI="5" + +TRINITY_MODULE_NAME=$1 +PN=$(basename ${2}) +CATEGORY=$(dirname ${2}) +CATEGORY=${CATEGORY:-trinity-base} +DESCRIPTION="$3" + +PV=${PV:=9999} +KEYWORDS="amd64 x86" +case "${PV}" in + *3.5.13.2) KEYWORDS="~amd64 ~x86" ;; + *9999*) KEYWORDS="" ;; +esac + +if [ -z "$DESCRIPTION" ]; then + DESCRIPTION_SOURCES=( ${CATEGORY/trinity/kde}/${PN} ${CATEGORY/trinity/kde}/${PN/k/t} kde-base/${PN} kde-base/${PN/k/t} ) + for descsrc in ${DESCRIPTION_SOURCES[@]}; do + DESCRIPTION="$(eix -C $(dirname ${descsrc}) -s $(basename "${descsrc}") | sed -n '/^\s*Description:\s*/{s///;s/\(\/Trinity/g;p}')" + [ -n "$DESCRIPTION" ] && break + done +fi + +echo "==> Creating ebuild for ${PN}-${PV}" + +mkdir -p "${CATEGORY}/$PN" + +cat <${CATEGORY}/$PN/$PN-${PV}.ebuild +# Copyright 1999-$(date +%Y) Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# \$Id\$ +EAPI="$EAPI" +TRINITY_MODULE_NAME="$TRINITY_MODULE_NAME" + +inherit trinity-meta + +DESCRIPTION="$DESCRIPTION" +KEYWORDS="$KEYWORDS" +IUSE+="" +EOF + +cat <"${CATEGORY}/$PN"/metadata.xml + + + + + fatzer2@gmail.com + Alexander Golubev + + +EOF + +if [ -d eclass/trinity-shared-files/${TRINITY_MODULE_NAME}-${PV} ]; then + mkdir -p "${CATEGORY}/$PN/files/" + ln -s "../../../eclass/trinity-shared-files/" "trinity-base/$PN/files/shared" +fi -- cgit v1.2.1