diff --git a/trunk/PKGBUILD b/trunk/PKGBUILD index aee8a1d..96b795e 100644 --- a/trunk/PKGBUILD +++ b/trunk/PKGBUILD @@ -5,7 +5,7 @@ pkgname=hugo pkgver=0.48 -pkgrel=1 +pkgrel=2 pkgdesc="Fast and Flexible Static Site Generator in Go" arch=('x86_64') url="https://gohugo.io/" @@ -13,27 +13,21 @@ license=('Apache') depends=('glibc') makedepends=('go-pie' 'git') optdepends=('pygmentize: syntax-highlight code snippets') -source=(${pkgname}-${pkgver}.tar.gz::https://github.com/gohugoio/${pkgname}/archive/v${pkgver}.tar.gz) -sha256sums=('0fa6bf285fc586fccacbf782017a5c0c9d164f6bf0670b12dd21526b32328cb2') +source=(${pkgname}-${pkgver}.tar.gz::https://github.com/gohugoio/${pkgname}/archive/v${pkgver}.tar.gz mage-version.patch) +sha256sums=('0fa6bf285fc586fccacbf782017a5c0c9d164f6bf0670b12dd21526b32328cb2' 'a27b6bf8b1031dfae141769a1e6a48d8906227cbeba3648db9b0e99867a06dce') prepare() { cd "${srcdir}"/${pkgname}-${pkgver} - export GOPATH="${srcdir}" - export PATH="${PATH}:${srcdir}/bin" - install -d "${GOPATH}/src/github.com/gohugoio" - cp -a "$(pwd)" "${GOPATH}/src/github.com/gohugoio/hugo" + patch -Np1 -i "${srcdir}/mage-version.patch" } build() { - cd "${GOPATH}/src/github.com/gohugoio/hugo" - go get -u github.com/golang/dep/cmd/dep - dep ensure - go get github.com/magefile/mage - HUGO_BUILD_TAGS=extended mage hugo + cd "${srcdir}/${pkgname}-${pkgver}" + go build -tags extended } package() { - cd "${GOPATH}/src/github.com/gohugoio/hugo" + cd "${srcdir}/${pkgname}-${pkgver}" install -Dm755 "${pkgname}" "${pkgdir}/usr/bin/${pkgname}" install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" } diff --git a/trunk/mage-version.patch b/trunk/mage-version.patch new file mode 100644 index 0000000..4da0c4e --- /dev/null +++ b/trunk/mage-version.patch @@ -0,0 +1,12 @@ +diff -ura hugo-0.48/go.mod hugo-0.48.new/go.mod +--- hugo-0.48/go.mod 2018-08-29 00:33:03.000000000 -0600 ++++ hugo-0.48.new/go.mod 2018-09-22 01:13:24.201291020 -0600 +@@ -30,7 +30,7 @@ + github.com/inconshreveable/mousetrap v1.0.0 // indirect + github.com/jdkato/prose v1.1.0 + github.com/kyokomi/emoji v1.5.1 +- github.com/magefile/mage v2.2.0+incompatible ++ github.com/magefile/mage v1.4.0 + github.com/magiconair/properties v1.8.0 // indirect + github.com/markbates/inflect v0.0.0-20171215194931-a12c3aec81a6 + github.com/mattn/go-isatty v0.0.3 // indirect