mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-16 19:50:19 +01:00
system/localepurge: Stop writing to $CWD, make noarch.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
9535e2f244
commit
86a72bd394
4 changed files with 25 additions and 251 deletions
|
@ -1,14 +1,14 @@
|
|||
localepurge (remove superfluous locale data)
|
||||
|
||||
localepurge removes superfluous locale data from your system. It is a
|
||||
small script to recover disk space wasted for unneeded locale files
|
||||
localepurge removes superfluous locale data from your system. It is
|
||||
a small script to recover disk space wasted for unneeded locale files
|
||||
and localized man pages.
|
||||
|
||||
This is a script to recover disk space wasted for unneeded locales,
|
||||
Gnome/KDE localizations and localized man pages. Depending on the
|
||||
installation, it is possible to save some 200, 300, or even more mega
|
||||
bytes of disk space dedicated for localization you will most probably
|
||||
never have any use for.
|
||||
This is a script to recover disk space wasted for unneeded locales,
|
||||
Gnome/KDE localizations and localized man pages. Depending on the
|
||||
installation, it is possible to save some 200, 300, or even more
|
||||
megabytes of disk space dedicated to localization you will most
|
||||
probably never have any use for.
|
||||
|
||||
Before use of localepurge, please edit /etc/locale.nopurge commenting
|
||||
the line: NEEDSCONFIGFIRST.
|
||||
Before use of localepurge, please edit /etc/locale.nopurge and comment
|
||||
out the line: NEEDSCONFIGFIRST.
|
||||
|
|
|
@ -1,204 +0,0 @@
|
|||
af
|
||||
am
|
||||
an
|
||||
ang
|
||||
ar
|
||||
as
|
||||
ast
|
||||
az
|
||||
az_IR
|
||||
bal
|
||||
be
|
||||
be@latin
|
||||
bg
|
||||
bg_BG
|
||||
bn
|
||||
bn_IN
|
||||
br
|
||||
brx
|
||||
bs
|
||||
byn
|
||||
ca
|
||||
ca.us-ascii
|
||||
ca@valencia
|
||||
cmn
|
||||
crh
|
||||
cs
|
||||
cs_CZ
|
||||
csb
|
||||
currency
|
||||
cy
|
||||
da
|
||||
de
|
||||
de.us-ascii
|
||||
de@hebrew
|
||||
de_AT
|
||||
de_CH
|
||||
de_DE
|
||||
dz
|
||||
el
|
||||
en
|
||||
en@arabic
|
||||
en@boldquot
|
||||
en@cyrillic
|
||||
en@greek
|
||||
en@hebrew
|
||||
en@piglatin
|
||||
en@quot
|
||||
en@shaw
|
||||
en_AU
|
||||
en_CA
|
||||
en_GB
|
||||
en_US
|
||||
eo
|
||||
es
|
||||
es_419
|
||||
es_AR
|
||||
es_ES
|
||||
es_MX
|
||||
et
|
||||
eu
|
||||
fa
|
||||
fa_IR
|
||||
fi
|
||||
fo
|
||||
fr
|
||||
fr_CA
|
||||
fr_FR
|
||||
fur
|
||||
fy
|
||||
ga
|
||||
gd
|
||||
gez
|
||||
gl
|
||||
gr
|
||||
gu
|
||||
haw
|
||||
he
|
||||
hi
|
||||
hne
|
||||
hr
|
||||
hu
|
||||
hu_HU
|
||||
hy
|
||||
ia
|
||||
id
|
||||
id_ID
|
||||
io
|
||||
is
|
||||
it
|
||||
it_IT
|
||||
ja
|
||||
ja_JP
|
||||
ka
|
||||
kg
|
||||
kk
|
||||
km
|
||||
kn
|
||||
ko
|
||||
ko_KR
|
||||
kok
|
||||
ks
|
||||
ku
|
||||
ku_IQ
|
||||
ky
|
||||
l10n
|
||||
lg
|
||||
li
|
||||
lo
|
||||
locale
|
||||
lt
|
||||
lv
|
||||
mai
|
||||
mg
|
||||
mhr
|
||||
mi
|
||||
mk
|
||||
ml
|
||||
ml_IN
|
||||
mn
|
||||
mr
|
||||
ms
|
||||
ms_MY
|
||||
mt
|
||||
my
|
||||
my_MM
|
||||
nb
|
||||
nds
|
||||
ne
|
||||
nhn
|
||||
nl
|
||||
nl_NL
|
||||
nn
|
||||
no
|
||||
no.us-ascii
|
||||
nso
|
||||
oc
|
||||
or
|
||||
pa
|
||||
pl
|
||||
ps
|
||||
pt
|
||||
pt.us-ascii
|
||||
pt_BR
|
||||
pt_BR.us-ascii
|
||||
pt_PT
|
||||
rm
|
||||
ro
|
||||
ru
|
||||
ru_RU
|
||||
ru_UA
|
||||
rw
|
||||
sd
|
||||
se
|
||||
si
|
||||
sk
|
||||
sl
|
||||
so
|
||||
sp
|
||||
sq
|
||||
sr
|
||||
sr@Latn
|
||||
sr@ije
|
||||
sr@ijekavian
|
||||
sr@ijekavianlatin
|
||||
sr@latin
|
||||
sr_RS
|
||||
sv
|
||||
sv_SE
|
||||
sw
|
||||
szl
|
||||
ta
|
||||
te
|
||||
tg
|
||||
th
|
||||
ti
|
||||
tig
|
||||
tk
|
||||
tl
|
||||
tlh
|
||||
tr
|
||||
tt
|
||||
tt@iqtelif
|
||||
ug
|
||||
uk
|
||||
uk_UA
|
||||
ur
|
||||
ur_PK
|
||||
uz
|
||||
uz@Latn
|
||||
uz@cyrillic
|
||||
ve
|
||||
vi
|
||||
wa
|
||||
wal
|
||||
wo
|
||||
xh
|
||||
yi
|
||||
zh
|
||||
zh_CN
|
||||
zh_CN.GB2312
|
||||
zh_HK
|
||||
zh_TW
|
||||
zh_TW.Big5
|
||||
zu
|
|
@ -22,6 +22,10 @@
|
|||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
# 20220212 bkw: Modified by SlackBuilds.org:
|
||||
# - stop writing to $CWD. *nothing* should *ever* do this.
|
||||
# - make this a noarch package since there's no compiled code.
|
||||
|
||||
cd $(dirname $0) ; CWD=$(pwd)
|
||||
|
||||
PRGNAM=localepurge
|
||||
|
@ -30,17 +34,8 @@ BUILD=${BUILD:-1}
|
|||
TAG=${TAG:-_SBo}
|
||||
PKGTYPE=${PKGTYPE:-tgz}
|
||||
|
||||
if [ -z "$ARCH" ]; then
|
||||
case "$( uname -m )" in
|
||||
i?86) ARCH=i586 ;;
|
||||
arm*) ARCH=arm ;;
|
||||
*) ARCH=$( uname -m ) ;;
|
||||
esac
|
||||
fi
|
||||
ARCH=noarch
|
||||
|
||||
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
|
||||
# the name of the created package would be, and then exit. This information
|
||||
# could be useful to other scripts.
|
||||
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
|
||||
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
|
||||
exit 0
|
||||
|
@ -50,20 +45,6 @@ TMP=${TMP:-/tmp/SBo}
|
|||
PKG=$TMP/package-$PRGNAM
|
||||
OUTPUT=${OUTPUT:-/tmp}
|
||||
|
||||
if [ "$ARCH" = "i586" ]; then
|
||||
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "i686" ]; then
|
||||
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "x86_64" ]; then
|
||||
SLKCFLAGS="-O2 -fPIC"
|
||||
LIBDIRSUFFIX="64"
|
||||
else
|
||||
SLKCFLAGS="-O2"
|
||||
LIBDIRSUFFIX=""
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
||||
rm -rf $PKG
|
||||
|
@ -75,28 +56,25 @@ cd $PRGNAM-$VERSION
|
|||
chown -R root:root .
|
||||
find -L . \
|
||||
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
|
||||
-o -perm 511 \) -exec chmod 755 {} \; -o \
|
||||
-o -perm 511 \) -exec chmod 755 {} \+ -o \
|
||||
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
|
||||
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
|
||||
|
||||
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
|
||||
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
|
||||
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+
|
||||
|
||||
install -D -m755 usr/sbin/localepurge $PKG/usr/bin/localepurge
|
||||
install -D -m644 debian/localepurge.8 $PKG/usr/man/man8/localepurge.8
|
||||
install -D -m755 debian/localepurge.config $PKG/usr/bin/localepurge-config
|
||||
install -D -m644 $CWD/locale.nopurge $PKG/etc/locale.nopurge.new
|
||||
|
||||
if [ ! -e /var/cache/localepurge/localelist ]; then
|
||||
find /usr/share/locale -maxdepth 1 -type d -name "*" -printf "%f\n" | grep "^[a-z]" | cut -d" " -f1 | sort -u > $CWD/localelist
|
||||
else
|
||||
install -D -m644 $CWD/localelist /var/cache/localepurge/localelist
|
||||
fi
|
||||
gzip $PKG/usr/man/man*/*
|
||||
|
||||
install -D -m644 $CWD/localelist $PKG/var/cache/localepurge/localelist
|
||||
CACHEDIR=$PKG/var/cache/localepurge/localelist
|
||||
mkdir -p $CACHEDIR
|
||||
|
||||
find $PKG/usr/man -type f -exec gzip -9 {} \;
|
||||
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
|
||||
find /usr/share/locale -maxdepth 1 -type d -name "*" -printf "%f\n" | \
|
||||
grep "^[a-z]" | \
|
||||
cut -d" " -f1 | \
|
||||
sort -u \
|
||||
> $CACHEDIR/localelist
|
||||
|
||||
DOCS="debian/README.Debian debian/changelog debian/copyright"
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ localepurge: localepurge removes superfluous locale data from your system. It is
|
|||
localepurge: small script to recover disk space wasted for unneeded locale files
|
||||
localepurge: and localized man pages.
|
||||
localepurge:
|
||||
localepurge: Home page: https://packages.debian.org/search?keywords=localepurge
|
||||
localepurge: Homepage: https://packages.debian.org/search?keywords=localepurge
|
||||
localepurge:
|
||||
localepurge:
|
||||
localepurge:
|
||||
|
|
Loading…
Reference in a new issue