mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-17 06:11:35 +01:00
updated for version 1.0.6
This commit is contained in:
parent
f9ecb06bcc
commit
0bdad2f46f
7 changed files with 81 additions and 235 deletions
|
@ -1,3 +1,9 @@
|
|||
11-05-2014
|
||||
Version 1.0.6
|
||||
|
||||
[Updated] - updated slackbuild argument
|
||||
|
||||
|
||||
10-05-2014
|
||||
Version 1.0.5
|
||||
|
||||
|
|
175
PKG-INFO
175
PKG-INFO
|
@ -1,186 +1,13 @@
|
|||
Metadata-Version: 1.1
|
||||
Name: slpkg
|
||||
Version: 1.0.5
|
||||
Version: 1.0.6
|
||||
Author: dslackw
|
||||
Author-email: d zlatanidis at gmail com
|
||||
Maintainer: dslackw
|
||||
Maintainer-email: d zlatanidis at gmail com
|
||||
Home-page: https://github.com/dslackw/slpkg
|
||||
Download-url: https://github.com/dslackw/slpkg/archive/v0.0.1.tar.gz
|
||||
Summary: Slackware tool to upgrade, remove, find and view packages contents
|
||||
Description: Slpkg is a terminal tool , written in Python that allows the
|
||||
upgrade, remove, find and view Slackware packages contents.
|
||||
|
||||
It's a quick and easy way to manage your packages in slackware
|
||||
to a command.
|
||||
|
||||
Note: the program is being developed.
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
Using slackware command:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
Download from http://slackbuilds.org
|
||||
or
|
||||
using sbopkg tool http://www.sbopkg.org
|
||||
|
||||
Using pip:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ pip install slpkg
|
||||
|
||||
and for uninstall
|
||||
|
||||
$ pip uninstall slpkg
|
||||
|
||||
|
||||
|
||||
Command Line Tool Usage
|
||||
-----------------------
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
usage: slpkg [-h] [-v] [-u UPGRADE] [-a REINSTALL] [-r REMOVE] [-l] [-f FIND] [-d DISPLAY]
|
||||
|
||||
Slpkg is a Slackware tool to upgrade, remove, find and view packages contents
|
||||
|
||||
optional arguments:
|
||||
-h, --help show this help message and exit
|
||||
-v, --verbose print version and exit
|
||||
-u UPGRADE, --upgrade UPGRADE
|
||||
install-upgrade package with new
|
||||
-a REINSTALL, --reinstall REINSTALL
|
||||
reinstall the same package
|
||||
-r REMOVE, --remove REMOVE
|
||||
remove package
|
||||
-l, --list list of installed packages
|
||||
-f FIND, --find FIND find if package installed
|
||||
-d DISPLAY, --display DISPLAY
|
||||
display the contents of the package
|
||||
|
||||
|
||||
Slpkg Examples
|
||||
--------------
|
||||
|
||||
|
||||
Upgrade package:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ slpkg -u termcolor-1.1.0-x86_64-1_SBo.tgz
|
||||
|
||||
+==========================================================
|
||||
| Installing new package ./termcolor-1.1.0-x86_64-1_SBo.tgz
|
||||
|
||||
+==========================================================
|
||||
|
||||
Verifying package termcolor-1.1.0-x86_64-1_SBo.tgz.
|
||||
Installing package termcolor-1.1.0-x86_64-1_SBo.tgz:
|
||||
PACKAGE DESCRIPTION:
|
||||
# termcolor (ANSII Color formatting for output in terminal)
|
||||
#
|
||||
# termcolor allows you to format your output in terminal.
|
||||
#
|
||||
# Project URL: https://pypi.python.org/pypi/termcolor
|
||||
#
|
||||
Package termcolor-1.1.0-x86_64-1_SBo.tgz installed.
|
||||
|
||||
|
||||
Find if your package installed:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ slpkg -f termcolor
|
||||
The package is installed on your system
|
||||
|
||||
|
||||
Display the contents of the package:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ slpkg -d termcolor
|
||||
PACKAGE NAME: termcolor-1.1.0-x86_64-1_SBo
|
||||
COMPRESSED PACKAGE SIZE: 8.0K
|
||||
UNCOMPRESSED PACKAGE SIZE: 60K
|
||||
PACKAGE LOCATION: ./termcolor-1.1.0-x86_64-1_SBo.tgz
|
||||
PACKAGE DESCRIPTION:
|
||||
termcolor: termcolor (ANSII Color formatting for output in terminal)
|
||||
termcolor:
|
||||
termcolor: termcolor allows you to format your output in terminal.
|
||||
termcolor:
|
||||
termcolor:
|
||||
termcolor: Project URL: https://pypi.python.org/pypi/termcolor
|
||||
termcolor:
|
||||
termcolor:
|
||||
termcolor:
|
||||
termcolor:
|
||||
FILE LIST:
|
||||
./
|
||||
usr/
|
||||
usr/lib64/
|
||||
usr/lib64/python2.7/
|
||||
usr/lib64/python2.7/site-packages/termcolor.py
|
||||
usr/lib64/python2.7/site-packages/termcolor.pyc
|
||||
usr/lib64/python2.7/site-packages/termcolor-1.1.0-py2.7.egg-info
|
||||
usr/lib64/python3.3/
|
||||
usr/lib64/python3.3/site-packages/
|
||||
usr/lib64/python3.3/site-packages/termcolor-1.1.0-py3.3.egg-info
|
||||
usr/lib64/python3.3/site-packages/__pycache__/
|
||||
usr/lib64/python3.3/site-packages/__pycache__/termcolor.cpython-33.pyc
|
||||
usr/lib64/python3.3/site-packages/termcolor.py
|
||||
usr/doc/
|
||||
usr/doc/termcolor-1.1.0/
|
||||
usr/doc/termcolor-1.1.0/termcolor.SlackBuild
|
||||
usr/doc/termcolor-1.1.0/README.rst
|
||||
usr/doc/termcolor-1.1.0/CHANGES.rst
|
||||
usr/doc/termcolor-1.1.0/PKG-INFO
|
||||
usr/doc/termcolor-1.1.0/COPYING.txt
|
||||
install/
|
||||
install/slack-desc
|
||||
|
||||
|
||||
Remove package:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ slpkg -r termcolor
|
||||
!!! WARNING !!!
|
||||
Are you sure to remove this package [y/n] y
|
||||
|
||||
Package: termcolor-1.1.0-x86_64-1_SBo
|
||||
Removing...
|
||||
|
||||
Removing package /var/log/packages/termcolor-1.1.0-x86_64-1_SBo...
|
||||
Removing files:
|
||||
--> Deleting /usr/doc/termcolor-1.1.0/CHANGES.rst
|
||||
--> Deleting /usr/doc/termcolor-1.1.0/COPYING.txt
|
||||
--> Deleting /usr/doc/termcolor-1.1.0/PKG-INFO
|
||||
--> Deleting /usr/doc/termcolor-1.1.0/README.rst
|
||||
--> Deleting /usr/doc/termcolor-1.1.0/termcolor.SlackBuild
|
||||
--> Deleting /usr/lib64/python2.7/site-packages/termcolor-1.1.0-py2.7.egg-info
|
||||
--> Deleting /usr/lib64/python2.7/site-packages/termcolor.py
|
||||
--> Deleting /usr/lib64/python2.7/site-packages/termcolor.pyc
|
||||
--> Deleting /usr/lib64/python3.3/site-packages/__pycache__/termcolor.cpython-33.pyc
|
||||
--> Deleting /usr/lib64/python3.3/site-packages/termcolor-1.1.0-py3.3.egg-info
|
||||
--> Deleting /usr/lib64/python3.3/site-packages/termcolor.py
|
||||
--> Deleting empty directory /usr/lib64/python3.3/site-packages/__pycache__/
|
||||
WARNING: Unique directory /usr/lib64/python3.3/site-packages/ contains new files
|
||||
WARNING: Unique directory /usr/lib64/python3.3/ contains new files
|
||||
--> Deleting empty directory /usr/doc/termcolor-1.1.0/
|
||||
|
||||
|
||||
$ slpkg -f termcolor
|
||||
The package is not installed on your system
|
||||
|
||||
$ slpkg -d termcolor
|
||||
The package is not found
|
||||
|
||||
$ slpkg -v
|
||||
Version: x.x.x
|
||||
Keywords: slackware,upgrade,install,remove,find
|
||||
Classifier: Development Status :: 3 - Alpha
|
||||
Classifier: Environment :: Console
|
||||
|
|
79
README.rst
79
README.rst
|
@ -7,9 +7,9 @@
|
|||
|
||||
|
||||
.. image:: https://raw.githubusercontent.com/dslackw/slpkg/master/logo/slpkg.png
|
||||
:scale: 100%
|
||||
:width: 45%
|
||||
:align: center
|
||||
:scale: 60%
|
||||
:width: 30%
|
||||
:align: left
|
||||
|
||||
Slpkg is a terminal tool , written in Python that allows the
|
||||
build, upgrade, remove, find and view Slackware packages contents.
|
||||
|
@ -50,15 +50,15 @@ Command Line Tool Usage
|
|||
|
||||
usage: slpkg [-h] [-v] [-u] [-a] [-s name script source] [-r] [-l] [-f] [-d]
|
||||
|
||||
Slpkg is a Slackware tool to upgrade, remove, find and view packages contents
|
||||
Utility to help package management in Slackware
|
||||
|
||||
optional arguments:
|
||||
-h, --help show this help message and exit
|
||||
-v, --verbose print version and exit
|
||||
-u, --upgrade install-upgrade package with new
|
||||
-a, --reinstall reinstall the same package
|
||||
-s name script source, --slackbuild name script source
|
||||
auto build package
|
||||
-s script source, --slackbuild script source
|
||||
auto build package
|
||||
-r, --remove remove package
|
||||
-l, --list list of installed packages
|
||||
-f, --find find if package installed
|
||||
|
@ -69,36 +69,6 @@ Slpkg Examples
|
|||
--------------
|
||||
|
||||
|
||||
Upgrade package:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ slpkg -u termcolor-1.1.0-x86_64-1_SBo.tgz
|
||||
|
||||
+==============================================================================
|
||||
| Installing new package ./termcolor-1.1.0-x86_64-1_SBo.tgz
|
||||
+==============================================================================
|
||||
|
||||
Verifying package termcolor-1.1.0-x86_64-1_SBo.tgz.
|
||||
Installing package termcolor-1.1.0-x86_64-1_SBo.tgz:
|
||||
PACKAGE DESCRIPTION:
|
||||
# termcolor (ANSII Color formatting for output in terminal)
|
||||
#
|
||||
# termcolor allows you to format your output in terminal.
|
||||
#
|
||||
# Project URL: https://pypi.python.org/pypi/termcolor
|
||||
#
|
||||
Package termcolor-1.1.0-x86_64-1_SBo.tgz installed.
|
||||
|
||||
|
||||
Find if your package installed:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ slpkg -f termcolor
|
||||
The package is installed on your system
|
||||
|
||||
|
||||
Auto build tool to build package:
|
||||
|
||||
.. code-block:: bash
|
||||
|
@ -109,7 +79,7 @@ Auto build tool to build package:
|
|||
Two files termcolor.tar.gz and termcolor-1.1.0.tar.gz
|
||||
must be in the same directory.
|
||||
|
||||
$ slpkg -s termcolor termcolor.tar.gz termcolor-1.1.0.tar.gz
|
||||
$ slpkg -s termcolor.tar.gz termcolor-1.1.0.tar.gz
|
||||
|
||||
termcolor/
|
||||
termcolor/slack-desc
|
||||
|
@ -177,6 +147,36 @@ Auto build tool to build package:
|
|||
Slackware package /tmp/termcolor-1.1.0-x86_64-1_SBo.tgz created.
|
||||
|
||||
|
||||
Upgrade install or upackage:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ slpkg -u /tmp/termcolor-1.1.0-x86_64-1_SBo.tgz
|
||||
|
||||
+==============================================================================
|
||||
| Installing new package ./termcolor-1.1.0-x86_64-1_SBo.tgz
|
||||
+==============================================================================
|
||||
|
||||
Verifying package termcolor-1.1.0-x86_64-1_SBo.tgz.
|
||||
Installing package termcolor-1.1.0-x86_64-1_SBo.tgz:
|
||||
PACKAGE DESCRIPTION:
|
||||
# termcolor (ANSII Color formatting for output in terminal)
|
||||
#
|
||||
# termcolor allows you to format your output in terminal.
|
||||
#
|
||||
# Project URL: https://pypi.python.org/pypi/termcolor
|
||||
#
|
||||
Package termcolor-1.1.0-x86_64-1_SBo.tgz installed.
|
||||
|
||||
|
||||
Find if your package installed:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ slpkg -f termcolor
|
||||
The package is installed on your system
|
||||
|
||||
|
||||
Display the contents of the package:
|
||||
|
||||
.. code-block:: bash
|
||||
|
@ -244,7 +244,8 @@ Remove package:
|
|||
--> Deleting /usr/lib64/python2.7/site-packages/termcolor-1.1.0-py2.7.egg-info
|
||||
--> Deleting /usr/lib64/python2.7/site-packages/termcolor.py
|
||||
--> Deleting /usr/lib64/python2.7/site-packages/termcolor.pyc
|
||||
--> Deleting /usr/lib64/python3.3/site-packages/__pycache__/termcolor.cpython-33.pyc
|
||||
--> Deleting
|
||||
/usr/lib64/python3.3/site-packages/__pycache__/termcolor.cpython-33.pyc
|
||||
--> Deleting /usr/lib64/python3.3/site-packages/termcolor-1.1.0-py3.3.egg-info
|
||||
--> Deleting /usr/lib64/python3.3/site-packages/termcolor.py
|
||||
--> Deleting empty directory /usr/lib64/python3.3/site-packages/__pycache__/
|
||||
|
@ -267,5 +268,3 @@ Man page it is available for full support:
|
|||
.. code-block:: bash
|
||||
|
||||
$ man slpkg
|
||||
|
||||
|
||||
|
|
22
bin/slpkg
22
bin/slpkg
|
@ -7,7 +7,7 @@ import sys
|
|||
import argparse
|
||||
import subprocess
|
||||
|
||||
__version__ = "1.0.5"
|
||||
__version__ = "1.0.6"
|
||||
__author__ = "dslackw"
|
||||
__license__ = "GPLv3"
|
||||
|
||||
|
@ -25,12 +25,12 @@ def find_package(find_pkg):
|
|||
|
||||
# main function
|
||||
def main():
|
||||
description = "Slpkg is a Slackware tool to upgrade, remove, find and view packages contents"
|
||||
description = "Utility to help package management in Slackware"
|
||||
parser = argparse.ArgumentParser(description=description)
|
||||
parser.add_argument("-v", "--verbose", help="print version and exit", action="store_true")
|
||||
parser.add_argument("-u", "--upgrade", help="install-upgrade package with new", type=str, metavar=(''))
|
||||
parser.add_argument("-a", "--reinstall", help="reinstall the same package", type=str, metavar=(''))
|
||||
parser.add_argument("-s", "--slackbuild", help="auto build package", type=str, nargs=3, metavar=('name','script','source'))
|
||||
parser.add_argument("-s", "--slackbuild", help="auto build package", type=str, nargs=2, metavar=('script','source'))
|
||||
parser.add_argument("-r", "--remove", help="remove package", type=str, metavar=(''))
|
||||
parser.add_argument("-l", "--list", help="list of installed packages", action="store_true")
|
||||
parser.add_argument("-f", "--find", help="find if package installed", type=str, metavar=(''))
|
||||
|
@ -51,15 +51,23 @@ def main():
|
|||
|
||||
# auto build package from slackbuild script
|
||||
if args.slackbuild:
|
||||
pkg_name = args.slackbuild[0]
|
||||
slack_script = args.slackbuild[1]
|
||||
source_tar = args.slackbuild[2]
|
||||
slack_script = args.slackbuild[0]
|
||||
source_tar = args.slackbuild[1]
|
||||
|
||||
# remove file type from slackbuild script and store the name
|
||||
pkg_name = slack_script.replace(".tar.gz", "")
|
||||
if pkg_name != slack_script:
|
||||
pass
|
||||
else:
|
||||
pkg_name = slack_script.replace(".tar.bz2", "")
|
||||
|
||||
path = subprocess.check_output(["pwd"], shell=True).replace("\n", "/")
|
||||
os.system("tar xvf {}{}".format(path, slack_script))
|
||||
os.system("cp {} {}".format(source_tar, pkg_name))
|
||||
os.chdir(path + pkg_name)
|
||||
os.system("sh {}{}{}".format(path, pkg_name + "/", pkg_name + ".SlackBuild"))
|
||||
|
||||
|
||||
# uninstall package
|
||||
if args.remove:
|
||||
if find_package(args.remove) == "":
|
||||
|
@ -74,7 +82,7 @@ def main():
|
|||
if args.list:
|
||||
os.system("ls " + __packages__ + "* | more")
|
||||
|
||||
# find if packages installed on your system
|
||||
# find if package installed on your system
|
||||
if args.find:
|
||||
if find_package(args.find) == "":
|
||||
os.system("echo -e '\e[31mThe package is not installed on your system\e[39m'")
|
||||
|
|
30
man/slpkg.8
30
man/slpkg.8
|
@ -13,12 +13,12 @@
|
|||
.\"
|
||||
.TH Slpkg "8" "5 2014" "slpkg"
|
||||
.SH NAME
|
||||
slpkg - Slackware tool to upgrade, remove, find and view packages contents
|
||||
slpkg - Utility to help package management in Slackware
|
||||
.SH SYNOPSIS
|
||||
\fBslpkg\fP [\fIoptions\fP] \fB[-h]\fP \fB[-v]\fP \fB[-u UPGRADE]\fP \fB[-a REINSTALL]\fP \fB[-r REMOVE]\fP \fB[-l]\fP \fB[-f FIND]\fP \fB[-d DISPLAY]\fP <\fIcommand-arguments\fP>...
|
||||
.SH DESCRIPTION
|
||||
\fBslpkg\fP is a terminal tool , written in Python that allows the upgrade, remove, find
|
||||
and view Slackware packages contents.
|
||||
\fBslpkg\fP is a terminal tool written in Python that allows the build, install, upgrade,
|
||||
remove, find and view Slackware packages contents.
|
||||
.PP
|
||||
It's a quick and easy way to manage your packages in slackware to a command.
|
||||
.SH EXAMPLES
|
||||
|
@ -26,7 +26,7 @@ It's a quick and easy way to manage your packages in slackware to a command.
|
|||
\fB-v, --verbose print version and exit\fP
|
||||
\fB-u, --upgrade install-upgrade package with new\fP
|
||||
\fB-a, --reinstall reinstall the same package\fP
|
||||
\fB-s name script source, --slackbuild name script source\fP
|
||||
\fB-s script source, --slackbuild script source\fP
|
||||
\fB auto build package\fP
|
||||
\fB-r, --remove remove package\fP
|
||||
\fB-l, --list list of installed packages\fP
|
||||
|
@ -54,15 +54,10 @@ Upgradepkg usually skips packages ifthe exact same package
|
|||
installed on the system.'Requires root privileges' (like
|
||||
slackware command upgradepkg --reinstall)
|
||||
.SS -s name script source
|
||||
\fBslpkg\fP \fB-s\fP <\fIname\fP> <\fIscript\fP> <\fIsource\fP>
|
||||
\fBslpkg\fP \fB-s\fP <\fIscript\fP> <\fIsource\fP>
|
||||
.PP
|
||||
Etc. download from www.slackbuilds.org the package termcolor
|
||||
http://slackbuilds.org/repository/14.1/python/termcolor/
|
||||
|
||||
Two files termcolor.tar.gz and termcolor-1.1.0.tar.gz
|
||||
must be in the same directory.
|
||||
|
||||
$ slpkg -s termcolor termcolor.tar.gz termcolor-1.1.0.tar.gz
|
||||
With this argument, build slackware package quickly and easy.
|
||||
Support .tar.gz and .tar.bz2 slackbuilds archives.
|
||||
.SS -r --remove
|
||||
\fBslpkg\fP \fB-r\fP <\fIname of package\fP>
|
||||
.PP
|
||||
|
@ -90,6 +85,17 @@ command.
|
|||
For example:
|
||||
\fBslpkg \-\-help\fP - display help for slpkg
|
||||
.SH EXAMPLES
|
||||
Etc. download from www.slackbuilds.org the package termcolor
|
||||
http://slackbuilds.org/repository/14.1/python/termcolor/
|
||||
|
||||
Two files termcolor.tar.gz and termcolor-1.1.0.tar.gz
|
||||
must be in the same directory.
|
||||
|
||||
$ \fBslpkg -s termcolor.tar.gz termcolor-1.1.0.tar.gz\fP
|
||||
|
||||
Slackware package /tmp/termcolor-1.1.0-x86_64-1_SBo.tgz created.
|
||||
|
||||
|
||||
$ \fBslpkg -u termcolor-1.1.0-x86_64-1_SBo.tgz\fP
|
||||
|
||||
Installing new package ./termcolor-1.1.0-x86_64-1_SBo.tgz
|
||||
|
|
BIN
man/slpkg.8.gz
BIN
man/slpkg.8.gz
Binary file not shown.
4
setup.py
4
setup.py
|
@ -8,13 +8,13 @@ from distutils.core import setup
|
|||
setup(
|
||||
name='Slpkg',
|
||||
py_modules=['slpkg'],
|
||||
version='1.0.5',
|
||||
version='1.0.6',
|
||||
description="Python tool to manage Slackware packages",
|
||||
keywords=["slpkg", "upgrade", "install", "remove", "view", "slackpkg", "tool"],
|
||||
author="dslackw",
|
||||
author_email="d.zlatanidis@gmail.com",
|
||||
url="https://github.com/dslackw/slpkg",
|
||||
download_url="https://github.com/dslackw/slpkg/archive/v1.0.5.tar.gz",
|
||||
download_url="https://github.com/dslackw/slpkg/archive/v1.0.6.tar.gz",
|
||||
scripts=['bin/slpkg'],
|
||||
package_data={"": ["LICENSE", "README.rst", "CHANGELOG"]},
|
||||
classifiers=[
|
||||
|
|
Loading…
Reference in a new issue