diff options
author | Daniel Black <dragonheart@gentoo.org> | 2005-01-17 08:36:53 +0000 |
---|---|---|
committer | Daniel Black <dragonheart@gentoo.org> | 2005-01-17 08:36:53 +0000 |
commit | a6f394bf89cdc1bc0e5867e3257ccfce3bcf8985 (patch) | |
tree | 47bf9f90979b694569025dd3e08d23569c6429ef /games-misc | |
parent | -r5 goes stable (diff) | |
download | gentoo-2-a6f394bf89cdc1bc0e5867e3257ccfce3bcf8985.tar.gz gentoo-2-a6f394bf89cdc1bc0e5867e3257ccfce3bcf8985.tar.bz2 gentoo-2-a6f394bf89cdc1bc0e5867e3257ccfce3bcf8985.zip |
Initial import as per bug #52367
(Portage version: 2.0.51-r13)
Diffstat (limited to 'games-misc')
-rw-r--r-- | games-misc/typespeed/ChangeLog | 11 | ||||
-rw-r--r-- | games-misc/typespeed/Manifest | 5 | ||||
-rw-r--r-- | games-misc/typespeed/files/01_all_statedir-fix.patch | 73 | ||||
-rw-r--r-- | games-misc/typespeed/files/digest-typespeed-0.4.4 | 1 | ||||
-rw-r--r-- | games-misc/typespeed/metadata.xml | 12 | ||||
-rw-r--r-- | games-misc/typespeed/typespeed-0.4.4.ebuild | 66 |
6 files changed, 168 insertions, 0 deletions
diff --git a/games-misc/typespeed/ChangeLog b/games-misc/typespeed/ChangeLog new file mode 100644 index 000000000000..d9ba2beac353 --- /dev/null +++ b/games-misc/typespeed/ChangeLog @@ -0,0 +1,11 @@ +# ChangeLog for games-misc/typespeed +# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/games-misc/typespeed/ChangeLog,v 1.1 2005/01/17 08:36:52 dragonheart Exp $ + +*typespeed-0.4.4 (17 Jan 2005) + + 17 Jan 2005; Daniel Black <dragonheart@gentoo.org> +metadata.xml, + +files/01_all_statedir-fix.patch, +typespeed-0.4.4.ebuild: + Initial import as per bug #52367. Thanks to Octavio Ruiz (Ta^3) + <tacvbo@tacvbo.net>. + diff --git a/games-misc/typespeed/Manifest b/games-misc/typespeed/Manifest new file mode 100644 index 000000000000..a989bd571962 --- /dev/null +++ b/games-misc/typespeed/Manifest @@ -0,0 +1,5 @@ +MD5 b347dc51e978dd4966d1db4b31452592 typespeed-0.4.4.ebuild 1897 +MD5 6d796b061ed1c1337ef157a5f74dab35 metadata.xml 403 +MD5 c3858179b4a7505339e2dd2b3945c2c8 ChangeLog 372 +MD5 09490e2cc962578e3cf60ee6d9893fe9 files/digest-typespeed-0.4.4 66 +MD5 9818f759fab13af7dcafc9ad329e1af9 files/01_all_statedir-fix.patch 2095 diff --git a/games-misc/typespeed/files/01_all_statedir-fix.patch b/games-misc/typespeed/files/01_all_statedir-fix.patch new file mode 100644 index 000000000000..e8a7bd62dbaf --- /dev/null +++ b/games-misc/typespeed/files/01_all_statedir-fix.patch @@ -0,0 +1,73 @@ +diff -ur typespeed-0.4.4.orig/file.c typespeed-0.4.4/file.c +--- typespeed-0.4.4.orig/file.c 2003-06-18 02:15:39.000000000 -0500 ++++ typespeed-0.4.4/file.c 2005-01-15 21:56:50.386541848 -0600 +@@ -14,6 +14,7 @@ + wordcount = -1; + nakkimakkara = 0; + ++chdir(WORDLIST_PATH); + if ((wordfile = fopen(stringi, "r")) == NULL) { + return 1; + } +@@ -89,6 +90,7 @@ + k = 0; + a = 1; + ++chdir(WORDLIST_PATH); + dcolor_set(5, NULL); + n = scandir(".", &namelist, 0, alphasort); + tot = n; +@@ -272,6 +274,7 @@ + {"3l33t", "Pro", "VeryGood", "Good", "Average", "NoGood", "ADP-Pro", "Loser", "None", "None"}; + + ++chdir(HIGHSCORE_PATH); + filetys = (char *) malloc(sizeof(char) * (strlen(sanafile) + strlen(".high") + 1)); + strcpy(filetys, ""); + strcat(filetys, "high."); +@@ -311,6 +314,7 @@ + float typoratio; + char faim[21]; + } high; ++chdir(HIGHSCORE_PATH); + filetys = (char *) malloc(sizeof(char) * (strlen(sanafile) + strlen(".high") + 1)); + strcpy(filetys, ""); + strcat(filetys, "high."); +@@ -386,6 +390,7 @@ + strlen(".high") + + 1)); + ++chdir(HIGHSCORE_PATH); + dcolor_set(5, NULL); + strcpy(filet, ""); + strcat(filet, "high."); +@@ -526,6 +531,7 @@ + struct dirent **namelist; + int n; + ++chdir(WORDLIST_PATH); + n = scandir(".", &namelist, 0, alphasort); + if (n < 0) { + printf("scandir failed.\n"); +diff -ur typespeed-0.4.4.orig/typespeed.1 typespeed-0.4.4/typespeed.1 +--- typespeed-0.4.4.orig/typespeed.1 2003-06-18 02:36:37.000000000 -0500 ++++ typespeed-0.4.4/typespeed.1 2005-01-15 21:53:34.856266968 -0600 +@@ -1,4 +1,4 @@ +-.TH TYPESPEED 1 ++.TH TYPESPEED 6 + .SH NAME + typespeed \- Test your typing speed, and get your fingers' CPS + .SH SYNOPSIS +diff -ur typespeed-0.4.4.orig/typespeed.h typespeed-0.4.4/typespeed.h +--- typespeed-0.4.4.orig/typespeed.h 2003-06-18 01:43:13.000000000 -0500 ++++ typespeed-0.4.4/typespeed.h 2005-01-15 21:56:52.443229184 -0600 +@@ -38,6 +38,9 @@ + #define DEFAULT_TRAININGSPEED 2 + #define DEFAULT_CHEAT 0 + ++#define HIGHSCORE_PATH "/var/games/typespeed" ++#define WORDLIST_PATH "/usr/share/games/typespeed" ++ + typedef struct + { + int score; diff --git a/games-misc/typespeed/files/digest-typespeed-0.4.4 b/games-misc/typespeed/files/digest-typespeed-0.4.4 new file mode 100644 index 000000000000..8581f11ee41b --- /dev/null +++ b/games-misc/typespeed/files/digest-typespeed-0.4.4 @@ -0,0 +1 @@ +MD5 97ca3e3d0323c41ecc4f453f557287ea typespeed-0.4.4.tar.gz 38526 diff --git a/games-misc/typespeed/metadata.xml b/games-misc/typespeed/metadata.xml new file mode 100644 index 000000000000..b9fc2b9c6f11 --- /dev/null +++ b/games-misc/typespeed/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>no-herd</herd> +<maintainer> + <email>dragonheart@gentoo.org</email> + <name>Daniel Black</name> + <description>A user ebuild that I felt obliged to include. Please take over if you want +it</description> +</maintainer> +<longdescription></longdescription> +</pkgmetadata> diff --git a/games-misc/typespeed/typespeed-0.4.4.ebuild b/games-misc/typespeed/typespeed-0.4.4.ebuild new file mode 100644 index 000000000000..b0cd997134d6 --- /dev/null +++ b/games-misc/typespeed/typespeed-0.4.4.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/games-misc/typespeed/typespeed-0.4.4.ebuild,v 1.1 2005/01/17 08:36:52 dragonheart Exp $ + +inherit games toolchain-funcs + +DESCRIPTION="Test your typing speed, and get your fingers CPS" +HOMEPAGE="http://ls.purkki.org/typespeed/" +SRC_URI="http://ls.purkki.org/typespeed/${P}.tar.gz" + +KEYWORDS="x86 ppc" +IUSE="" +LICENSE="GPL-2" +SLOT="0" + +RDEPEND="sys-libs/ncurses" +DEPEND="${RDEPEND} + >=sys-apps/sed-4" + +src_unpack() { + unpack ${A} + cd ${S} + epatch ${FILESDIR}/01_all_statedir-fix.patch || die "patch failed" + sed -i -e "s:^CFLAGS =.*:& ${CFLAGS}:" Makefile || \ + die "src_unpack failed" +} + +src_compile() { + emake CC=$(tc-getCC) || die "src_compile failed" +} + +src_install() { + dodir "${GAMES_DATADIR}/${PN}" || die "dodir failed" + keepdir "${GAMES_STATEDIR}/${PN}" || die "keepdir failed" + dogamesbin typespeed || die "dogamesbin failed" + cp ${S}/words* "${D}${GAMES_DATADIR}/${PN}/" || die "copying wordfiles failed" + dodoc README TODO COPYING Changes BUGS || die "dodoc failed" + newman typespeed.1 typespeed.6 || die "doman failed" + prepgamesdirs +} + +pkg_postinst() { + cd /var/games/typespeed || die "cd failed" + # Backup existing scorefiles + mkdir backup_scores || die "mkdir failed" + find -maxdepth 1 -name 'high.words.*' -exec mv '{}' backup_scores/ \; + echo "" + einfo "Generating scorefiles..." + echo "" + /usr/games/bin/typespeed --makescores > /dev/null || die "make scores failed" + find backup_scores -type f -exec mv -f '{}' . \; + rmdir backup_scores/ || die "rmdir backup_scores failed" + chmod g+rw,o-rwx ${PWD}/high* + games_pkg_postinst +} + +pkg_postrm() { + echo "" + einfo "${PN} scorefiles was installed into ${GAMES_STATEDIR}/${PN}" + einfo "and haven't been removed (if this is an uninstall)." + einfo "To get rid of ${PN} completely, you can safely remove" + einfo "${GAMES_STATEDIR}/${PN} running:" + echo "" + einfo "rm -rf ${GAMES_STATEDIR}/${PN}" + echo "" +} |