From b65b176ea4d7e3d94dd2a39f93d67ef1bae10fdf Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Mon, 29 Dec 2014 11:32:38 +0100 Subject: [PATCH] Added games-misc/fortune-mod-de/fortune-mod-de-0.31-r1.ebuild --- games-misc/fortune-mod-de/Manifest | 1 + .../fortune-mod-de-0.31-r1.ebuild | 127 ++++++++++++++++++ 2 files changed, 128 insertions(+) create mode 100644 games-misc/fortune-mod-de/fortune-mod-de-0.31-r1.ebuild diff --git a/games-misc/fortune-mod-de/Manifest b/games-misc/fortune-mod-de/Manifest index 077a30e..c6d4391 100644 --- a/games-misc/fortune-mod-de/Manifest +++ b/games-misc/fortune-mod-de/Manifest @@ -1,3 +1,4 @@ DIST fortunes-de_0.31.orig.tar.gz 1058884 SHA256 1cdab11479ff5723e385345a5b20109b0a2ad2e275afa6cbcbbce029ecfbb91a SHA512 0aa437656fd60d8ae9c96215df0b806b61ee6769e0fd0a613e4dbce1b09d02ea55b9e77052f3b89f32064b78c65f8abcaa416f047237f77bab4a4c0b950a03e1 WHIRLPOOL 151ffd88d79e1ecc547672f52b1271908b7e52151c1a63eb2cb4f649ee15df808a3bf13368b45bd73502163d6d59d8d906bcc2048d87ea5da675511b0da18ce7 +EBUILD fortune-mod-de-0.31-r1.ebuild 3190 SHA256 f1cf7a3df1b93db5714c9b8a02ef3b2727f762ccbf17fb0d5b2fbb5146e774a2 SHA512 35713ce83b8a2abf6be92beb4eb4e14491820de0b9ccf14aa1c425d52a4414978ba7ea7785c845a3770af3b2a08759827381a29d2694ae844e9ec32d25c4979d WHIRLPOOL b774710e0c1032aa68da87adb69c328832ab07c83e0e453a9fdc4ae69b601038e2cedf0adf2525ea877b53d1899152b8c49f644e085ee1f7ccf32a8887d992a9 EBUILD fortune-mod-de-0.31.ebuild 3349 SHA256 494440301a4376309af7ce4e0d171eefd8df863753fe0ca7aa5e198e2b24b806 SHA512 e0d72128227c5fb1636dfb21ba15533d7bc3cd3e673fc8f3b79b4fd70626f7dbcd92787e278251ad18914beaef7ad0528bf2a4424f3042a76c4ba19c1110b8c2 WHIRLPOOL 9e38b07fd460f39efd0e87f47b7469b9847109a10efdad7fd93013a82a7b73229cd561666043ca3ba004c2511305c0bdccad64af6670a5b8af45ba3ba81ff3a9 MISC metadata.xml 384 SHA256 6d50e4a16e5a69fff97791fefbd10e81ee279f3399ec0033fda84012fb3a1f9c SHA512 b524987a3181d5150db6ae98736bc72256c2700346544a786ec100aa2ceec2eae0746e774a4bad8d7b071fb9f88337f419632e072f12891bda95a1f23ce13202 WHIRLPOOL 56ce07be2e15b49cd041fafa66a091d1c216443e5f90f7411d57629116d51880eb399abc5039fbb76412ce28002ee08a585a19c2eae3adae056e1c99959f23ae diff --git a/games-misc/fortune-mod-de/fortune-mod-de-0.31-r1.ebuild b/games-misc/fortune-mod-de/fortune-mod-de-0.31-r1.ebuild new file mode 100644 index 0000000..8120a18 --- /dev/null +++ b/games-misc/fortune-mod-de/fortune-mod-de-0.31-r1.ebuild @@ -0,0 +1,127 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/games-misc/fortune-mod-fvl/fortune-mod-fvl-20030120.ebuild,v 1.11 2006/07/19 19:48:35 flameeyes Exp $ + +S=${WORKDIR}/fortunes-de-${PV} + +DESCRIPTION="German Quotes for fortune" +HOMEPAGE="http://packages.debian.org/source/lenny/fortunes-de/" +SRC_URI="http://ftp.de.debian.org/debian/pool/main/f/fortunes-de/fortunes-de_${PV}.orig.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 arm hppa ia64 m68k mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd" +IUSE="latin1" + +RDEPEND="games-misc/fortune-mod" +DEPEND="${RDEPEND} + latin1? ( virtual/libiconv )" + +S=${WORKDIR}/fortunes-de-${PV} + +src_compile() { + + cd ${S} + + str_it() { + + base="$( basename $1 )" + dat="dat/${base}" + echo " ${base}" + cp -a -f "$1" "${dat}" + if use latin1 ; then + # convert from UTF-8 to latin1 + mv "${dat}" "${dat}.u8" + iconv --from-code utf8 --to-code latin1 -o"${dat}" "${dat}.u8" + else + ln -s "${base}" "${dat}.u8" + fi + strfile -s "${dat}" + } + + mkdir dat tmp + for DIR in dat tmp ; do + if [ ! -d ${DIR} ] ; then + mkdir "${DIR}" + fi + done + + echo "Erstelle Fortune-Datenfiles ..." + + ### Databases + FORTUNES=`find data -maxdepth 1 -type f | sed "s?data/??"` + FORTUNESMORE=`find data-more -maxdepth 1 -type f | sed "s?data-more/??"` + DIRS=`find data -maxdepth 1 -type d | sed "s?data/??" | sed "/data/d"` + + ### Rezepte + REZEPTE=`find rezepte -maxdepth 1 -type d | sed "s?rezepte/??" | sed "/rezepte/d"` + REZEPTTMP=rezept.tmp.$$ + + # nicht veränderte Datenfiles + for spruch in $FORTUNES; do + str_it data/$spruch + done + + # Ungeprüfte und unsortierte Datenfiles + for spruch in $FORTUNESMORE; do + str_it data-more/$spruch + done + + # Datenfiles, die einzeln besser pflegbar sind, aber zu einem + # Fortune-File zusammengefaßt werden + for dir in $DIRS; do + cat $( find data/$dir -type f | sort ) > tmp/$dir + str_it tmp/$dir + rm -f tmp/$dir + done + + # zu formatierende Daten + cd predata + # komische Namen + sed "s/.*/Wie man sein Kind nicht nennen sollte: \\ + & \\ +%/" prenamen | sed "\$d" > ../tmp/namen + # "Warmduscher" + sed "s/.*/Hallo &!\\ +%/" prewarmduscher | sed "\$d" > ../tmp/warmduscher + cd .. + str_it tmp/namen + str_it tmp/warmduscher + + # Rezepte + for typ in $REZEPTE ; do + rm -f ${REZEPTTMP} + for rezept in $( ls rezepte/$typ | sort ); do + cat rezepte/$typ/$rezept >> ${REZEPTTMP} + echo "%" >> ${REZEPTTMP} + done + sed "\$d" ${REZEPTTMP} > tmp/$typ + str_it tmp/$typ + rm -f ${REZEPTTMP} + done + + # Script 'spruch' anpassen + cat bin/spruch.sh | \ + sed "s?/usr/local/share/games/fortunes?/usr/share/fortune?" | \ + sed "s?\(FORTUNEPATH=\)/usr/local/games/?\1/usr/bin/?" | \ + sed "s?/etc/locale.alias?/usr/share/locale/locale.alias?g" | \ + sed "s?dpkg-reconfigure fortunes-de?emerge --oneshot ${CATEGORY}/${PN}:${SLOT}?" \ + > bin/spruch + + chmod 755 bin/spruch + +} + +src_install() { + + insinto /usr/share/fortune/de + doins dat/* || die + dobin bin/spruch + dodoc README AUTHORS NEWS LIESMICH GPL-Deutsch + doman man/spruch.6 + doman -i18n=de man/de/spruch.6 + + if ! use latin1 ; then + sed -i "s/\(^.FORTUNE .*\) | iconv -f .*/\1/" ${D}/usr/bin/spruch + fi +} -- 2.39.5