mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-28 19:58:18 +01:00
updated for version 1.2.4
This commit is contained in:
parent
04299c5ea9
commit
54b7cd45ad
6 changed files with 49 additions and 42 deletions
|
@ -1,3 +1,8 @@
|
|||
19-05-2014
|
||||
Version 1.2.4
|
||||
|
||||
[Feature] - Added download source code by pc arcitecture
|
||||
|
||||
19-05-2014
|
||||
Version 1.2.3
|
||||
|
||||
|
|
2
PKG-INFO
2
PKG-INFO
|
@ -1,6 +1,6 @@
|
|||
Metadata-Version: 1.1
|
||||
Name: slpkg
|
||||
Version: 1.2.3
|
||||
Version: 1.2.4
|
||||
Author: dslackw
|
||||
Author-email: d zlatanidis at gmail com
|
||||
Maintainer: dslackw
|
||||
|
|
24
README.rst
24
README.rst
|
@ -87,7 +87,7 @@ Check if your packages is up to date (www.slackbuilds.org):
|
|||
|
||||
|
||||
$ slpkg -c flashplayer-plugin
|
||||
Searching for `flashplayer-plugin` from www.slackbuilds.org Please wait ...
|
||||
Searching for `flashplayer-plugin` from www.slackbuilds.org > Please wait ...
|
||||
|
||||
New version is available !!!
|
||||
+==================================================
|
||||
|
@ -96,22 +96,16 @@ Check if your packages is up to date (www.slackbuilds.org):
|
|||
|
||||
|
||||
$ slpkg -c ranger
|
||||
Searching for `ranger` from www.slackbuilds.org Please wait ...
|
||||
Searching for `ranger` from www.slackbuilds.org > Please wait ...
|
||||
|
||||
Your package is up to date
|
||||
|
||||
|
||||
$ slpkg -c termcolor
|
||||
Searching for `termcolor` from www.slackbuilds.org Please wait ...
|
||||
Searching for `termcolor` from www.slackbuilds.org > Please wait ...
|
||||
|
||||
The package `termcolor` not found on your system
|
||||
|
||||
New version is available !!!
|
||||
+==================================================
|
||||
| termcolor 1.1.0
|
||||
+==================================================
|
||||
|
||||
|
||||
|
||||
Find slackbuild from network (www.slackbuilds.org):
|
||||
|
||||
|
@ -121,7 +115,7 @@ Find slackbuild from network (www.slackbuilds.org):
|
|||
This find the slackbuild , source, extra downloads and package requirements !!!
|
||||
|
||||
$ slpkg -n brasero
|
||||
Searching for `brasero` from www.slackbuilds.org Please wait ...
|
||||
Searching for `brasero` from www.slackbuilds.org > Please wait ...
|
||||
|
||||
+=================================================================================
|
||||
| The `brasero` found in --> http://slackbuilds.org/repository/14.1/system/brasero/
|
||||
|
@ -129,7 +123,7 @@ Find slackbuild from network (www.slackbuilds.org):
|
|||
|
||||
Download SlackBuild : http://slackbuilds.org/slackbuilds/14.1/system/brasero.tar.gz
|
||||
Source Downloads : https://download.gnome.org/sources/brasero/3.11/brasero-3.11.3.tar.xz
|
||||
Extra Downloads : []
|
||||
Extra Downloads :
|
||||
Package requirements : libunique gst1-plugins-bad
|
||||
|
||||
|
||||
|
@ -139,7 +133,7 @@ And try again:
|
|||
.. code-block:: bash
|
||||
|
||||
$ slpkg -n bitfighter
|
||||
Searching for `bitfighter` from www.slackbuilds.org Please wait ...
|
||||
Searching for `bitfighter` from www.slackbuilds.org > Please wait ...
|
||||
|
||||
+======================================================================================
|
||||
| The `bitfighter` found in --> http://slackbuilds.org/repository/14.1/games/bitfighter/
|
||||
|
@ -147,12 +141,12 @@ And try again:
|
|||
|
||||
Download SlackBuild : http://slackbuilds.org/slackbuilds/14.1/games/bitfighter.tar.gz
|
||||
Source Downloads : http://bitfighter.org/files/bitfighter-019c.tar.gz
|
||||
Extra Downloads : [https://bitfighter.googlecode.com/files/classic_level_pack.zip]
|
||||
Extra Downloads : https://bitfighter.googlecode.com/files/classic_level_pack.zip
|
||||
Package requirements : OpenAL SDL2 speex libmodplug
|
||||
|
||||
|
||||
$ slpkg -n termcolor
|
||||
Searching for `termcolor` from www.slackbuilds.org Please wait ...
|
||||
Searching for `termcolor` from www.slackbuilds.org > Please wait ...
|
||||
|
||||
+======================================================================================
|
||||
| The `termcolor` found in --> http://slackbuilds.org/repository/14.1/python/termcolor/
|
||||
|
@ -160,7 +154,7 @@ And try again:
|
|||
|
||||
Download SlackBuild : http://slackbuilds.org/slackbuilds/14.1/python/termcolor.tar.gz
|
||||
Source Downloads : https://pypi.python.org/packages/source/t/termcolor/termcolor-1.1.0.tar.gz
|
||||
Extra Downloads : []
|
||||
Extra Downloads :
|
||||
Package requirements :
|
||||
|
||||
|
||||
|
|
56
bin/slpkg
56
bin/slpkg
|
@ -16,11 +16,14 @@ import argparse
|
|||
import subprocess
|
||||
|
||||
__author__ = "dslackw"
|
||||
__version__ = "1.2.3"
|
||||
__version__ = "1.2.4"
|
||||
__license__ = "GNU General Public License v3 (GPLv3)"
|
||||
__email__ = "d.zlatanidis@gmail.com"
|
||||
|
||||
|
||||
# grep computer architecture
|
||||
uname = os.uname()
|
||||
arch = (uname[4])
|
||||
|
||||
|
||||
# path file record
|
||||
|
@ -130,12 +133,19 @@ def sbo_source_dwn(sbo_url, name):
|
|||
sbo_url = sbo_url.replace("repository", "slackbuilds")
|
||||
|
||||
# read lines from .info files grep download line and return source link
|
||||
for line in url_read(sbo_url).splitlines():
|
||||
if line.startswith('DOWNLOAD='):
|
||||
line = line[10:-1]
|
||||
|
||||
return line
|
||||
if arch == "x86_64":
|
||||
for line in url_read(sbo_url).splitlines():
|
||||
if line.startswith('DOWNLOAD_x86_64='):
|
||||
line = line[17:-1]
|
||||
|
||||
return line
|
||||
|
||||
if arch != "x86_64":
|
||||
for line in url_read(sbo_url).splitlines():
|
||||
if line.startswith('DOWNLOAD='):
|
||||
line = line[10:-1]
|
||||
|
||||
return line
|
||||
|
||||
|
||||
# find extra source downloads
|
||||
|
@ -253,6 +263,7 @@ def main():
|
|||
if args.network:
|
||||
find_sbo_url = sbo_search_pkg(args.network)
|
||||
if find_sbo_url == None:
|
||||
print ("\n")
|
||||
print ("{}The {}'{}'{} not found{}".format(colors.RED,
|
||||
colors.CYAN, args.network, colors.RED, colors.ENDC))
|
||||
print
|
||||
|
@ -286,42 +297,39 @@ def main():
|
|||
# check if packages from www.slackbuilds.org is up to date
|
||||
if args.check:
|
||||
find_sbo_url = sbo_search_pkg(args.check)
|
||||
print
|
||||
if find_sbo_url == None:
|
||||
print
|
||||
print ("\n")
|
||||
print ("{}The {}`{}`{} not found{}".format(colors.RED,
|
||||
colors.CYAN, args.check, colors.RED, colors.ENDC))
|
||||
|
||||
print
|
||||
else:
|
||||
find_sbo_version = sbo_version_pkg(find_sbo_url, args.check)
|
||||
|
||||
if find_package(args.check) == []:
|
||||
print
|
||||
print ("\n")
|
||||
print (" {}The package {}`{}`{} not found on your system{}".format(colors.RED,
|
||||
colors.CYAN, args.check, colors.RED, colors.ENDC))
|
||||
sbo_file = ""
|
||||
print
|
||||
else:
|
||||
sbo_file = "".join(find_package(args.check)) # convert list to string
|
||||
name_len = len(args.check)
|
||||
uname = os.uname()
|
||||
arch = (uname[4]) # get computer architecture
|
||||
arch_len = len(arch)
|
||||
sbo_file = sbo_file[name_len+1:-arch_len-7]
|
||||
|
||||
if find_sbo_version > sbo_file:
|
||||
print
|
||||
print ("{} New version is available !!!{}".format(colors.YELLOW, colors.ENDC))
|
||||
print ("+" + "=" * 50)
|
||||
print ("| {} {}".format(args.check, find_sbo_version))
|
||||
print ("+" + "=" * 50)
|
||||
print
|
||||
else:
|
||||
print
|
||||
print ("{}Your package is up to date{}".format(colors.GREEN, colors.ENDC))
|
||||
print
|
||||
|
||||
if find_sbo_version > sbo_file:
|
||||
print ("\n")
|
||||
print ("{} New version is available !!!{}".format(colors.YELLOW, colors.ENDC))
|
||||
print ("+" + "=" * 50)
|
||||
print ("| {} {}".format(args.check, find_sbo_version))
|
||||
print ("+" + "=" * 50)
|
||||
print
|
||||
else:
|
||||
print ("\n")
|
||||
print ("{}Your package is up to date{}".format(colors.GREEN, colors.ENDC))
|
||||
print
|
||||
|
||||
|
||||
# install binary package
|
||||
if args.install:
|
||||
s_user(getpass.getuser())
|
||||
|
|
|
@ -134,7 +134,7 @@ $ \fBslpkg -n termcolor\fP
|
|||
|
||||
Download SlackBuild : http://slackbuilds.org/slackbuilds/14.1/python/termcolor.tar.gz
|
||||
Source Downloads : https://pypi.python.org/packages/source/t/termcolor/termcolor-1.1.0.tar.gz
|
||||
Extra Downloads : []
|
||||
Extra Downloads :
|
||||
Package requirements :
|
||||
|
||||
Etc. download from www.slackbuilds.org the package termcolor
|
||||
|
|
2
setup.py
2
setup.py
|
@ -7,7 +7,7 @@ from distutils.core import setup
|
|||
|
||||
setup(
|
||||
name = 'slpkg',
|
||||
version = "1.2.3",
|
||||
version = "1.2.4",
|
||||
description = "Python tool to manage Slackware packages",
|
||||
keywords = ["slackware", "slpkg", "upgrade", "install", "remove",
|
||||
"view", "slackpkg", "tool"],
|
||||
|
|
Loading…
Add table
Reference in a new issue