summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /app-admin/localepurge
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'app-admin/localepurge')
-rw-r--r--app-admin/localepurge/Manifest1
-rw-r--r--app-admin/localepurge/files/localepurge-0.5.4-directorysum.patch20
-rw-r--r--app-admin/localepurge/files/localepurge-0.5.4-evaltotal.patch11
-rw-r--r--app-admin/localepurge/files/localepurge-0.5.4-parentdir.patch18
-rw-r--r--app-admin/localepurge/files/localepurge-0.5.4-prefix.patch58
-rw-r--r--app-admin/localepurge/localepurge-0.5.4-r2.ebuild43
-rw-r--r--app-admin/localepurge/metadata.xml12
7 files changed, 163 insertions, 0 deletions
diff --git a/app-admin/localepurge/Manifest b/app-admin/localepurge/Manifest
new file mode 100644
index 000000000000..3aac533c2f03
--- /dev/null
+++ b/app-admin/localepurge/Manifest
@@ -0,0 +1 @@
+DIST localepurge-0.5.4.tbz2 5038 SHA256 7aca13f6b44af74480c611c0dd63b6fe05c6084bfd3f08bfd347e7914af2ffaa SHA512 246acb8ef497a2f607ee8545c4d46fd5a1957189eb0b705bf6bcd1cd35ba5b48c7e090db480519c8e3a7427b5ad5a2c020b40232a8fbd0840f9677a6c7af600e WHIRLPOOL d1da9a6a4d5fca92e7353e6ed0e6b916b8529ad7f003a0af02b2403ceb33bdd71769b3bd1a3c37095167a0e8b3811a5b6774a089f96eedd76edb4ebf46a992d4
diff --git a/app-admin/localepurge/files/localepurge-0.5.4-directorysum.patch b/app-admin/localepurge/files/localepurge-0.5.4-directorysum.patch
new file mode 100644
index 000000000000..f837d2845d54
--- /dev/null
+++ b/app-admin/localepurge/files/localepurge-0.5.4-directorysum.patch
@@ -0,0 +1,20 @@
+--- localepurge.orig 2012-12-04 23:15:29.422756767 +0100
++++ localepurge 2012-12-04 23:16:13.313756491 +0100
+@@ -198,7 +198,7 @@
+
+ if [ "$SHOWFREEDSPACE" = "enabled" ]; then
+ if test $SPACETMP -gt 0 ; then
+- LOCALETOTAL=$SPACETMP
++ LOCALETOTAL=$(($LOCALETOTAL + $SPACETMP))
+ einfo "localepurge: Disk space freed in $LOCALEDIR: ${BOLD}"$SPACETMP"K${NORMAL}"
+ fi
+ SPACETMP=0
+@@ -230,7 +230,7 @@
+
+ if [ "$SHOWFREEDSPACE" = "enabled" ]; then
+ if test $SPACETMP -gt 0 ; then
+- MANTOTAL=$SPACETMP
++ MANTOTAL=$(($MANTOTAL + $SPACETMP))
+ einfo "localepurge: Disk space freed in $MANPAGEDIR: ${BOLD}"$SPACETMP"K${NORMAL}"
+ fi
+ SPACETMP=0
diff --git a/app-admin/localepurge/files/localepurge-0.5.4-evaltotal.patch b/app-admin/localepurge/files/localepurge-0.5.4-evaltotal.patch
new file mode 100644
index 000000000000..df80a7f9c8a6
--- /dev/null
+++ b/app-admin/localepurge/files/localepurge-0.5.4-evaltotal.patch
@@ -0,0 +1,11 @@
+--- localepurge.original 2012-12-02 18:32:35.000000000 +0400
++++ localepurge 2013-01-14 19:31:35.327821252 +0400
+@@ -254,7 +254,7 @@
+
+ # Calculating and reporting total disk space freed:
+ if [ "$SHOWFREEDSPACE" = "enabled" ]; then
+- let TOTAL=$LOCALETOTAL+$MANTOTAL
++ TOTAL=$(($LOCALETOTAL+$MANTOTAL))
+ if test $TOTAL -lt 0; then
+ TOTAL=0
+ fi
diff --git a/app-admin/localepurge/files/localepurge-0.5.4-parentdir.patch b/app-admin/localepurge/files/localepurge-0.5.4-parentdir.patch
new file mode 100644
index 000000000000..2b052ddf4d99
--- /dev/null
+++ b/app-admin/localepurge/files/localepurge-0.5.4-parentdir.patch
@@ -0,0 +1,18 @@
+--- localepurge.orig 2012-12-04 23:08:17.754765708 +0100
++++ localepurge 2012-12-04 23:09:02.397765264 +0100
+@@ -165,7 +165,14 @@
+ ${ACTION} `find ${REMOVEPATH} -type f -o -type l`
+
+ if [ "$SHOWFREEDSPACE" = "enabled" ]; then
+- SPACEAFTER=$(df -P ${REMOVEPATH} | awk '{if ( NR==2 ) { print $3 }}')
++ # if symlink, REMOVEPATH could be removed
++ # check from parentdir then
++ if [ -d ${REMOVEPATH} ]; then
++ SPACEAFTER=$(df -P ${REMOVEPATH} | awk '{if ( NR==2 ) { print $3 }}')
++ else
++ SPACEAFTER=$(df -P ${REMOVEPATH%/*} | awk '{if ( NR==2 ) { print $3 }}')
++ fi
++
+ SPACESUM=$(($SPACEBEFORE - $SPACEAFTER))
+
+ if test $SPACESUM -gt 0 ; then
diff --git a/app-admin/localepurge/files/localepurge-0.5.4-prefix.patch b/app-admin/localepurge/files/localepurge-0.5.4-prefix.patch
new file mode 100644
index 000000000000..66ebbf09ac96
--- /dev/null
+++ b/app-admin/localepurge/files/localepurge-0.5.4-prefix.patch
@@ -0,0 +1,58 @@
+--- localepurge.orig 2012-12-02 19:56:18.000000000 +0100
++++ localepurge 2012-12-02 20:00:38.000000000 +0100
+@@ -1,14 +1,14 @@
+-#!/bin/bash
++#!@GENTOO_PORTAGE_EPREFIX@/bin/bash
+
+ # Deleting all locale files on system
+ # *not* listed in /etc/locale.nopurge
+
+ set -e
+
+-LOCALEDIRS="/usr/share/locale /usr/local/share/locale /usr/kde/?.?/share/locale /opt/sun-jdk-*/jre/lib/locale /opt/sun-jre-bin-*/lib/locale /usr/lib/locale /usr/share/binutils-data/*/*/locale /usr/share/gcc-data/*/*/locale"
+-MANPAGEDIRS="/usr/share/man /usr/man /usr/local/share/man /usr/kde/?.?/share/man /usr/kde/?.?/man /opt/sun-jdk-*/man /opt/sun-jre-bin-*/man"
+-LOCALELIST="/var/cache/localepurge/localelist"
+-CONFIGFILE="/etc/locale.nopurge"
++LOCALEDIRS="@GENTOO_PORTAGE_EPREFIX@/usr/share/locale @GENTOO_PORTAGE_EPREFIX@/usr/local/share/locale @GENTOO_PORTAGE_EPREFIX@/usr/kde/?.?/share/locale @GENTOO_PORTAGE_EPREFIX@/opt/sun-jdk-*/jre/lib/locale @GENTOO_PORTAGE_EPREFIX@/opt/sun-jre-bin-*/lib/locale @GENTOO_PORTAGE_EPREFIX@/usr/lib/locale @GENTOO_PORTAGE_EPREFIX@/usr/share/binutils-data/*/*/locale @GENTOO_PORTAGE_EPREFIX@/usr/share/gcc-data/*/*/locale"
++MANPAGEDIRS="@GENTOO_PORTAGE_EPREFIX@/usr/share/man @GENTOO_PORTAGE_EPREFIX@/usr/man @GENTOO_PORTAGE_EPREFIX@/usr/local/share/man @GENTOO_PORTAGE_EPREFIX@/usr/kde/?.?/share/man @GENTOO_PORTAGE_EPREFIX@/usr/kde/?.?/man @GENTOO_PORTAGE_EPREFIX@/opt/sun-jdk-*/man @GENTOO_PORTAGE_EPREFIX@/opt/sun-jre-bin-*/man"
++LOCALELIST="@GENTOO_PORTAGE_EPREFIX@/var/cache/localepurge/localelist"
++CONFIGFILE="@GENTOO_PORTAGE_EPREFIX@/etc/locale.nopurge"
+ VERSION="0.5.4"
+
+ LOCALETOTAL=0
+@@ -23,7 +23,7 @@
+ BRACKET=$'\e[34;01m'
+ BOLD=$'\e[1m'
+
+-ACTION="/bin/rm -vf"
++ACTION="@GENTOO_PORTAGE_EPREFIX@/bin/rm -vf"
+
+ eerror () {
+ echo -e " ${BAD}*${NORMAL} $*" 2> /dev/stderr
+@@ -43,7 +43,7 @@
+ print() {
+ for x in $@; do
+ if [ "${x}" = "" ]; then return 0
+- else /bin/echo $x
++ else @GENTOO_PORTAGE_EPREFIX@/bin/echo $x
+ fi
+ done
+ }
+@@ -184,7 +184,7 @@
+ einfo "localepurge: processing locale files in ${LOCALEDIR} ..."
+ fi
+
+- for LOCALE in `/bin/ls ${LOCALEDIR}`; do
++ for LOCALE in `@GENTOO_PORTAGE_EPREFIX@/bin/ls ${LOCALEDIR}`; do
+ if echo "${PURGELIST}" | grep -xq ${LOCALE}; then
+ if [ -d ${LOCALEDIR}/${LOCALE}/LC_MESSAGES ]; then
+ if [ "${LIST}" = "enabled" ]; then
+@@ -216,7 +216,7 @@
+ einfo "localepurge: processing man pages in ${MANPAGEDIR} ..."
+ fi
+
+- for LOCALE in `/bin/ls ${MANPAGEDIR} | grep -v ^man[1-9]`; do
++ for LOCALE in `@GENTOO_PORTAGE_EPREFIX@/bin/ls ${MANPAGEDIR} | grep -v ^man[1-9]`; do
+ if echo "${PURGELIST}" | grep -xq ${LOCALE}; then
+ if [ -d ${MANPAGEDIR}/${LOCALE} ]; then
+ if [ "${LIST}" = "enabled" ]; then
diff --git a/app-admin/localepurge/localepurge-0.5.4-r2.ebuild b/app-admin/localepurge/localepurge-0.5.4-r2.ebuild
new file mode 100644
index 000000000000..46a15369f29b
--- /dev/null
+++ b/app-admin/localepurge/localepurge-0.5.4-r2.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils prefix
+
+DESCRIPTION="Script to recover diskspace wasted for unneeded locale files and localized man pages"
+HOMEPAGE="http://gentoo.org
+http://cgit.gentoo.org/proj/localepurge.git"
+SRC_URI="http://dev.gentoo.org/~hwoarang/distfiles/${P}.tbz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~m68k ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos"
+IUSE=""
+
+DEPEND=""
+RDEPEND="app-shells/bash"
+
+S=${WORKDIR}/${PN}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-prefix.patch
+ # 164544
+ epatch "${FILESDIR}"/${P}-directorysum.patch
+ # 445910
+ epatch "${FILESDIR}"/${P}-parentdir.patch
+ # 452208
+ epatch "${FILESDIR}"/${P}-evaltotal.patch
+ eprefixify ${PN}
+}
+
+src_install() {
+ insinto /var/cache/${PN}
+ doins defaultlist
+ dosym defaultlist /var/cache/${PN}/localelist
+ insinto /etc
+ doins locale.nopurge
+ dobin ${PN}
+ doman ${PN}.8
+}
diff --git a/app-admin/localepurge/metadata.xml b/app-admin/localepurge/metadata.xml
new file mode 100644
index 000000000000..2d52d39e1dca
--- /dev/null
+++ b/app-admin/localepurge/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>proxy-maintainers</herd>
+<maintainer>
+ <email>wimmuskee@gmail.com</email>
+ <name>Wim Muskee</name>
+</maintainer>
+<longdescription>
+Just a simple tool to erase all uneeded locale and man files usually generated for USE="nls"
+</longdescription>
+</pkgmetadata>