mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-18 22:54:00 +00:00
aur/localepurge to 0.7.3.2-1
This commit is contained in:
parent
26f6aa713c
commit
7e06f14ff7
2 changed files with 17 additions and 40 deletions
|
@ -3,14 +3,14 @@
|
|||
# Contributor: Dincer Celik <dincer@bornovali.com>
|
||||
|
||||
pkgname=localepurge
|
||||
pkgver=0.7.3.1
|
||||
pkgver=0.7.3.2
|
||||
pkgrel=1
|
||||
pkgdesc="Script to remove disk space wasted for unneeded localizations."
|
||||
arch=('any')
|
||||
url="http://packages.debian.org/source/sid/localepurge"
|
||||
license=('GPL')
|
||||
backup=('etc/locale.nopurge')
|
||||
source=("http://ftp.de.debian.org/debian/pool/main/l/localepurge/${pkgname}_${pkgver}.tar.gz"
|
||||
source=("http://ftp.de.debian.org/debian/pool/main/l/localepurge/${pkgname}_${pkgver}.tar.xz"
|
||||
"${pkgname}.diff"
|
||||
"${pkgname}.8.diff"
|
||||
"${pkgname}.config.diff"
|
||||
|
@ -36,8 +36,8 @@ package()
|
|||
fi
|
||||
install -D -m644 ${srcdir}/localelist ${pkgdir}/var/cache/localepurge/localelist
|
||||
}
|
||||
sha256sums=('d3b9f7a280211b049647b0c873be10830bb1e035adb9646a7211fae0809e87d0'
|
||||
sha256sums=('22bf6faaa1e69c4074b0f0f7ed6cab55a8948f024ce823e15550e45ef264247a'
|
||||
'b8704eec22d0e84ada9a524277322f9892c11f3f4b84ec0dd4f50f0ca2dc7474'
|
||||
'82bd40594ef0646465eed6e525368e87694322513c0d3280879fcfc5c40cb6a7'
|
||||
'dbed1ae1f1514f14c00fdb48d09ac8cd3407dbc3f1a1fed84f1e8735da1f9678'
|
||||
'b27e69a87f81ecb01ecd9fd92c174ed3c4406200eedc50ba6ebabce91e3851e8'
|
||||
'b9c28be93fa47d4f0315972159e501d9eef28bbab7ffe6e8e7c4a13c359f35e8')
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- ../localepurge-orig/debian/localepurge.config 2013-09-20 14:01:46.000000000 +0200
|
||||
+++ localepurge.config 2013-09-21 15:31:10.574338160 +0200
|
||||
@@ -2,36 +2,22 @@
|
||||
--- localepurge.conf.orig 2014-02-04 18:17:32.554174127 +0100
|
||||
+++ localepurge.conf 2014-02-04 18:21:08.911092875 +0100
|
||||
@@ -2,26 +2,11 @@
|
||||
|
||||
set -e
|
||||
|
||||
|
@ -9,9 +9,7 @@
|
|||
# first get all possible locales and create a full list of locale values:
|
||||
|
||||
-CONFIG_FILE="/etc/locale.nopurge"
|
||||
-TEMPFILE=$(tempfile).$$
|
||||
+#TEMPFILE=$(tempfile).$$ ## tempfile command is part of debianutils package
|
||||
+TEMPFILE=$(mktemp).$$
|
||||
TEMPFILE="$(mktemp --suffix ".locales")"
|
||||
LOCALELIST=/var/cache/localepurge/localelist
|
||||
|
||||
-conf_has_key() {
|
||||
|
@ -29,19 +27,7 @@
|
|||
# for the purpose of presenting a ready made preselection at the very first
|
||||
# configuration, include already configured locales from locales package:
|
||||
|
||||
-LOCALEGEN=$(tempfile).locale.gen
|
||||
+LOCALEGEN=$(mktemp).locale.gen
|
||||
touch "$LOCALEGEN"
|
||||
|
||||
if [ -f /etc/locale.gen ]; then
|
||||
grep ^[a-z] /etc/locale.gen | cut -d" " -f1 > "$LOCALEGEN"
|
||||
# add double character locale names from underscore variations
|
||||
- # for later preselection:
|
||||
+ # for later preselection:
|
||||
cut -d"_" -f1 "$LOCALEGEN" | sort -u >> "$LOCALEGEN"
|
||||
fi
|
||||
|
||||
@@ -47,9 +33,8 @@
|
||||
@@ -46,9 +31,7 @@
|
||||
|
||||
# include locales supported by the locales package:
|
||||
|
||||
|
@ -49,11 +35,10 @@
|
|||
- grep ^[a-z] /usr/share/i18n/SUPPORTED | cut -d' ' -f1 | sort -u >> "$TEMPFILE"
|
||||
-fi
|
||||
+find /usr/share/locale -maxdepth 1 -type d -name "*" -printf "%f\n" | grep "^[a-z]" | cut -d" " -f1 | sort -u >> "$TEMPFILE"
|
||||
+#find /usr/share/i18n/locales -maxdepth 1 -type f -name "*" -printf "%f\n" | grep "^[a-z]" | cut -d" " -f1 | sort -u >> "$TEMPFILE"
|
||||
|
||||
# include locales from our previous localelist if it already exists:
|
||||
|
||||
@@ -60,8 +45,7 @@
|
||||
@@ -59,8 +42,7 @@
|
||||
# include locales from newly added locales:
|
||||
NEWLOCALELIST="$LOCALELIST"-new
|
||||
|
||||
|
@ -63,20 +48,12 @@
|
|||
cat "$NEWLOCALELIST" >> "$TEMPFILE"
|
||||
rm -f "$NEWLOCALELIST"
|
||||
fi
|
||||
@@ -74,102 +58,14 @@
|
||||
|
||||
if [ ! -f "$LOCALELIST" ]; then
|
||||
if [ ! -d /var/cache/localepurge ]; then
|
||||
- mkdir -m 755 /var/cache/localepurge
|
||||
+ mkdir -m 755 /var/cache/localepurge
|
||||
fi
|
||||
sort -u "$TEMPFILE" > "$LOCALELIST"
|
||||
- else
|
||||
+else
|
||||
@@ -79,96 +61,9 @@
|
||||
else
|
||||
mv "$LOCALELIST" "$LOCALELIST"-old
|
||||
sort -u "$TEMPFILE" > "$LOCALELIST"
|
||||
fi
|
||||
|
||||
-fi
|
||||
-
|
||||
-# finally sort and create full list of all collected locale names
|
||||
-
|
||||
-LOCALES=$(sort -u "$TEMPFILE" | tr '\n' ' ' \
|
||||
|
@ -102,12 +79,12 @@
|
|||
-
|
||||
- PRESELECT=$(sort -u "$LOCALEGEN" | tr '\n' ' ' \
|
||||
- | sed 's/\ /,\ /g' | sed 's/,\ $//g')
|
||||
-fi
|
||||
-
|
||||
fi
|
||||
|
||||
# deleting temporary files not needed anymore:
|
||||
|
||||
rm -f "$TEMPFILE" "$LOCALEGEN"
|
||||
-
|
||||
|
||||
-#############################################################
|
||||
-# now that all locale data is in place let debconf take over:
|
||||
-
|
||||
|
|
Loading…
Reference in a new issue