Compare commits

...

9 Commits

Author SHA1 Message Date
Darshil Chanpura b708d779f9 Added new repository 1 year ago
Darshil Chanpura cbdd33270c changed image for compatibility 1 year ago
Darshil Chanpura 4efcbba6fe Added base devel 1 year ago
Darshil Chanpura b6c836ff3d Added new directory and ownerships 1 year ago
Darshil Chanpura 5c46212bf0 Added sudo 1 year ago
Darshil Chanpura 5e6c5ecf96 Added script instead of direct command 1 year ago
Darshil Chanpura a5a919dce1 Fix: os and arch added 1 year ago
Darshil Chanpura f3f14db36f Added drone.yml to try out the build 1 year ago
Darshil Chanpura c305d42dc6 Added PKGBUILD 1 year ago
  1. 26
      .drone.yml
  2. 30
      PKGBUILD
  3. 17
      build.sh

@ -0,0 +1,26 @@
kind: pipeline
platform:
os: linux
arch: amd64
type: docker
name: linux/amd64
steps:
- name: build package
image: archlinux:latest
commands:
- ./build.sh
---
kind: pipeline
platform:
os: linux
arch: arm64
type: docker
name: linux/arm64
steps:
- name: build package
image: ghcr.io/dtchanpura/archlinux:latest
commands:
- ./build.sh

@ -0,0 +1,30 @@
pkgname=dumb-http
pkgver=2.0.0
pkgrel=1
pkgdesc="Dumb HTTP"
arch=('x86_64' 'arm64')
url='https://git.dcpri.me/some-fancy-tools/dumb-http'
license=('MIT')
makedepends=('go')
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
sha256sums=('246d7818b7078929573749f3cd08c7f3f1c74c07efa0d63a9910526050df246c')
build() {
cd "$pkgname"
go build \
-trimpath \
-ldflags "-s -w -X main.version=v$pkgver -extldflags \"$LDFLAGS\"" \
-o . ./...
}
check() {
cd "$pkgname"
go test ./...
}
package() {
cd "$pkgname"
install -Dm755 -t "$pkgdir/usr/bin/" dumb-http dumb-http-s3
install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE
}

@ -0,0 +1,17 @@
#!/bin/bash
pacman -Sy --noconfirm sudo base-devel
useradd -s /bin/bash -m builder
echo "builder ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/builder
sudo -u builder mkdir /home/builder/.gnupg
sudo -u builder touch /home/builder/.gnupg/gpg.conf
sudo -u builder echo "keyserver-options auto-key-retrieve" > /home/builder/.gnupg/gpg.conf
mkdir /tmp/pkg
cp -aR . /tmp/pkg
chown -R builder:builder /tmp/pkg
cd /tmp/pkg
sudo -u builder makepkg -cfs --noconfirm
Loading…
Cancel
Save