[arch-commits] Commit in libcap/trunk (PKGBUILD libcap-2.45-makefile.patch)
David Runge
dvzrv at archlinux.org
Fri Nov 6 16:21:19 UTC 2020
Date: Friday, November 6, 2020 @ 16:21:18
Author: dvzrv
Revision: 399570
upgpkg: libcap 2.45-1: Upgrade to 2.45.
Remove attr from depends (it seems not to be required by anything in the libraries).
Add libpsx.so to provides.
Add a patch to fix SBINDIR and add our CPPFLAGS by modifying Make.Rules.
Only provide required arguments to make in build() and package().
Run tests in check().
Install docs.
Update maintainer info.
Added:
libcap/trunk/libcap-2.45-makefile.patch
Modified:
libcap/trunk/PKGBUILD
----------------------------+
PKGBUILD | 66 ++++++++++++++++++++++---------------------
libcap-2.45-makefile.patch | 21 +++++++++++++
2 files changed, 56 insertions(+), 31 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2020-11-06 12:03:28 UTC (rev 399569)
+++ PKGBUILD 2020-11-06 16:21:18 UTC (rev 399570)
@@ -1,47 +1,51 @@
-# Maintainer: Bartłomiej Piotrowski <bpiotrowski at archlinux.org>
+# Maintainer: David Runge <dvzrv at archlinux.org>
+# Contributor: Bartłomiej Piotrowski <bpiotrowski at archlinux.org>
# Contributor: Allan McRae <allan at archlinux.org>
# Contributor: Hugo Doria <hugo at archlinux.org>
pkgname=libcap
-pkgver=2.44
+pkgver=2.45
pkgrel=1
pkgdesc='POSIX 1003.1e capabilities'
-arch=(x86_64)
-url='https://sites.google.com/site/fullycapable/'
-license=(GPL2)
-depends=(glibc attr)
-makedepends=(linux-api-headers)
-provides=(libcap.so)
-source=(https://kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-$pkgver.tar.{xz,sign})
+arch=('x86_64')
+url="https://sites.google.com/site/fullycapable/"
+license=('GPL2')
+depends=('glibc')
+makedepends=('linux-api-headers')
+provides=('libcap.so' 'libpsx.so')
+source=("https://kernel.org/pub/linux/libs/security/linux-privs/${pkgname}2/${pkgname}-$pkgver.tar."{xz,sign}
+ "${pkgname}-2.45-makefile.patch"
+)
+sha512sums=('32ddc303eeb1bf6a4b6cc81b0cb0c49544c58697735925b661a0cdfa18e4096fdbaed1a340c09b8060b09302dea332b216e9bdaf246e4c45f91211afc4752138'
+ 'SKIP'
+ '4f613f83198dfccb8b79e1b2c8764657a85300cb166d633d86b87f46567d51fa9395387caf33e82a8718f19e9a1fc65c11e7b6f63c3c4cde1b2a27f70671ec07')
+b2sums=('61b422ad3a53b9f1e2e2fb253794ac5eef652e6592ffe5b0c4d7eb98c6683ebf08342bb2cbd1e4792cec206639c56bc3bafb983a990523ee3a1814686b57edf1'
+ 'SKIP'
+ '6f50d5a03c3532e6e50506cd878b1c9ca5cee5f1758f9318d4cb5d1e319cbe5f31210ba46a81b1af30730e2329aed7921c11f1a468a596a3f210972ca0da9d64')
validpgpkeys=(38A644698C69787344E954CE29EE848AE2CCF3F4) # Andrew G. Morgan <morgan at kernel.org>
-sha512sums=('1bb323ca362923bd6bd0e2e4639cf8726975165a620a243b31e797056439eb7efb2bfbc8e5521636783a86c7415b2037b1638c98747b79183ca7d3d42a04ff20'
- 'SKIP')
prepare() {
- cd $pkgname-$pkgver
- sed -i "/SBINDIR/s#sbin#bin#" Make.Rules
-
- # use our buildflags
- sed -i "s/CFLAGS :=/CFLAGS += \$(CPPFLAGS) /" Make.Rules
- sed -i "s/LDFLAGS :=/LDFLAGS +=/" Make.Rules
+ cd "$pkgname-$pkgver"
+ # SBINDIR is hardcoded to sbin. set to bin
+ # add CPPFLAGS
+ patch -Np1 -i ../"${pkgname}-2.45-makefile.patch"
}
-_makeargs=(
- KERNEL_HEADERS=/usr/include
- RAISE_SETFCAP=no
- SBINDIR=/usr/bin
- lib=lib
- prefix=/usr
-)
-
build() {
- make -C $pkgname-$pkgver "${_makeargs[@]}"
+ cd "$pkgname-$pkgver"
+ make KERNEL_HEADERS='/usr/include' lib='lib' prefix='/usr'
}
+check() {
+ cd "$pkgname-$pkgver"
+ make test
+}
+
package() {
- cd $pkgname-$pkgver
- make DESTDIR="$pkgdir" "${_makeargs[@]}" install
-
- install -Dm644 pam_cap/capability.conf \
- "$pkgdir"/usr/share/doc/$pkgname/capability.conf.example
+ cd "$pkgname-$pkgver"
+ make DESTDIR="$pkgdir" RAISE_SETFCAP='no' lib='lib' prefix='/usr' install
+ # docs
+ install -vDm 644 {CHANGELOG,README} -t "${pkgdir}/usr/share/doc/${pkgname}/"
+ install -vDm 644 pam_cap/capability.conf \
+ -t "$pkgdir/usr/share/doc/$pkgname/examples/"
}
Added: libcap-2.45-makefile.patch
===================================================================
--- libcap-2.45-makefile.patch (rev 0)
+++ libcap-2.45-makefile.patch 2020-11-06 16:21:18 UTC (rev 399570)
@@ -0,0 +1,21 @@
+diff -ruN a/Make.Rules b/Make.Rules
+--- a/Make.Rules 2020-11-03 02:38:59.000000000 +0100
++++ b/Make.Rules 2020-11-06 16:55:10.149893784 +0100
+@@ -37,7 +37,7 @@
+ # Target directories
+
+ MANDIR=$(man_prefix)/man
+-SBINDIR=$(exec_prefix)/sbin
++SBINDIR=$(exec_prefix)/bin
+ INCDIR=$(inc_prefix)/include
+ LIBDIR=$(lib_prefix)/$(lib)
+ PKGCONFIGDIR=$(LIBDIR)/pkgconfig
+@@ -79,7 +79,7 @@
+ SYSTEM_HEADERS = /usr/include
+ INCS=$(topdir)/libcap/include/sys/capability.h
+ LDFLAGS += -L$(topdir)/libcap
+-CFLAGS += -Dlinux $(WARNINGS) $(DEBUG)
++CFLAGS += $(CPPFLAGS) -Dlinux $(WARNINGS) $(DEBUG)
+ INDENT := $(shell if [ -n "$$(which indent 2>/dev/null)" ]; then echo "| indent -kr" ; fi)
+
+ # SHARED tracks whether or not the SHARED libraries (libcap.so,
More information about the arch-commits
mailing list