Added go
This commit is contained in:
parent
f772cfd434
commit
8d8cf195bd
3 changed files with 77 additions and 0 deletions
22
pkgs/glow/build.sh
Normal file
22
pkgs/glow/build.sh
Normal file
|
@ -0,0 +1,22 @@
|
|||
pkgname=glow
|
||||
pkgver=1.3.0
|
||||
|
||||
fetch() {
|
||||
curl -L "https://github.com/charmbracelet/glow/archive/v$pkgver.tar.gz" -o $pkgname-$pkgver.tar.xz
|
||||
tar -xf $pkgname-$pkgver.tar.xz
|
||||
}
|
||||
|
||||
build() {
|
||||
cd $pkgname-$pkgver
|
||||
go build -o build/
|
||||
}
|
||||
|
||||
package() {
|
||||
cd $pkgname-$pkgver
|
||||
install -Dm755 build/$pkgname $pkgdir/usr/bin/$pkgname
|
||||
}
|
||||
|
||||
license() {
|
||||
cd $pkgname-$pkgver
|
||||
cat LICENSE
|
||||
}
|
32
pkgs/go/build.sh
Normal file
32
pkgs/go/build.sh
Normal file
|
@ -0,0 +1,32 @@
|
|||
pkgname=go
|
||||
pkgver=1.16
|
||||
|
||||
# TODO(Ella): should be loaded from `/etc/iglupkg.d/go.conf`
|
||||
GOROOT_BOOTSTRAP=/usr/lib/go
|
||||
|
||||
fetch() {
|
||||
curl -L "https://golang.org/dl/go${pkgver/_/}.src.tar.gz" -o $pkgname-$pkgver.tar.xz
|
||||
tar -xf $pkgname-$pkgver.tar.xz
|
||||
mv go go-$pkgver
|
||||
}
|
||||
|
||||
build() {
|
||||
cd $pkgname-$pkgver
|
||||
cd src
|
||||
GOROOT_BOOTSTRAP=/usr/lib/go ./make.bash
|
||||
}
|
||||
|
||||
package() {
|
||||
cd $pkgname-$pkgver
|
||||
install -d $pkgdir/usr/bin
|
||||
install -d $pkgdir/usr/lib/go
|
||||
cp -a bin pkg src lib misc api test $pkgdir/usr/lib/go
|
||||
|
||||
ln -sr $pkgdir/usr/lib/go/bin/go $pkgdir/usr/bin/go
|
||||
ln -sr $pkgdir/usr/lib/go/bin/gofmt $pkgdir/usr/bin/gofmt
|
||||
}
|
||||
|
||||
license() {
|
||||
cd $pkgname-$pkgver
|
||||
cat LICENSE
|
||||
}
|
23
templates/go.build.sh
Normal file
23
templates/go.build.sh
Normal file
|
@ -0,0 +1,23 @@
|
|||
pkgname=
|
||||
pkgver=
|
||||
|
||||
fetch() {
|
||||
curl "" -o $pkgname-$pkgver.tar.xz
|
||||
tar -xf $pkgname-$pkgver.tar.xz
|
||||
}
|
||||
|
||||
build() {
|
||||
cd $pkgname-$pkgver
|
||||
go build -o build
|
||||
}
|
||||
|
||||
package() {
|
||||
cd $pkgname-$pkgver
|
||||
install -Dm755 build/$pkgname $pkgdir/usr/bin/$pkgname
|
||||
}
|
||||
|
||||
license() {
|
||||
cd $pkgname-$pkgver
|
||||
cat LICENSE
|
||||
# cat COPYING
|
||||
}
|
Loading…
Reference in a new issue