license and PKGBUILD
This commit is contained in:
parent
3f60a54cc9
commit
66e4857219
16
.SRCINFO
Normal file
16
.SRCINFO
Normal file
@ -0,0 +1,16 @@
|
||||
pkgbase = gogofetch-git
|
||||
pkgdesc = fetch made with C++ rewritten to go for no reason
|
||||
pkgver = r14.ff1fcf9
|
||||
pkgrel = 1
|
||||
url = git+https://codeberg.org/nekohepott/goGoFetch.git
|
||||
arch = x86_64
|
||||
license = MIT
|
||||
makedepends = git
|
||||
makedepends = go
|
||||
depends = glibc
|
||||
provides = gogofetch
|
||||
conflicts = gogofetch
|
||||
source = git+https://codeberg.org/nekohepott/goGoFetch.git
|
||||
sha256sums = SKIP
|
||||
|
||||
pkgname = gogofetch-git
|
||||
4
.gitignore
vendored
4
.gitignore
vendored
@ -2,3 +2,7 @@
|
||||
/main
|
||||
result/
|
||||
*result*
|
||||
./src
|
||||
./pkg
|
||||
./goGoFetch
|
||||
/gogofetch-git-r14.ff1fcf9-1-x86_64.pkg.tar.zst
|
||||
21
LICENSE
Normal file
21
LICENSE
Normal file
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2026 nekohepott
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
42
PKGBUILD
Normal file
42
PKGBUILD
Normal file
@ -0,0 +1,42 @@
|
||||
# This is an example PKGBUILD file. Use this as a start to creating your own,
|
||||
# and remove these comments. For more information, see 'man PKGBUILD'.
|
||||
# NOTE: Please fill out the license field for your package! If it is unknown,
|
||||
# then please put 'unknown'.
|
||||
|
||||
# Maintainer: Mykhailo Aleksieiev <nekohepott@larpdhq.org>
|
||||
pkgname=gogofetch-git
|
||||
pkgver=r14.ff1fcf9
|
||||
pkgrel=1
|
||||
pkgdesc="fetch made with C++ rewritten to go for no reason"
|
||||
arch=('x86_64')
|
||||
url="git+https://codeberg.org/nekohepott/goGoFetch.git"
|
||||
license=('MIT')
|
||||
depends=('glibc')
|
||||
makedepends=('git' 'go')
|
||||
checkdepends=()
|
||||
optdepends=()
|
||||
provides=("${pkgname%-git}")
|
||||
conflicts=("${pkgname%-git}")
|
||||
source=("git+https://codeberg.org/nekohepott/goGoFetch.git")
|
||||
sha256sums=('SKIP')
|
||||
|
||||
pkgver() {
|
||||
cd "goGoFetch"
|
||||
# Считает общее количество коммитов и добавляет хеш последнего
|
||||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
|
||||
}
|
||||
|
||||
prepare() {
|
||||
cd "goGoFetch"
|
||||
git describe --long --tags | sed 's/\([^-]*-\)g/r\1/;s/-/./g'
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "goGoFetch"
|
||||
go build -o "$pkgname" .
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "goGoFetch"
|
||||
install -Dm755 "$pkgname" "$pkgdir/usr/bin/$pkgname"
|
||||
}
|
||||
6
main.go
6
main.go
@ -224,17 +224,17 @@ func getAscii() string {
|
||||
var ascii string
|
||||
if strings.HasPrefix(dist, "Arch") {
|
||||
content := " _ _ _\n /\\ | | | | (_)\n / \\ _ __ ___| |__ | | _ _ __ _ ___ __\n / /\\ \\ | '__/ __| '_ \\ | | | | '_ \\| | | \\ \\/ /\n / ____ \\| | | (__| | | | | |____| | | | | |_| |> <\n /_/ \\_\\_| \\___|_| |_| |______|_|_| |_|\\__,_/_/\\_\\\n"
|
||||
ascii = fmt.Sprintf(string(content))
|
||||
ascii = fmt.Sprintf(content)
|
||||
return ascii
|
||||
}
|
||||
if strings.HasPrefix(dist, "Debian") {
|
||||
content := " _____ _ _\n | __ \\ | | (_)\n | | | | ___ | |__ _ __ _ _ __\n | | | | / _ \\ | '_ \\ | | / _` | | '_ \\\n | |__| | | __/ | |_) | | | | (_| | | | | |\n |_____/ \\___| |_.__/ |_| \\__,_| |_| |_|\n"
|
||||
ascii = fmt.Sprintf(string(content))
|
||||
ascii = fmt.Sprintf(content)
|
||||
return ascii
|
||||
}
|
||||
if strings.HasPrefix(dist, "NixOS") {
|
||||
content := " _ _ _ ____ _____\n | \\ | (_) / __ \\ / ____|\n | \\| |___ _| | | | (___\n | . ` | \\ \\/ / | | |\\___ \\\n | |\\ | |> <| |__| |____) |\n |_| \\_|_/_/\\_\\\\____/|_____/\n"
|
||||
ascii = fmt.Sprintf(string(content))
|
||||
ascii = fmt.Sprintf(content)
|
||||
return ascii
|
||||
}
|
||||
return "unknown"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user