mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-13 20:01:48 +01:00
updated for version 1.8.7
This commit is contained in:
parent
5c288a60d2
commit
47a40644d6
10 changed files with 45 additions and 32 deletions
|
@ -1,3 +1,8 @@
|
|||
Version 1.8.7
|
||||
19-09-2014
|
||||
|
||||
[Updated] - Fix build time
|
||||
|
||||
Version 1.8.6
|
||||
14-09-2014
|
||||
|
||||
|
|
2
PKG-INFO
2
PKG-INFO
|
@ -1,6 +1,6 @@
|
|||
Metadata-Version: 1.1
|
||||
Name: slpkg
|
||||
Version: 1.8.6
|
||||
Version: 1.8.7
|
||||
Author: dslackw
|
||||
Author-email: d zlatanidis at gmail com
|
||||
Maintainer: dslackw
|
||||
|
|
18
README.rst
18
README.rst
|
@ -7,11 +7,14 @@
|
|||
.. image:: https://raw.githubusercontent.com/dslackw/images/master/slpkg/logo.png
|
||||
:target: https://github.com/dslackw/slpkg
|
||||
|
||||
.. contents:: Table of Contents:
|
||||
|
||||
|
||||
Latest Release:
|
||||
|
||||
- Version: 1.8.6
|
||||
- Version: 1.8.7
|
||||
- `Package <https://sourceforge.net/projects/slpkg/files/slpkg/binary/>`_
|
||||
- `Source <https://github.com/dslackw/slpkg/archive/v1.8.6.tar.gz>`_
|
||||
- `Source <https://github.com/dslackw/slpkg/archive/v1.8.7.tar.gz>`_
|
||||
- `CHANGELOG <https://github.com/dslackw/slpkg/blob/master/CHANGELOG>`_
|
||||
|
||||
`Slpkg <https://github.com/dslackw/slpkg>`_ is a terminal multitool in order to easy use `Slackware <http://www.slackware.com/>`_
|
||||
|
@ -57,7 +60,7 @@ And as we say Slackers, Keep it Simple Stupid!
|
|||
|
||||
|
||||
Features
|
||||
========
|
||||
--------
|
||||
|
||||
- Build third party packages from source with all dependencies
|
||||
- Install packages through from official `Slackware <http://www.slackware.com/>`_ mirrors
|
||||
|
@ -81,12 +84,13 @@ Features
|
|||
It's a quick and easy way to manage your packages in `Slackware <http://www.slackware.com/>`_
|
||||
to a command.
|
||||
|
||||
Video Tutorial
|
||||
==============
|
||||
Tutorial
|
||||
--------
|
||||
|
||||
.. image:: https://raw.githubusercontent.com/dslackw/images/master/slpkg/screenshot-1.png
|
||||
:target: https://asciinema.org/a/12082
|
||||
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
|
@ -94,8 +98,8 @@ Untar the archive and run install.sh script:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ tar xvf slpkg-1.8.6.tar.gz
|
||||
$ cd slpkg-1.8.6
|
||||
$ tar xvf slpkg-1.8.7.tar.gz
|
||||
$ cd slpkg-1.8.7
|
||||
$ ./install.sh
|
||||
|
||||
Using `pip <https://pip.pypa.io/en/latest/>`_ :
|
||||
|
|
|
@ -21,11 +21,12 @@
|
|||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
PRGNAM=slpkg
|
||||
VERSION=${VERSION:-1.8.6}
|
||||
VERSION=${VERSION:-1.8.7}
|
||||
TAG=${TAG:-_dsw}
|
||||
|
||||
cd ..
|
||||
# Installation script.
|
||||
# With this script allows you to install the slpkg as a package SlackBuild.
|
||||
# Select archive to copy in slackbuild directory
|
||||
# support wget download.
|
||||
if [ -f $PRGNAM-$VERSION.zip ]; then
|
||||
|
|
|
@ -68,7 +68,7 @@ slackbuilds.org is up to date.
|
|||
.SS -s , sbo, slack [sbo, slack ...] download, build and install package with all dependencies
|
||||
\fBslpkg\fP \fB-s\fP <\fIsbo\fP> <\fIslack\fP> <\fIname of package\fP>
|
||||
.PP
|
||||
Installs packages from the repository slackbuilds.org automatically resolving all
|
||||
Installs or upgrade packages from the repository slackbuilds.org automatically resolving all
|
||||
dependencies of the package. Also installs the official distribution Slackware
|
||||
packages.
|
||||
.SS -f find packages
|
||||
|
@ -80,7 +80,7 @@ Find installed packages with view total file size.
|
|||
.PP
|
||||
Tracking all dependencies of that package.
|
||||
The sequence shown is that you must follow to correctly install package.
|
||||
.SS -n , find from SBo repositority
|
||||
.SS -n , find packages from SBo repositority
|
||||
\fBslpkg\fP \fB-n\fP <\fIname of package\fP>
|
||||
.PP
|
||||
With this method you can find the SBo script that interests you through
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
PRGNAM=slpkg
|
||||
VERSION=${VERSION:-1.8.6}
|
||||
VERSION=${VERSION:-1.8.7}
|
||||
BUILD=${BUILD:-1}
|
||||
TAG=${TAG:-_dsw}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
PRGNAM="slpkg"
|
||||
VERSION="1.8.6"
|
||||
VERSION="1.8.7"
|
||||
HOMEPAGE="https://github.com/dslackw/slpkg"
|
||||
DOWNLOAD="https://github.com/dslackw/slpkg/archive/v1.8.6.tar.gz"
|
||||
DOWNLOAD="https://github.com/dslackw/slpkg/archive/v1.8.7.tar.gz"
|
||||
MD5SUM=""
|
||||
DOWNLOAD_x86_64=""
|
||||
MD5SUM_x86_64=""
|
||||
|
|
|
@ -26,7 +26,7 @@ import subprocess
|
|||
|
||||
__all__ = "slpkg"
|
||||
__author__ = "dslackw"
|
||||
__version_info__ = (1, 8, 6)
|
||||
__version_info__ = (1, 8, 7)
|
||||
__version__ = "{0}.{1}.{2}".format(*__version_info__)
|
||||
__license__ = "GNU General Public License v3 (GPLv3)"
|
||||
__email__ = "d.zlatanidis@gmail.com"
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
import time
|
||||
import shutil
|
||||
|
@ -37,8 +38,8 @@ from slpkg.sbo.greps import sbo_checksum_pkg
|
|||
|
||||
def build_package(script, sources, path):
|
||||
'''
|
||||
Build package from source and
|
||||
create log file in path /var/log/slpkg/sbo/build_logs/.
|
||||
Build package from source and create log
|
||||
file in path /var/log/slpkg/sbo/build_logs/.
|
||||
Also check md5sum calculates.
|
||||
'''
|
||||
prgnam = script.replace(".tar.gz", "")
|
||||
|
@ -53,6 +54,7 @@ def build_package(script, sources, path):
|
|||
os.mkdir(build_logs)
|
||||
log_date = time.strftime("%d/%m/%Y")
|
||||
start_log_time = time.strftime("%H:%M:%S")
|
||||
start_time = time.time()
|
||||
log_line = ("#" * 79 + "\n\n")
|
||||
try:
|
||||
if os.path.isfile(build_logs + log_file):
|
||||
|
@ -96,24 +98,27 @@ def build_package(script, sources, path):
|
|||
log.write(log_line)
|
||||
log.close()
|
||||
subprocess.Popen("./{0}.SlackBuild 2>&1 | tee -a {1}{2}".format(
|
||||
prgnam, build_logs, log_file), \
|
||||
prgnam, build_logs, log_file), \
|
||||
shell=True, stdout=sys.stdout).communicate()
|
||||
end_log_time = time.strftime("%H:%M:%S")
|
||||
start_time = start_log_time.replace(":", "")
|
||||
end_time = end_log_time.replace(":", "")
|
||||
rmv_time = int(end_time) - int(start_time)
|
||||
end_time = time.time()
|
||||
diff_time = round(end_time - start_time, 2)
|
||||
# calculate build time per package
|
||||
if rmv_time <= 60:
|
||||
sum_time = str(rmv_time) + " Sec"
|
||||
elif rmv_time > 60:
|
||||
div_time = round(float(rmv_time) / 60, 2)
|
||||
rest_time = str(div_time).replace(".", " ").split()
|
||||
sum_time = rest_time[0] + " Min " + rest_time[1] + " Sec"
|
||||
if diff_time <= 60:
|
||||
sum_time = str(diff_time) + " Sec"
|
||||
elif diff_time > 60:
|
||||
sum_time = round(diff_time / 60, 2)
|
||||
sum_time_list = re.findall(r"\d+", str(sum_time))
|
||||
sum_time = ("{0} Min {1} Sec".format(sum_time_list[0], sum_time_list[1]))
|
||||
elif diff_time > 3600:
|
||||
sum_time = round(diff_time / 3600, 2)
|
||||
sum_time_list = re.findall(r"\d+", str(sum_time))
|
||||
sum_time = ("{0} Hours {1} Min".format(sum_time_list[0], sum_time_list[1]))
|
||||
with open(build_logs + log_file, "a") as log: # append END tag to a log file
|
||||
log.seek(2) # EOF
|
||||
log.write(log_line)
|
||||
log.write("Time : " + end_log_time + "\n")
|
||||
log.write("Total build time : " + sum_time + "\n")
|
||||
log.write("Total build time : {0}\n".format(sum_time))
|
||||
log.write(" " * 38 + "E N D\n\n")
|
||||
log.write(log_line)
|
||||
log.close()
|
||||
|
|
|
@ -65,10 +65,8 @@ def sbo_network(name):
|
|||
'''
|
||||
FAULT = ""
|
||||
UNST = ["UNSUPPORTED", "UNTESTED"]
|
||||
for item in UNST:
|
||||
for un in source_dwn:
|
||||
if item == un:
|
||||
FAULT = item
|
||||
if "".join(source_dwn) in UNST:
|
||||
FAULT = "".join(source_dwn)
|
||||
while True:
|
||||
try:
|
||||
read = raw_input("_ ")
|
||||
|
|
Loading…
Reference in a new issue