Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Commits on Source (1)
updated for version 1.3.3
· 17c00f57
Dimitris Zlatanidis
authored
May 23, 2014
17c00f57
Hide whitespace changes
Inline
Side-by-side
CHANGELOG
View file @
17c00f57
22-05-2014
Version 1.3.3
[Feature] - Added download and build package
22-05-2014
Version 1.3.2
...
...
PKG-INFO
View file @
17c00f57
Metadata-Version: 1.1
Name: slpkg
Version: 1.3.
2
Version: 1.3.
3
Author: dslackw
Author-email: d zlatanidis at gmail com
Maintainer: dslackw
...
...
README.rst
View file @
17c00f57
...
...
@@ -25,6 +25,7 @@ Features
- View README file
- View SlackBuild file
- View Info file
- Auto Download and Build packages
- Install binary packages
- Install-upgrade packages with new
- Reinstall the same packages
...
...
@@ -200,10 +201,11 @@ Find slackbuild from network (www.slackbuilds.org):
| Extra Downloads :
| Package requirements : libunique gst1-plugins-bad
+==================================================================================
README View the README file
SlackBuild View the SlackBuild file
Info View the Info file
Download Download this package
README View the README file
SlackBuild View the SlackBuild file
Info View the Info file
Download Download this package
Build Download and build this package
_
...
...
@@ -223,10 +225,11 @@ And try again:
| Extra Downloads : https://bitfighter.googlecode.com/files/classic_level_pack.zip
| Package requirements : OpenAL SDL2 speex libmodplug
+=======================================================================================
README View the README file
SlackBuild View the SlackBuild file
Info View the Info file
Download Download this package
README View the README file
SlackBuild View the SlackBuild file
Info View the Info file
Download Download this package
Build Download and build this package
_
...
...
@@ -242,10 +245,11 @@ And try again:
| Extra Downloads :
| Package requirements :
+======================================================================================
README View the README file
SlackBuild View the SlackBuild file
Info View the Info file
Download Download this package
README View the README file
SlackBuild View the SlackBuild file
Info View the Info file
Download Download this package
Build Download and build this package
_
...
...
bin/slpkg
View file @
17c00f57
...
...
@@ -46,7 +46,7 @@ import subprocess
__author__
=
"
dslackw
"
__version__
=
"
1.3.
2
"
__version__
=
"
1.3.
3
"
__license__
=
"
GNU General Public License v3 (GPLv3)
"
__email__
=
"
d.zlatanidis@gmail.com
"
...
...
@@ -111,6 +111,26 @@ def rmv_unused(name):
return
name
# get filename from links
def
get_file
(
link
):
char
=
"
/
"
j
=
0
results
=
[]
for
i
in
link
:
j
+=
1
results
.
append
(
link
[
-
j
:])
for
file
in
results
:
if
file
.
startswith
(
char
):
file
=
file
break
file
=
file
.
replace
(
"
/
"
,
""
)
# remove first char "/" from string
file
=
file
.
strip
(
"
"
)
# remove spaces from string
return
file
# this fuction return if the package exist
...
...
@@ -356,6 +376,12 @@ def build_extra_pkg(script, source, extra):
source_tar
=
source
extra_source
=
extra
print
slack_script
print
source_tar
print
extra_source
# remove file type from slackbuild script and store the name
pkg_name
=
slack_script
.
replace
(
"
.tar.gz
"
,
""
)
if
pkg_name
!=
slack_script
:
...
...
@@ -366,18 +392,18 @@ def build_extra_pkg(script, source, extra):
path
=
subprocess
.
check_output
([
"
pwd
"
],
shell
=
True
).
replace
(
"
\n
"
,
"
/
"
)
try
:
tar
=
tarfile
.
open
(
slack_script
)
tar
.
extractall
()
tar
.
extractall
()
tar
.
close
()
shutil
.
copy2
(
source_tar
,
pkg_name
)
shutil
.
copy2
(
extra_source
,
pkg_name
)
os
.
chdir
(
path
+
pkg_name
)
os
.
chdir
(
path
+
pkg_name
)
os
.
system
(
"
sh {}{}{}
"
.
format
(
path
,
pkg_name
+
"
/
"
,
pkg_name
+
"
.SlackBuild
"
))
print
(
"
{}Use {}`slpkg -u`{} to install - upgrade this package{}
\n
"
.
format
(
colors
.
YELLOW
,
colors
.
CYAN
,
colors
.
YELLOW
,
colors
.
ENDC
))
except
(
OSError
,
IOError
):
print
print
(
"
{}Wrong file name, Please try again...{}
\n
"
.
format
(
colors
.
RED
,
colors
.
ENDC
))
colors
.
ENDC
))
...
...
@@ -496,7 +522,7 @@ def sbo_network(name):
find_sbo_dwn
=
sbo_slackbuild_dwn
(
find_sbo_url
,
name
)
find_source_dwn
=
sbo_source_dwn
(
find_sbo_url
,
name
)
find_extra_dwn
=
sbo_extra_dwn
(
find_sbo_url
,
name
)
find_extra_dwn
=
"
"
.
join
(
find_extra_dwn
)
find_extra_dwn
=
"
"
.
join
(
find_extra_dwn
)
# convert list to string
# caclulate the length of the link
sbo_name_len
=
len
(
name
)
...
...
@@ -516,10 +542,11 @@ def sbo_network(name):
print
(
"
| {}Package requirements : {}{}
"
.
format
(
colors
.
YELLOW
,
colors
.
ENDC
,
find_sbo_req
))
print
(
"
+
"
+
"
=
"
*
sbo_url_len
)
print
(
"
{}R{}EADME View the README file
"
.
format
(
colors
.
RED
,
colors
.
ENDC
))
print
(
"
{}S{}lackBuild View the SlackBuild file
"
.
format
(
colors
.
RED
,
colors
.
ENDC
))
print
(
"
{}I{}nfo View the Info file
"
.
format
(
colors
.
RED
,
colors
.
ENDC
))
print
(
"
{}D{}ownload Download this package
"
.
format
(
colors
.
RED
,
colors
.
ENDC
))
print
(
"
{}R{}EADME View the README file
"
.
format
(
colors
.
RED
,
colors
.
ENDC
))
print
(
"
{}S{}lackBuild View the SlackBuild file
"
.
format
(
colors
.
RED
,
colors
.
ENDC
))
print
(
"
{}I{}nfo View the Info file
"
.
format
(
colors
.
RED
,
colors
.
ENDC
))
print
(
"
{}D{}ownload Download this package
"
.
format
(
colors
.
RED
,
colors
.
ENDC
))
print
(
"
{}B{}uild Download and build this package
"
.
format
(
colors
.
RED
,
colors
.
ENDC
))
print
while
True
:
read
=
raw_input
(
"
_
"
)
...
...
@@ -547,6 +574,39 @@ def sbo_network(name):
elif
read
==
"
S
"
or
read
==
"
s
"
:
read_slackbuild
(
find_sbo_url
,
name
)
os
.
system
(
"
less /tmp/slpkg/readme/
"
+
name
+
"
.{}
"
.
format
(
"
SlackBuild
"
))
elif
read
==
"
B
"
or
read
==
"
b
"
:
script
=
get_file
(
find_sbo_dwn
)
source
=
get_file
(
find_source_dwn
)
print
print
(
"
{}Start -->{}
\n
"
.
format
(
colors
.
GREEN
,
colors
.
ENDC
))
os
.
system
(
"
wget
"
+
find_sbo_dwn
)
os
.
system
(
"
wget
"
+
find_source_dwn
)
if
find_extra_dwn
==
""
:
pass
else
:
os
.
system
(
"
wget
"
+
find_extra_dwn
)
find_extra_dwn
=
find_extra_dwn
.
split
()
# convert str to list
if
len
(
find_extra_dwn
)
==
1
:
extra
=
get_file
(
find_extra_dwn
[
0
])
build_extra_pkg
(
script
,
source
,
extra
)
break
elif
len
(
find_extra_dwn
)
==
2
:
extra
=
get_file
(
find_extra_dwn
[
0
])
extra2
=
get_file
(
find_extra_dwn
[
1
])
build_extra2_pkg
(
script
,
source
,
extra
,
extra2
)
break
else
:
print
print
(
"
{}Not supported with more than four arguments{}
\n
"
.
format
(
colors
.
RED
,
colors
.
ENDC
))
break
build_package
(
script
,
source
)
break
else
:
break
...
...
man/slpkg.8
View file @
17c00f57
...
...
@@ -148,10 +148,11 @@ $ \fBslpkg -n termcolor\fP
| Extra Downloads :
| Package requirements :
+======================================================================================
README View the README file
SlackBuild View the SlackBuild file
Info View the Info file
Download Download this package
README View the README file
SlackBuild View the SlackBuild file
Info View the Info file
Download Download this package
Build Download and build this package
_
...
...
setup.py
View file @
17c00f57
...
...
@@ -7,7 +7,7 @@ from distutils.core import setup
setup
(
name
=
'
slpkg
'
,
version
=
"
1.3.
2
"
,
version
=
"
1.3.
3
"
,
description
=
"
Python tool to manage Slackware packages
"
,
keywords
=
[
"
slackware
"
,
"
slpkg
"
,
"
upgrade
"
,
"
install
"
,
"
remove
"
,
"
view
"
,
"
slackpkg
"
,
"
tool
"
],
...
...