Package Details: xar-tpoechtrage-git xar.1.6.1.r12.g2b9a4ab-1

Git Clone URL: https://aur.archlinux.org/xar-tpoechtrage-git.git (read-only, click to copy)
Package Base: xar-tpoechtrage-git
Description: eXtensible ARchive format
Upstream URL: https://github.com/tpoechtrager/xar
Licenses: custom:BSD
Conflicts: xar
Provides: xar
Submitter: ckatri
Maintainer: ckatri
Last Packager: ckatri
Votes: 2
Popularity: 0.004932
First Submitted: 2020-08-24 16:21 (UTC)
Last Updated: 2020-08-24 16:21 (UTC)

Required by (6)

Sources (1)

Latest Comments

zkm2fw commented on 2021-03-01 03:45 (UTC) (edited on 2021-03-01 03:59 (UTC) by zkm2fw)

I suggest the following patch

  1. Fix url quote mark typo
  2. Explicitly provide xar-tpoechtrage along with xar
  3. Make pkgver() follow /usr/share/pacman/PKGBUILD-vcs.proto (vercmp xar.1.6.1.r12.g2b9a4ab xar.1.6.1.r12.2b9a4ab gives -1, no need for epoch bump)
  4. Quoted cd
  5. Update configure.ac w/ autoupdate
  6. Enable xml2-config
patch PKGBUILD <<"EOP"
--- PKGBUILD
+++ PKGBUILD
@@ -1,33 +1,34 @@
 # Maintainer: Cameron Katri <katri.cameron@gmail.com>
 pkgname=xar-tpoechtrage-git
 _pkgname=xar
-pkgver=xar.1.6.1.r12.g2b9a4ab
+pkgver=xar.1.6.1.r12.2b9a4ab
 pkgrel=1
 pkgdesc='eXtensible ARchive format'
 arch=('x86_64')
-url=''https://github.com/tpoechtrager/xar
+url='https://github.com/tpoechtrager/xar'
 license=('custom:BSD')
-conflicts=('xar')
-provides=('xar')
+conflicts=('xar' 'xar-tpoechtrage')
+provides=('xar' 'xar-tpoechtrage')
 depends=('libxml2' 'bzip2' 'acl' 'openssl')
 makedepends=('git')
-source=('git+https://github.com/tpoechtrager/xar.git')
+source=("git+https://github.com/tpoechtrager/$_pkgname.git")
 sha256sums=('SKIP')

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

 build() {
-    cd ${srcdir}/${_pkgname}/xar
-    ./autogen.sh --prefix=/usr --with-bzip2 --with-lzma
+    cd "${srcdir}/${_pkgname}/${_pkgname}"
+    autoupdate -v
+    ./autogen.sh --prefix=/usr --with-xml2-config=/usr/bin/xml2-config --with-bzip2 --with-lzma
     make
 }

 package() {
-    cd $srcdir/${_pkgname}/xar
+    cd "$srcdir/${_pkgname}/${_pkgname}"
     make DESTDIR="$pkgdir" install
-    install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+    install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname%-git}/LICENSE"
 }

EOP