summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2014-01-24 10:18:38 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2014-01-24 10:18:38 +0000
commit0818187fcf1c9edfc43244b3acbde74d0d2b6dba (patch)
tree5831a189645b51d7a59e0b581b447bbc02e2b182
parentc5bfe9e34c44d347d57b201de37f8d0caad5383c (diff)
downloadlua-aports-0818187fcf1c9edfc43244b3acbde74d0d2b6dba.tar.bz2
lua-aports-0818187fcf1c9edfc43244b3acbde74d0d2b6dba.tar.xz
db: add linguas subpackages
squid is the only package using it
-rw-r--r--aports/db.lua13
1 files changed, 9 insertions, 4 deletions
diff --git a/aports/db.lua b/aports/db.lua
index e625b4a..43e646b 100644
--- a/aports/db.lua
+++ b/aports/db.lua
@@ -3,7 +3,7 @@ local M = {}
local abuild = require('aports.abuild')
local pkg = require('aports.pkg')
-local function split_subpkgs(str)
+local function split_subpkgs(str, linguas, pkgname)
local t = {}
local e
if (str == nil) then
@@ -12,6 +12,9 @@ local function split_subpkgs(str)
for e in string.gmatch(str, "%S+") do
t[#t + 1] = string.gsub(e, ":.*", "")
end
+ for k,v in pairs(linguas) do
+ t[#t + 1] = ("%s-lang-%s"):format(pkgname, v)
+ end
return t
end
@@ -37,14 +40,15 @@ end
local function split_apkbuild(line)
local r = {}
- local dir,pkgname, pkgver, pkgrel, arch, depends, makedepends, subpackages, source, url = string.match(line, "([^|]*)|([^|]*)|([^|]*)|([^|]*)|([^|]*)|([^|]*)|([^|]*)|([^|]*)|([^|]*)|([^|]*)")
+ local dir,pkgname, pkgver, pkgrel, arch, depends, makedepends, subpackages, linguas, source, url = string.match(line, "([^|]*)|([^|]*)|([^|]*)|([^|]*)|([^|]*)|([^|]*)|([^|]*)|([^|]*)|([^|]*)|([^|]*)")
r.dir = dir
r.pkgname = pkgname
r.pkgver = pkgver
r.pkgrel = pkgrel
r.depends = split(depends)
r.makedepends = split(makedepends)
- r.subpackages = split_subpkgs(subpackages)
+ r.linguas = split(linguas)
+ r.subpackages = split_subpkgs(subpackages, r.linguas, pkgname)
r.source = split(source)
r.url = url
r.arch = split_arch(arch)
@@ -72,13 +76,14 @@ local function parse_apkbuilds(aportsdir, repos)
depends=
makedepends=
subpackages=
+ linguas=
source=
url=
dir="${i%/APKBUILD}";
[ -n "$dir" ] || exit 1;
cd "$dir";
. ./APKBUILD;
- echo $dir\|$pkgname\|$pkgver\|$pkgrel\|$arch\|$depends\|$makedepends\|$subpackages\|$source\|$url ;
+ echo $dir\|$pkgname\|$pkgver\|$pkgrel\|$arch\|$depends\|$makedepends\|$subpackages\|$linguas\|$source\|$url ;
done;
]])
return function()