Package Details: pup-git 1:0.4.0.r11.g5a57cf1-1

Git Clone URL: https://aur.archlinux.org/pup-git.git (read-only, click to copy)
Package Base: pup-git
Description: Parsing HTML at the command line
Upstream URL: https://github.com/EricChiang/pup
Licenses: MIT
Conflicts: pup
Provides: pup
Submitter: awh
Maintainer: seiuneko
Last Packager: seiuneko
Votes: 18
Popularity: 0.000128
First Submitted: 2014-09-13 19:26 (UTC)
Last Updated: 2024-03-22 09:00 (UTC)

Dependencies (2)

Required by (6)

Sources (1)

Latest Comments

1 2 Next › Last »

gesh commented on 2020-12-20 15:25 (UTC) (edited on 2020-12-20 15:27 (UTC) by gesh)

pup has been tagging their releases for six years now. recommend versioning by

pkgver() {
  cd "$_gitname"
  git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

gesh commented on 2019-10-10 12:36 (UTC)

Just noticed two patches ago the -p flag was removed from the install -Dm755 "$srcdir/$_gitname/$_gitname" "$pkgdir/usr/bin/$_gitname" line. Is this an error, or has it been checked as being unnecessary?

vicentereyes commented on 2019-10-05 13:47 (UTC) (edited on 2019-10-05 13:48 (UTC) by vicentereyes)

Doesn't work since pup switched to go modules. Fortunately this simplifies the PKGBUILD a lot. This works now:

# Maintainer: awh

pkgname=pup-git
_pkgbase="pup"
pkgver=r102.681d7bb
pkgrel=1
epoch=1
pkgdesc="Parsing HTML at the command line"
arch=('i686' 'x86_64')
url="https://github.com/EricChiang/pup"
license=('MIT')
provides=('pup')
conflicts=('pup')
makedepends=('git' 'go')
source=('git://github.com/EricChiang/pup.git')
md5sums=('SKIP')

pkgver() {
  cd "$_pkgbase"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
    cd "$_pkgbase"
      go build \
        -trimpath \
        -ldflags "-extldflags $LDFLAGS" \
        -o "$_pkgbase" .
}

package() {
    cd "$_pkgbase"
    install -Dm755 "$_pkgbase" "$pkgdir"/usr/bin/"$_pkgbase"

    # Package license (if available)
    for f in LICENSE COPYING LICENSE.* COPYING.*; do
        if [ -e "$f" ]; then
            install -Dm644 "$f" \
                "$pkgdir/usr/share/licenses/$pkgname/$f"
        fi
    done
}

gesh commented on 2019-05-08 18:57 (UTC)

To avoid warnings of "references to $srcdir found", please follow https://wiki.archlinux.org/index.php/Go_package_guidelines#Flags_and_build_options and add the line export GOFLAGS=(-gcflags=all=-trimpath=${PWD} -asmflags=all=-trimpath=${PWD} -ldflags=-extldflags=-zrelro -ldflags=-extldflags=-znow) go get ... "${GOFLAGS[@]}" ... to the PKGBUILD

erkexzcx commented on 2019-05-08 15:11 (UTC)

Hi. Change architecture to 'any'. It also works on ARM, so should work on any architecture.

awh commented on 2018-05-22 23:36 (UTC)

updated

coderobe commented on 2018-05-11 17:17 (UTC)

The license is MIT, not GPL2.

<deleted-account> commented on 2017-01-29 03:56 (UTC)

I was able to build without mercurial.

awh commented on 2016-03-19 03:48 (UTC)

Pushed fix now. Thanks for letting me know.

matoro commented on 2016-03-18 22:47 (UTC)

PKGBUILD check() issue can be fixed by replacing GOPATH="$GOPATH:$srcdir" with GOPATH="$GOPATH${GOPATH+:}$srcdir" as per https://aur.archlinux.org/packages/the_platinum_searcher/