mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-18 10:26:29 +01:00
Added using sbosrcarch as secondary repository for source files #82
This commit is contained in:
parent
993dc9f819
commit
50cd8d5c80
3 changed files with 24 additions and 4 deletions
|
@ -29,7 +29,11 @@ RELEASE=stable
|
||||||
# Build directory for repository "sbo" slackbuilds.org. In this
|
# Build directory for repository "sbo" slackbuilds.org. In this
|
||||||
# directory downloaded sources and scripts for building.
|
# directory downloaded sources and scripts for building.
|
||||||
BUILD_PATH=/tmp/slpkg/build/
|
BUILD_PATH=/tmp/slpkg/build/
|
||||||
#
|
|
||||||
|
# Alternative source downloads for the "sbo" repository. Default is "off".
|
||||||
|
SBOSRCARCH=off
|
||||||
|
SBOSRCARCH_LINK=http://slackware.uk/sbosrcarch/by-name/
|
||||||
|
|
||||||
# Download directory for others repositories that use binaries files
|
# Download directory for others repositories that use binaries files
|
||||||
# for installation.
|
# for installation.
|
||||||
PACKAGES=/tmp/slpkg/packages/
|
PACKAGES=/tmp/slpkg/packages/
|
||||||
|
@ -38,7 +42,7 @@ PACKAGES=/tmp/slpkg/packages/
|
||||||
PATCHES=/tmp/slpkg/patches/
|
PATCHES=/tmp/slpkg/patches/
|
||||||
|
|
||||||
# If CHECKMD5 is "on" the system will check all downloaded
|
# If CHECKMD5 is "on" the system will check all downloaded
|
||||||
# sources and Slackware packages. Default in "on".
|
# sources and Slackware packages. Default is "on".
|
||||||
CHECKMD5=on
|
CHECKMD5=on
|
||||||
|
|
||||||
# Delete all downloaded files if DEL_ALL is "on". Default is "on".
|
# Delete all downloaded files if DEL_ALL is "on". Default is "on".
|
||||||
|
@ -116,6 +120,5 @@ EDITOR=nano
|
||||||
|
|
||||||
# If you don't want slpkg downgrade packages, setting this variable to "on".
|
# If you don't want slpkg downgrade packages, setting this variable to "on".
|
||||||
# Warning: Possible failure building packages or running applications after
|
# Warning: Possible failure building packages or running applications after
|
||||||
# install.
|
# install. Default is "off".
|
||||||
# Default is "off".
|
|
||||||
NOT_DOWNGRADE=off
|
NOT_DOWNGRADE=off
|
||||||
|
|
|
@ -103,6 +103,8 @@ class MetaData(object):
|
||||||
"salix", "slackl", "rested", "msb{1.16}",
|
"salix", "slackl", "rested", "msb{1.16}",
|
||||||
"csb", "connos", "mles{desktop}"],
|
"csb", "connos", "mles{desktop}"],
|
||||||
"BUILD_PATH": "/tmp/slpkg/build/",
|
"BUILD_PATH": "/tmp/slpkg/build/",
|
||||||
|
"SBOSRCARCH": "off",
|
||||||
|
"SBOSRCARCH_LINK": "http://slackware.uk/sbosrcarch/by-name/",
|
||||||
"PACKAGES": "/tmp/slpkg/packages/",
|
"PACKAGES": "/tmp/slpkg/packages/",
|
||||||
"PATCHES": "/tmp/slpkg/patches/",
|
"PATCHES": "/tmp/slpkg/patches/",
|
||||||
"CHECKMD5": "on",
|
"CHECKMD5": "on",
|
||||||
|
@ -147,6 +149,8 @@ class MetaData(object):
|
||||||
# Set values from configuration file
|
# Set values from configuration file
|
||||||
slack_rel = _conf_slpkg["RELEASE"]
|
slack_rel = _conf_slpkg["RELEASE"]
|
||||||
build_path = _conf_slpkg["BUILD_PATH"]
|
build_path = _conf_slpkg["BUILD_PATH"]
|
||||||
|
sbosrcarch = _conf_slpkg["SBOSRCARCH"]
|
||||||
|
sbosrcarch_link = _conf_slpkg["SBOSRCARCH_LINK"]
|
||||||
slpkg_tmp_packages = _conf_slpkg["PACKAGES"]
|
slpkg_tmp_packages = _conf_slpkg["PACKAGES"]
|
||||||
slpkg_tmp_patches = _conf_slpkg["PATCHES"]
|
slpkg_tmp_patches = _conf_slpkg["PATCHES"]
|
||||||
checkmd5 = _conf_slpkg["CHECKMD5"]
|
checkmd5 = _conf_slpkg["CHECKMD5"]
|
||||||
|
|
|
@ -337,6 +337,8 @@ class SBoInstall(object):
|
||||||
sbo_url = sbo_search_pkg(pkg)
|
sbo_url = sbo_search_pkg(pkg)
|
||||||
sbo_link = SBoLink(sbo_url).tar_gz()
|
sbo_link = SBoLink(sbo_url).tar_gz()
|
||||||
script = sbo_link.split("/")[-1]
|
script = sbo_link.split("/")[-1]
|
||||||
|
if self.meta.sbosrcarch in ["on", "ON"]:
|
||||||
|
src_link = self.sbosrcarsh(prgnam, sbo_link, src_link)
|
||||||
Download(self.build_folder, sbo_link.split(),
|
Download(self.build_folder, sbo_link.split(),
|
||||||
repo="sbo").start()
|
repo="sbo").start()
|
||||||
Download(self._SOURCES, src_link, repo="sbo").start()
|
Download(self._SOURCES, src_link, repo="sbo").start()
|
||||||
|
@ -378,3 +380,14 @@ class SBoInstall(object):
|
||||||
"setting by user".format(name))
|
"setting by user".format(name))
|
||||||
self.msg.template(78)
|
self.msg.template(78)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
def sbosrcarsh(self, prgnam, sbo_link, src_link):
|
||||||
|
"""Alternative repository for sbo sources"""
|
||||||
|
sources = []
|
||||||
|
name = "-".join(prgnam.split("-")[:-1])
|
||||||
|
category = "{0}/{1}/".format(sbo_link.split("/")[-2], name)
|
||||||
|
for link in src_link:
|
||||||
|
source = link.split("/")[-1]
|
||||||
|
sources.append("{0}{1}{2}".format(self.meta.sbosrcarch_link,
|
||||||
|
category, source))
|
||||||
|
return sources
|
||||||
|
|
Loading…
Reference in a new issue