summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.go7
-rw-r--r--config.yml2
-rw-r--r--deb822/package.go3
-rw-r--r--template.go8
4 files changed, 13 insertions, 7 deletions
diff --git a/config.go b/config.go
index 72a5665..33c4e9f 100644
--- a/config.go
+++ b/config.go
@@ -17,9 +17,10 @@ type SuiteCfg struct {
}
type ReleaseCfg struct {
- Release string `yaml:"Release"`
- RepoURL string `yaml:"RepoURL"`
- Suites []SuiteCfg `yaml:"Suites"`
+ Release string `yaml:"Release"`
+ RepoURL string `yaml:"RepoURL"`
+ ReleaseIndex string `yaml:"ReleaseIndex"`
+ Suites []SuiteCfg `yaml:"Suites"`
}
type PkgwebCfg struct {
diff --git a/config.yml b/config.yml
index 127ec8d..6802e2f 100644
--- a/config.yml
+++ b/config.yml
@@ -4,6 +4,7 @@ PkgSets:
{
Release: "ascii",
RepoURL: "http://pkgmaster.devuan.org",
+ ReleaseIndex: "index_ascii.txt",
Suites:
[
{ Name: "ascii",
@@ -19,6 +20,7 @@ PkgSets:
{
Release: "experimental",
RepoURL: "http://pkgmaster.devuan.org",
+ ReleaseIndex: "index_experimental.txt",
Suites:
[
{
diff --git a/deb822/package.go b/deb822/package.go
index 525f112..f7352a7 100644
--- a/deb822/package.go
+++ b/deb822/package.go
@@ -24,6 +24,7 @@ type Package struct {
Component string
Section string
Priority string
+ Origin string
}
var regexpRemove = regexp.MustCompile("(DEVUAN/|DEBIAN/|[0-9]+:)")
@@ -61,6 +62,8 @@ func NewPackage(s Stanza) (Package, error) {
}
p.Section = s["Section"]
p.Priority = s["Priority"]
+ p.Origin = strings.Title(strings.ToLower(strings.Split(s["Filename"], "/")[1]))
+ fmt.Printf("p.Origin: %s\n", p.Origin)
return p, nil
}
diff --git a/template.go b/template.go
index 85a93f8..5e30f06 100644
--- a/template.go
+++ b/template.go
@@ -70,9 +70,9 @@ div.provides{
Search Devuan Packages for: <input type="text" name="search"/> in release
<select name="release">
<option value="jessie" selected>Jessie 1.0.0</option>
-<option value="ascii" >Ascii</option>
-<option value="ceres" >Ceres (unstable) 1.0.0</option>
-<option value="experimental" >Experimental 1.0.0</option>
+<option value="ascii" >Ascii 2.0.0</option>
+<option value="ceres" >Ceres (unstable)</option>
+<option value="experimental" >Experimental</option>
<option value="any" >Any</option>
</select>
<input type="submit" value="Go!"/>
@@ -80,7 +80,7 @@ Search Devuan Packages for: <input type="text" name="search"/> in release
</div>
<div class="pkgname">{{.Name}} {{.Version}} [{{.Section}} - {{.Priority}}]</div>
-<div class="pkg_suite">[{{.Suite}} - {{.Component}}]</div>
+<div class="pkg_suite">[Origin: {{.Origin}} - {{.Suite}} - {{.Component}}]</div>
<div class="description">
{{.Description}}
</div>