[arch-commits] Commit in lib32-expat/trunk (PKGBUILD)

David Runge dvzrv at archlinux.org
Thu Mar 25 18:54:44 UTC 2021


    Date: Thursday, March 25, 2021 @ 18:54:44
  Author: dvzrv
Revision: 903375

upgpkg: lib32-expat 2.3.0-1: Upgrade to 2.3.0.

Switch to cmake as build system and rely PGP signed source tarballs.
Run tests in check().
Switch to MIT as license and install the license file.
Update maintainer info.

Modified:
  lib32-expat/trunk/PKGBUILD

----------+
 PKGBUILD |   61 +++++++++++++++++++++++++++++--------------------------------
 1 file changed, 29 insertions(+), 32 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-03-25 18:48:44 UTC (rev 903374)
+++ PKGBUILD	2021-03-25 18:54:44 UTC (rev 903375)
@@ -1,57 +1,54 @@
 # Maintainer: Maxime Gauduin <alucryd at archlinux.org>
+# Maintainer: David Runge <dvzrv at archlinux.org>
 # Contributor: Felix Yan <felixonmars at archlinux.org>
 
+_name=expat
 pkgname=lib32-expat
-pkgver=2.2.10
+pkgver=2.3.0
 pkgrel=1
 pkgdesc='An XML Parser library'
 arch=(x86_64)
 url=https://libexpat.github.io/
-license=(custom)
+license=(MIT)
 depends=(
-  expat
+  "expat=${pkgver}"
   lib32-glibc
 )
-makedepends=(
-  docbook2x
-  git
-)
-_tag=162e16b0a7392a20ecdb2a4d0d13b5a03a7b2380
-source=(git+https://github.com/libexpat/libexpat.git#tag=${_tag})
-sha512sums=(SKIP)
+makedepends=(cmake)
+source=("https://github.com/libexpat/libexpat/releases/download/R_${pkgver//./_}/${_name}-${pkgver}.tar.bz2"{,.asc})
+sha512sums=('937468f2c298503a2c8d3f70b36e2c79d6b603e758abe0613fd2b636d3cf6906946776fdfe6725a8d6e90748ed7f7f07ad0d7a07c4328f6669bc89482c0e535b'
+            'SKIP')
+b2sums=('cac52d8f67a1019985b5568ed1baf9adfda2366a67374fc1e97db0493b1e528805d916e33bd69ab34cd88debef05082a271534e475cfa22c11bff5157bbc70c2'
+        'SKIP')
+validpgpkeys=(3176EF7DB2367F1FCA4F306B1F9B0E909AF37285) # Sebastian Pipping
 
-pkgver() {
-  cd libexpat
-
-  git describe --tags | sed 's/R_//; s/_/./g'
-}
-
 prepare() {
-  cd libexpat/expat
-
-  autoreconf -fiv
+  mv -v "${_name}-$pkgver" "$pkgname-$pkgver"
 }
-
 build() {
-  cd libexpat/expat
-
+  cd "$pkgname-$pkgver"
   export CC='gcc -m32'
+  export CXX='c++ -m32'
   export PKG_CONFIG_PATH=/usr/lib32/pkgconfig
+  cmake -DCMAKE_INSTALL_PREFIX=/usr \
+        -DCMAKE_INSTALL_LIBDIR=/usr/lib32 \
+        -DCMAKE_BUILD_TYPE='None' \
+        -W no-dev \
+        -B build \
+        -S .
+  make VERBOSE=1 -C build
+}
 
-  ./configure \
-    --prefix=/usr \
-    --libdir=/usr/lib32 \
-    --mandir=/usr/share/man
-  make
+check() {
+  cd "$pkgname-$pkgver"
+  make VERBOSE=1 -C build test
 }
 
 package() {
-  cd libexpat/expat
-
-  make DESTDIR="${pkgdir}" install
+  cd "$pkgname-$pkgver"
+  make VERBOSE=1 DESTDIR="$pkgdir" -C build install
+  install -vDm 644 COPYING -t "${pkgdir}/usr/share/licenses/$pkgname/"
   rm -rf "${pkgdir}"/usr/{bin,include,share/man,share/doc}
-  install -dm 755 "${pkgdir}"/usr/share/licenses
-  ln -s expat "${pkgdir}"/usr/share/licenses/lib32-expat
 }
 
 # vim: ts=2 sw=2 et:



More information about the arch-commits mailing list