blob: 81392d942eb3213ca7135fdeb0e0e9099f146c28 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
# Maintainer: Enmanuel Moreira <enmanuelmoreira@gmail.com>
pkgname=dojo
pkgver=$PKGVER
pkgrel=1
pkgdesc="A tool to keep environment as code. Dojo helps to compile code and run other operations in Docker containers. Containerize your development and operations environment."
arch=('x86_64')
url="https://github.com/kudulab/dojo"
depends=('bash'
'docker'
'docker-compose'
)
conflicts=('dojo-bin')
provides=('dojo')
license=('Apache-2')
makedepends=('go>=1.17' 'git' 'gzip' 'tar' 'gcc')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/kudulab/${pkgname}/archive/${pkgver}.tar.gz")
sha256sums=('40c0a96dcb54bd47ab4ab39a84ff0830bea704a50893b3fa683215a4daf2c93f')
build() {
cd "${pkgname}-${pkgver}"
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}"
export GOFLAGS="-buildmode=pie -buildvcs=false -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
BUILD_DATE=$(date '+%Y-%m-%d %H:%M:%S')
go build -o build/${pkgname} -ldflags="-X 'main.VERSION=${pkgver}' -X 'main.buildDate=${BUILD_DATE}'"
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
install -Dm755 build/${pkgname} ${pkgdir}/usr/bin/${pkgname}
install -D -m 644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
|