mirror of
https://github.com/Jguer/yay
synced 2024-10-31 04:12:51 +00:00
Merge branch 'modules' of github.com:Morganamilo/yay into Morganamilo-modules
This commit is contained in:
commit
84022c9425
14 changed files with 254 additions and 78 deletions
1
.go/src
1
.go/src
|
@ -1 +0,0 @@
|
||||||
../vendor
|
|
49
Gopkg.lock
generated
49
Gopkg.lock
generated
|
@ -1,49 +0,0 @@
|
||||||
# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
|
|
||||||
|
|
||||||
|
|
||||||
[[projects]]
|
|
||||||
branch = "master"
|
|
||||||
digest = "1:4e8f84eb856dd3ed05982f065caf7866a4995be9cc3718614dcecbd57e26c260"
|
|
||||||
name = "github.com/Morganamilo/go-pacmanconf"
|
|
||||||
packages = [
|
|
||||||
".",
|
|
||||||
"ini",
|
|
||||||
]
|
|
||||||
pruneopts = "NUT"
|
|
||||||
revision = "9c5265e1b14f7e21dafabbad9ccf801d3815d707"
|
|
||||||
|
|
||||||
[[projects]]
|
|
||||||
branch = "master"
|
|
||||||
digest = "1:5f709618dc8a0ff9221d3685c95d69ed7d80ca94e58f3483f5d9bdefb4e6bb25"
|
|
||||||
name = "github.com/Morganamilo/go-srcinfo"
|
|
||||||
packages = ["."]
|
|
||||||
pruneopts = "NUT"
|
|
||||||
revision = "368edc79b2c53cd9c065818fd4e65843ef3e9e11"
|
|
||||||
|
|
||||||
[[projects]]
|
|
||||||
branch = "master"
|
|
||||||
digest = "1:6eef31522b3a2349e9399c903ffa76c084c7fb9ef9d17a4e3da420649b0f5d17"
|
|
||||||
name = "github.com/jguer/go-alpm"
|
|
||||||
packages = ["."]
|
|
||||||
pruneopts = "NUT"
|
|
||||||
revision = "643c287316a5456348cc689e1f2c980410e17d47"
|
|
||||||
|
|
||||||
[[projects]]
|
|
||||||
branch = "master"
|
|
||||||
digest = "1:07c508c49b9c13cf582c2b986635d0acd11e113e0535fa4b147026e15bc64185"
|
|
||||||
name = "github.com/mikkeloscar/aur"
|
|
||||||
packages = ["."]
|
|
||||||
pruneopts = "NUT"
|
|
||||||
revision = "f998dbf94dc47ef839c76740efeb673d3459be1f"
|
|
||||||
|
|
||||||
[solve-meta]
|
|
||||||
analyzer-name = "dep"
|
|
||||||
analyzer-version = 1
|
|
||||||
input-imports = [
|
|
||||||
"github.com/Morganamilo/go-pacmanconf",
|
|
||||||
"github.com/Morganamilo/go-srcinfo",
|
|
||||||
"github.com/jguer/go-alpm",
|
|
||||||
"github.com/mikkeloscar/aur",
|
|
||||||
]
|
|
||||||
solver-name = "gps-cdcl"
|
|
||||||
solver-version = 1
|
|
20
Gopkg.toml
20
Gopkg.toml
|
@ -1,20 +0,0 @@
|
||||||
[prune]
|
|
||||||
non-go = true
|
|
||||||
unused-packages = true
|
|
||||||
go-tests = true
|
|
||||||
|
|
||||||
[[constraint]]
|
|
||||||
branch = "master"
|
|
||||||
name = "github.com/jguer/go-alpm"
|
|
||||||
|
|
||||||
[[constraint]]
|
|
||||||
branch = "master"
|
|
||||||
name = "github.com/mikkeloscar/aur"
|
|
||||||
|
|
||||||
[[constraint]]
|
|
||||||
branch = "master"
|
|
||||||
name = "github.com/Morganamilo/go-srcinfo"
|
|
||||||
|
|
||||||
[[constraint]]
|
|
||||||
branch = "master"
|
|
||||||
name = "github.com/Morganamilo/go-pacmanconf"
|
|
6
Makefile
6
Makefile
|
@ -1,6 +1,6 @@
|
||||||
.PHONY: all default install uninstall test build release clean package
|
.PHONY: all default install uninstall test build release clean package
|
||||||
|
|
||||||
PREFIX := /usr
|
PREFIX := /usr/local
|
||||||
DESTDIR :=
|
DESTDIR :=
|
||||||
|
|
||||||
MAJORVERSION := 8
|
MAJORVERSION := 8
|
||||||
|
@ -14,8 +14,6 @@ PKGNAME := yay
|
||||||
BINNAME := yay
|
BINNAME := yay
|
||||||
PACKAGE := ${PKGNAME}_${VERSION}_${ARCH}
|
PACKAGE := ${PKGNAME}_${VERSION}_${ARCH}
|
||||||
|
|
||||||
export GOPATH=$(shell pwd)/.go
|
|
||||||
|
|
||||||
default: build
|
default: build
|
||||||
|
|
||||||
all: | clean package
|
all: | clean package
|
||||||
|
@ -41,7 +39,7 @@ test:
|
||||||
go test -v
|
go test -v
|
||||||
|
|
||||||
build:
|
build:
|
||||||
go build -v ${LDFLAGS} -o ${BINNAME}
|
go build -mod=vendor -v ${LDFLAGS} -o ${BINNAME}
|
||||||
|
|
||||||
release: | test build
|
release: | test build
|
||||||
mkdir ${PACKAGE}
|
mkdir ${PACKAGE}
|
||||||
|
|
|
@ -88,10 +88,9 @@ Following are the dependencies managed under dep:
|
||||||
Run `make` to build Yay. This command will generate a binary called `yay` in
|
Run `make` to build Yay. This command will generate a binary called `yay` in
|
||||||
the same directory as the Makefile.
|
the same directory as the Makefile.
|
||||||
|
|
||||||
Note: Yay's Makefile automatically sets the `GOPATH` to `$PWD/.go`. This path will
|
Note: Yay's Makefile sources its dependencies from `vendor/`. When
|
||||||
ensure dependencies in `vendor/` are built. Running manual go commands such as
|
building manually, dependencies will instead be sourced from `GOPATH`. To
|
||||||
`go build` will require that you either set the `GOPATH` manually or `go get`
|
build against `vendor/` you must specify `-mod=vendor` in the build command.
|
||||||
the vendored dependencies into your own `GOPATH`.
|
|
||||||
|
|
||||||
### Code Style
|
### Code Style
|
||||||
|
|
||||||
|
|
8
go.mod
Normal file
8
go.mod
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
module github.com/Jguer/yay
|
||||||
|
|
||||||
|
require (
|
||||||
|
github.com/Morganamilo/go-pacmanconf v0.0.0-20180910220353-9c5265e1b14f
|
||||||
|
github.com/Morganamilo/go-srcinfo v0.0.0-20180702014333-368edc79b2c5
|
||||||
|
github.com/jguer/go-alpm v0.0.0-20180914002751-643c287316a5
|
||||||
|
github.com/mikkeloscar/aur v0.0.0-20180725140122-f998dbf94dc4
|
||||||
|
)
|
8
go.sum
Normal file
8
go.sum
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
github.com/Morganamilo/go-pacmanconf v0.0.0-20180910220353-9c5265e1b14f h1:ptFKynTV1p8JCzqk81NcMj0DV0Xle+PdKxfHjPbdIOU=
|
||||||
|
github.com/Morganamilo/go-pacmanconf v0.0.0-20180910220353-9c5265e1b14f/go.mod h1:Hk55m330jNiwxRodIlMCvw5iEyoRUCIY64W1p9D+tHc=
|
||||||
|
github.com/Morganamilo/go-srcinfo v0.0.0-20180702014333-368edc79b2c5 h1:0mWTtDLD9MmZO8Qk21aRFfsQpGU3uS7mSLbSzDTuguY=
|
||||||
|
github.com/Morganamilo/go-srcinfo v0.0.0-20180702014333-368edc79b2c5/go.mod h1:MP6VGY1NNpVUmYIEgoM9acix95KQqIRyqQ0hCLsyYUY=
|
||||||
|
github.com/jguer/go-alpm v0.0.0-20180914002751-643c287316a5 h1:JPIXUHXLZYwYUTlGpCCRMNFt8IRAyLPUsnXYqOJ6U/w=
|
||||||
|
github.com/jguer/go-alpm v0.0.0-20180914002751-643c287316a5/go.mod h1:1F60/e8oQFVJrZRH0TBqwtiB5ajJ5avOc4MoGRY9CFU=
|
||||||
|
github.com/mikkeloscar/aur v0.0.0-20180725140122-f998dbf94dc4 h1:qgHSZbD0g3W7KAkZFzXlSqgriYnzEUFS1gkgEiv2GrE=
|
||||||
|
github.com/mikkeloscar/aur v0.0.0-20180725140122-f998dbf94dc4/go.mod h1:n1NKHoldRNhIEufSx1PiDYcd2W+wpbz5/5K+p2eNDVk=
|
14
vendor/github.com/Morganamilo/go-srcinfo/.travis.yml
generated
vendored
Normal file
14
vendor/github.com/Morganamilo/go-srcinfo/.travis.yml
generated
vendored
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
language: go
|
||||||
|
|
||||||
|
go:
|
||||||
|
- 1.8.x
|
||||||
|
- tip
|
||||||
|
|
||||||
|
before_install:
|
||||||
|
- go get -t -v ./...
|
||||||
|
|
||||||
|
script:
|
||||||
|
- go test -race -coverprofile=coverage.txt -covermode=atomic
|
||||||
|
|
||||||
|
after_success:
|
||||||
|
- bash <(curl -s https://codecov.io/bash)
|
136
vendor/github.com/Morganamilo/go-srcinfo/README.md
generated
vendored
Normal file
136
vendor/github.com/Morganamilo/go-srcinfo/README.md
generated
vendored
Normal file
|
@ -0,0 +1,136 @@
|
||||||
|
[![GPL3 license](https://img.shields.io/badge/License-GPL3-blue.svg)](LICENSE)
|
||||||
|
[![GoDoc](https://godoc.org/github.com/Morganamilo/go-srcinfo?status.svg)](https://godoc.org/github.com/Morganamilo/go-srcinfo)
|
||||||
|
[![Build Status](https://travis-ci.org/Morganamilo/go-srcinfo.svg?branch=master)](https://travis-ci.org/Morganamilo/go-srcinfo)
|
||||||
|
[![codecov](https://codecov.io/gh/Morganamilo/go-srcinfo/branch/master/graph/badge.svg)](https://codecov.io/gh/Morganamilo/go-srcinfo)
|
||||||
|
[![Go Report Card](https://goreportcard.com/badge/github.com/Morganamilo/go-srcinfo)](https://goreportcard.com/report/github.com/Morganamilo/go-srcinfo)
|
||||||
|
|
||||||
|
# go-srcinfo
|
||||||
|
|
||||||
|
A golang package for parsing `.SRCINFO` files. [SRCINFO](https://wiki.archlinux.org/index.php/.SRCINFO)
|
||||||
|
|
||||||
|
go-srcinfo aimes to be simple while ensuring each srcinfo is syntactically
|
||||||
|
correct. Split packages and architecture specific fields are fully supported.
|
||||||
|
|
||||||
|
# Examples
|
||||||
|
|
||||||
|
Reading a srcinfo from a file
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"github.com/Morganamilo/go-srcinfo"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
info, err := srcinfo.ParseFile("SRCINFO")
|
||||||
|
if err != nil {
|
||||||
|
fmt.Println(err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
fmt.Println(info)
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Reading each package from a split package
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"github.com/Morganamilo/go-srcinfo"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
info, err := srcinfo.ParseFile("SRCINFO")
|
||||||
|
if err != nil {
|
||||||
|
fmt.Println(err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, pkg := range info.SplitPackages() {
|
||||||
|
fmt.Printf("%s-%s: %s\n", pkg.Pkgname, info.Version(), pkg.Pkgdesc)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Showing the architecture of each source
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"github.com/Morganamilo/go-srcinfo"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
info, err := srcinfo.ParseFile("SRCINFO")
|
||||||
|
if err != nil {
|
||||||
|
fmt.Println(err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, source := range info.Source {
|
||||||
|
if source.Arch == "" {
|
||||||
|
fmt.Printf("This source is for %s: %s\n", "any", source.Value)
|
||||||
|
} else {
|
||||||
|
fmt.Printf("This source is for %s: %s\n", source.Arch, source.Value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Reading a srcinfo from a string
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"github.com/Morganamilo/go-srcinfo"
|
||||||
|
)
|
||||||
|
|
||||||
|
const str = `
|
||||||
|
pkgbase = gdc-bin
|
||||||
|
pkgver = 6.3.0+2.068.2
|
||||||
|
pkgrel = 1
|
||||||
|
url = https://gdcproject.org/
|
||||||
|
arch = i686
|
||||||
|
arch = x86_64
|
||||||
|
license = GPL
|
||||||
|
source_i686 = http://gdcproject.org/downloads/binaries/6.3.0/i686-linux-gnu/gdc-6.3.0+2.068.2.tar.xz
|
||||||
|
md5sums_i686 = cc8dcd66b189245e39296b1382d0dfcc
|
||||||
|
source_x86_64 = http://gdcproject.org/downloads/binaries/6.3.0/x86_64-linux-gnu/gdc-6.3.0+2.068.2.tar.xz
|
||||||
|
md5sums_x86_64 = 16d3067ebb3938dba46429a4d9f6178f
|
||||||
|
|
||||||
|
pkgname = gdc-bin
|
||||||
|
pkgdesc = Compiler for D programming language which uses gcc backend
|
||||||
|
depends = gdc-gcc
|
||||||
|
depends = perl
|
||||||
|
depends = binutils
|
||||||
|
depends = libgphobos
|
||||||
|
provides = d-compiler=2.068.2
|
||||||
|
provides = gdc=6.3.0+2.068.2
|
||||||
|
|
||||||
|
pkgname = gdc-gcc
|
||||||
|
pkgdesc = The GNU Compiler Collection - C and C++ frontends (from GDC, gdcproject.org)
|
||||||
|
provides = gcc=6.3.0
|
||||||
|
provides = gcc-libs=6.3.0
|
||||||
|
|
||||||
|
pkgname = libgphobos-lib32
|
||||||
|
pkgdesc = Standard library for D programming language, GDC port
|
||||||
|
provides = d-runtime-lib32
|
||||||
|
provides = d-stdlib-lib32
|
||||||
|
`
|
||||||
|
func main() {
|
||||||
|
info, err := srcinfo.Parse(str)
|
||||||
|
if err != nil {
|
||||||
|
fmt.Println(err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
fmt.Println(info)
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
1
vendor/github.com/jguer/go-alpm/.gitignore
generated
vendored
Normal file
1
vendor/github.com/jguer/go-alpm/.gitignore
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
_obj/
|
16
vendor/github.com/jguer/go-alpm/.travis.yml
generated
vendored
Normal file
16
vendor/github.com/jguer/go-alpm/.travis.yml
generated
vendored
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
sudo: required
|
||||||
|
notifications:
|
||||||
|
email: false
|
||||||
|
language: generic
|
||||||
|
services:
|
||||||
|
- docker
|
||||||
|
|
||||||
|
arch:
|
||||||
|
packages:
|
||||||
|
- git
|
||||||
|
- go
|
||||||
|
script:
|
||||||
|
- "./testing/test.sh"
|
||||||
|
|
||||||
|
script:
|
||||||
|
- "curl -s https://raw.githubusercontent.com/mikkeloscar/arch-travis/master/arch-travis.sh | bash"
|
34
vendor/github.com/jguer/go-alpm/README.md
generated
vendored
Normal file
34
vendor/github.com/jguer/go-alpm/README.md
generated
vendored
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
## go-alpm
|
||||||
|
|
||||||
|
go-alpm is a Go package for binding libalpm. With go-alpm, it becomes possible
|
||||||
|
to manipulate the Pacman databases and packages just as Pacman would.
|
||||||
|
|
||||||
|
This project is MIT Licensed. See LICENSE for details.
|
||||||
|
|
||||||
|
## Getting started
|
||||||
|
|
||||||
|
1. Import the go-alpm repository in your go script
|
||||||
|
|
||||||
|
import "github.com/jguer/go-alpm"
|
||||||
|
|
||||||
|
2. Copy the library to your GOPATH
|
||||||
|
|
||||||
|
mkdir ~/go
|
||||||
|
export GOPATH=~/go
|
||||||
|
go get github.com/jguer/go-alpm
|
||||||
|
|
||||||
|
3. Try the included examples
|
||||||
|
|
||||||
|
cd $GOPATH/src/github.com/jguer/go-alpm/examples
|
||||||
|
go run installed.go
|
||||||
|
|
||||||
|
## Current Maintainers
|
||||||
|
* Morganamilo
|
||||||
|
* Jguer
|
||||||
|
|
||||||
|
## Original Contributors
|
||||||
|
|
||||||
|
* Mike Rosset
|
||||||
|
* Dave Reisner
|
||||||
|
* Rémy Oudompheng
|
||||||
|
* Jesus Alvarez
|
23
vendor/github.com/mikkeloscar/aur/README.md
generated
vendored
Normal file
23
vendor/github.com/mikkeloscar/aur/README.md
generated
vendored
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
[![GoDoc](https://godoc.org/github.com/mikkeloscar/aur?status.svg)](https://godoc.org/github.com/mikkeloscar/aur)
|
||||||
|
|
||||||
|
# go wrapper for the AUR JSON API
|
||||||
|
|
||||||
|
Wrapper around the json API v5 for AUR found at
|
||||||
|
http://aur.archlinux.org/rpc.php
|
||||||
|
|
||||||
|
## LICENSE
|
||||||
|
|
||||||
|
Copyright (C) 2016 Mikkel Oscar Lyderik Larsen
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
9
vendor/modules.txt
vendored
Normal file
9
vendor/modules.txt
vendored
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
# github.com/Morganamilo/go-pacmanconf v0.0.0-20180910220353-9c5265e1b14f
|
||||||
|
github.com/Morganamilo/go-pacmanconf
|
||||||
|
github.com/Morganamilo/go-pacmanconf/ini
|
||||||
|
# github.com/Morganamilo/go-srcinfo v0.0.0-20180702014333-368edc79b2c5
|
||||||
|
github.com/Morganamilo/go-srcinfo
|
||||||
|
# github.com/jguer/go-alpm v0.0.0-20180914002751-643c287316a5
|
||||||
|
github.com/jguer/go-alpm
|
||||||
|
# github.com/mikkeloscar/aur v0.0.0-20180725140122-f998dbf94dc4
|
||||||
|
github.com/mikkeloscar/aur
|
Loading…
Reference in a new issue