1
0
mirror of https://github.com/bertptrs/aur.git synced 2025-12-25 20:40:32 +01:00

Fix conflicts and relro issues.

This commit is contained in:
2019-09-02 16:42:45 +02:00
parent 7ad8d5a3d9
commit 3d100f43e4
2 changed files with 11 additions and 8 deletions

View File

@@ -1,12 +1,13 @@
pkgbase = bloaty
pkgdesc = a size profiler for binaries
pkgver = 1.0
pkgrel = 1
pkgrel = 2
url = https://github.com/google/bloaty
arch = x86_64
license = Apache
makedepends = cmake
depends = gcc-libs
options = !emptydirs
source = https://github.com/google/bloaty/releases/download/v1.0/bloaty-1.0.tar.bz2
sha256sums = e1cf9830ba6c455218fdb50e7a8554ff256da749878acfaf77c032140d7ddde0

View File

@@ -1,19 +1,23 @@
# Maintainer: Bert Peters <bert@bertptrs.nl>
pkgname=bloaty
pkgver=1.0
pkgrel=1
pkgrel=2
pkgdesc="a size profiler for binaries"
arch=(x86_64)
url="https://github.com/google/bloaty"
license=('Apache')
depends=(gcc-libs zlib)
depends=(gcc-libs)
makedepends=(cmake)
options=(!emptydirs)
source=("https://github.com/google/bloaty/releases/download/v$pkgver/bloaty-$pkgver.tar.bz2")
sha256sums=('e1cf9830ba6c455218fdb50e7a8554ff256da749878acfaf77c032140d7ddde0')
build() {
cd "$pkgname-$pkgver"
cmake -DCMAKE_INSTALL_PREFIX=/usr .
# Bloaty doesn't allow using an empty build type.
# Unfortunately, this breaks RELRO, so we need to fix that
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_EXE_LINKER_FLAGS_RELEASE="$LDFLAGS" -Wno-dev .
make
}
@@ -26,9 +30,7 @@ build() {
package() {
cd "$pkgname-$pkgver"
make DESTDIR="$pkgdir/" install
# Prevent a conflict with regular protobuf
rm "$pkgdir/usr/bin/protoc"*
# Don't cause conflicts with our static libraries
rm -rf "$pkgdir/usr/"{include,lib64} "$pkgdir/usr/lib/libre2.a"
# Prevent package conflicts
rm -r "$pkgdir/usr/"{include,bin/protoc*,lib64,lib/*.a,lib/pkgconfig/protobuf*,lib/cmake/protobuf}
}