Slackpkg+sl is a plugin for slackpkg

It add support for slacky repositories.

Version 0.1 - 12/Jul/2011
  First release.
  - added slacky repository to slackpkg
This commit is contained in:
Matteo Rossini 2011-07-12 18:30:00 +02:00
commit ba4b864ce6
7 changed files with 121 additions and 0 deletions

3
ChangeLog.txt Normal file
View file

@ -0,0 +1,3 @@
Version 0.1 - 12/Jul/2011
First release.
- added slacky repository to slackpkg

30
GPG-KEY Normal file
View file

@ -0,0 +1,30 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.12 (GNU/Linux)
mQENBE0fJ0MBCACt1SvFHKtSDhrYQYXkK1n8o2lGioKWeN7c4AS3plm6OuLs6lbd
tYcfrVqbQbnYluxHDwAvTWwYD/m4LSGCqIj2AOt23K5MLSRk5hxOy7nI1xjtUmeZ
B203fIgk0Ym/vVFuMehM+zM8AC7HtfAZ4ByZX06k7SrK7mQYvIHEHf07Gtw01TZr
mc/Sps3Iz/0j015ztdmGHZ6S97TDu3nuMAdAofSklR+kEM0+HcByu4OLh+iQdYwd
Oo+sAOZrCU9gUElsqWy/Tg0Qdu6PADNV8Btugyzpwz17z5Le5ItHyrpsxdxsFY0Q
+P9FsQxaU7KWKo9Nf2YZlqRgwgffNTtg7aLFABEBAAG0Ik1hdHRlbyBSb3NzaW5p
IDx6ZXJvdW5vQHNsYWNreS5pdD6JATgEEwECACIFAk0fJ0MCGwMGCwkIBwMCBhUI
AgkKCwQWAgMBAh4BAheAAAoJEL/Rm5PtEj+8OsoIAJVNQ676gtyySUMyjghs09mt
VaiubB4iBUgKCuNH11gtuoJ5CRnak3FMuCVUqYbnmb6Y4kYrVQ3OgR26kacSJyia
rFPVH1Skerw80ofKpftfd4AlX30wKp8BoCOcO7zZ8NpZpvyDMTuPwvVZe8kJTl5u
G4oCFEj7TIIL89GXicFlWaahgT0KWX4CAtxklHmFKfeMmwC+PLJtxMj1az1V+tXc
zVUQ2nCNOfR6pBiVO+m/GyRDuHu8yVlIVidLPBnTlgv3rcwWxGeV3qC2J8dXt8rc
OzhQONN9CkP4SvBPfzCSaFRhYhNxjtCvVVAOwheakHgLpzrF9qb8W1cCliaGDma5
AQ0ETR8nQwEIAJ5LsJyxaOMtedc9mYzl82RDdHhTeSfyQcmj5EfitynD/rVQ6rl2
NjSdIcJL76k+VUVFMzuSQCkYQXqYfSJbv7zIj4Y/TTpF0vRco/O2j7hh97PNn7ch
zXIKCqcaGkqXvLkvksw2aHk6r6zXXOBmUbp97BVURBJwT/0DomugbStDDRuasLe8
38JuzjHgvn42vfGpvYS/k+LHWYM4e1O3JrSimlbLFUbz3gImF48g7RbskLynKTdT
dxWds4Qh20fb49quOTt6dK768jwTF3RLQQ6Xj48uzxILYt4qHjIQS1eGTg4IAM2X
hryaIq8DkIzRjoBekW4j37eblVDu6EbGwTkAEQEAAYkBHwQYAQIACQUCTR8nQwIb
DAAKCRC/0ZuT7RI/vOp+B/0dO6o0p9Jxk4qfmDnczfwmBe6k3ysHjaZ80pjQJdhR
tox32KpJk5fIok4lniEsmhrSDAFmWPcciItKUe2AZfOQTzeNqBy4IJFSVHIjuxrp
XwbZ3sTzBNLQWZE4nmHk6MJy+n3Po9FDkvKG1BnpRSfFfIqgAFT/p01tikyfjj6k
QR1UMRMRbHrTVHv5Kx3LMC0udJWxRqhZoLRdRygAcMsoGshhQqy5Wbw9ZLqHp4W9
DgslJY9CmlnRoL/lmYLLHG/oE36UnvsGStpzExbvFTzwOEu44jKXneE3GcIiS/eX
OXmm+F0aDmXyzsDlSyuT5tAV+2Nw5mQQz8OYSxvBNuc1
=zFmp
-----END PGP PUBLIC KEY BLOCK-----

2
README.TXT Normal file
View file

@ -0,0 +1,2 @@
Slackpkg+sl is a plugin for slackpkg
It add support for slacky repositories.

12
src/doinst.sh Executable file
View file

@ -0,0 +1,12 @@
config() {
NEW="$1"
OLD="$(dirname $NEW)/$(basename $NEW .new)"
# If there's no config file by that name, mv it over:
if [ ! -r $OLD ]; then
mv $NEW $OLD
elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then # toss the redundant copy
rm $NEW
fi
# Otherwise, we leave the .new copy for the admin to consider...
}
config etc/slackpkg/slackypkg.conf.new

19
src/slack-desc Normal file
View file

@ -0,0 +1,19 @@
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
|-handy-ruler------------------------------------------------------|
slackpkg+sl: slackpkg+sl plugin for slacky.eu repository
slackpkg+sl:
slackpkg+sl: Slackpkg is a package manager for Slackware.
slackpkg+sl:
slackpkg+sl: Slackpkg+sl is a plugin for slackpkg
slackpkg+sl: It add support for slacky.eu repository.
slackpkg+sl:
slackpkg+sl:
slackpkg+sl:
slackpkg+sl:
slackpkg+sl:

42
src/slacky-functions.sh Executable file
View file

@ -0,0 +1,42 @@
if [ -e /etc/slackpkg/slackypkg.conf ];then
. /etc/slackpkg/slackypkg.conf
fi
if [ "$SLACKY" = "on" ];then
# If CHECKGPG is "on", the system will FAIL the GPG signature of slacky repository
# Use MD5 check instead
CHECKGPG=off
PRIORITY[5]=slacky
if [ "$SLACKVER" = auto ];then
SLACKVER=slackware$(ls /var/log/packages/aaa_base-*|grep -o 64)-$(ls /var/log/packages/aaa_base-*|sed -r 's/.*aaa_base-([^-]+)-.*/\1/')
fi
SLACKYSOURCE=$SLACKYMIRROR/$SLACKVER/
function getfile(){
local URLFILE
URLFILE=$1
URLFILE=`echo $1|sed -r 's#/(development|games|graphic|hardware|libraries|multimedia|network|security|system|utilities)/#/slacky/\1/#' `
URLFILE=`echo $URLFILE|sed "s#^.*/slacky/#$SLACKYSOURCE#"`
echo -e "\t\t\tDownloading $URLFILE..."
$DOWNLOADER $2 $URLFILE
if [ $(basename $1) = "CHECKSUMS.md5" ];then
$DOWNLOADER $2-slacky $SLACKYSOURCE/CHECKSUMS.md5
egrep -e ^[a-f0-9]{32} $2-slacky >> $2
fi
if [ $(basename $1) = "ChangeLog.txt" ];then
$DOWNLOADER $2-slacky $SLACKYSOURCE/ChangeLog.txt
head -1 $2-slacky >> $2
fi
}
if [ -e /var/lib/slackpkg/pkglist ];then
tail -1 /var/lib/slackpkg/pkglist|grep -q ^slacky
if [ $? -ne 0 ];then
sed -r -i.bck \
's/^(development|games|graphic|hardware|libraries|multimedia|network|security|system|utilities)/slacky/' \
/var/lib/slackpkg/pkglist
fi
fi
fi

13
src/slackypkg.conf.new Normal file
View file

@ -0,0 +1,13 @@
SLACKY=on
# Please uncomment a mirror
#SLACKYMIRROR=http://repository.slacky.eu
SLACKYMIRROR=http://darkstar.ist.utl.pt/slackware/addon/slacky
SLACKVER=auto
#SLACKVER=slackware-13.37
#SLACKVER=slackware64-13.37
#SLACKVER=slackware-13.1
#SLACKVER=slackware64-13.1