diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 78 |
1 files changed, 20 insertions, 58 deletions
@@ -4,69 +4,31 @@ set -u pkgname='pkgbuild-introspection' -pkgver='10' +pkgver='9' pkgrel='1' -pkgdesc='generate .SRCINFO files (mksrcinfo)' +pkgdesc='Tool for generating .SRCINFO files (mksrcinfo)' arch=('any') -#url='https://github.com/falconindy/pkgbuild-introspection' -url='https://www.archlinux.org/pacman/' -license=('GPL') -depends=('bash' 'pacman>=5.0.0') -options=('!strip') - -# Note that we do not put the mksrcinfo header on, and we won't either! +url="https://github.com/falconindy/${pkgname}" +license=('MIT') +depends=('bash' 'pacman') +#makedepends=('git') +#provides=('pkgbuild-introspection') +#conflicts=('pkgbuild-introspection-git') +source=("pbi-${pkgver}.tgz::https://github.com/falconindy/${pkgname}/archive/${pkgver}.tar.gz") +md5sums=('a12d3c05702a6407fa050b3d74d0c7d3') +sha256sums=('c35676b2828369cb4c1c84ba6b4f7c77334452455619591a405c80aaae0321b8') + +build() { + set -u + cd -- "${srcdir?}/${pkgname}-${pkgver}" + make + set +u +} package() { set -u - install -Dm755 <(cat << EOF -#!/usr/bin/bash - -set -e -set -u -umask 022 - -_help='pacman-mksrcinfo - -mksrcinfo reads the target PKGBUILD and writes an equivalent .SRCINFO. -Without passing any arguments, mksrcinfo will read from \$PWD/PKGBUILD -and write to \$PWD/.SRCINFO. - -Usage: mksrcinfo [/path/to/pkgbuild] - -h display this help message and exit - -o <file> write output to <file> -' - -_opt_PKGBUILD='PKGBUILD' -_opt_o='.SRCINFO' - -while getopts 'ho:' opt; do - case "\${opt}" in - 'h') printf '%s' "\${_help}" ;; - '?') printf '%s' "\${_help}" ;; - 'o') _opt_o="\${OPTARG}";; - esac -done -unset opt OPTARG -shift "\$((OPTIND -1))" - -if [ "\${#@}" -gt 1 ]; then - printf '%s' "\${_help}" - exit 1 -elif [ "\${#@}" -eq 1 ]; then - _opt_PKGBUILD="\$1" -fi - -if [ ! -s "\${_opt_PKGBUILD}" ]; then - printf '%s: Unable to find %s' "\${0##*/}" "\${_opt_PKGBUILD}" -elif [ ! -w . ]; then - printf '%s: No write access to current folder' "\${0##*/}" -elif [ "\${EUID}" -eq 0 ]; then - printf '%s: Cannot run as root' "\${0##*/}" -else - (cd "\$(dirname "\${_opt_PKGBUILD}")"; makepkg -p "\${_opt_PKGBUILD##*/}" --printsrcinfo ) > "\${_opt_o}" -fi -EOF - ) "${pkgdir}/usr/bin/mksrcinfo" + cd -- "${srcdir?}/${pkgname}-${pkgver}" + make install PREFIX='/usr' DESTDIR="${pkgdir}" set +u } set +u |