summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCraig Barnes2017-10-06 00:19:42 +0100
committerCraig Barnes2017-10-06 00:19:42 +0100
commit2e6b7c0f26ebad4344d04608c770261b54f1f426 (patch)
tree620b8d9f4180fee9b53b579036dbaa55a4a68bfc
parente606e04b1c94a92692504671c76173986d298189 (diff)
downloadaur-2e6b7c0f26eb.tar.gz
Ensure all C code is properly compiled with distro CPPFLAGS and CFLAGS
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD13
2 files changed, 10 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 96d0fb937f1..b2364215065 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = tweak-hexeditor
pkgdesc = Efficient command line hex editor
pkgver = 3.02
- pkgrel = 2
+ pkgrel = 3
url = https://www.chiark.greenend.org.uk/~sgtatham/tweak/
arch = i686
arch = x86_64
diff --git a/PKGBUILD b/PKGBUILD
index 9c8b84391fc..192a588df57 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@
pkgname=tweak-hexeditor
pkgdesc='Efficient command line hex editor'
pkgver=3.02
-pkgrel=2
+pkgrel=3
arch=('i686' 'x86_64')
depends=('ncurses' 'glibc')
makedepends=('make' 'gcc')
@@ -17,11 +17,16 @@ sha256sums=('5b4c19b1bf8734d1623e723644b8da58150b882efa9f23bbe797c3922f295a1a')
build() {
cd "tweak-$pkgver"
- make
+ # The upstream Makefile is very poorly implemented and doesn't pick
+ # up CFLAGS or CPPFLAGS from the environment.
+ make XFLAGS="$CPPFLAGS $CFLAGS"
}
package() {
cd "tweak-$pkgver"
- make install PREFIX="$pkgdir/usr" MANDIR="$pkgdir/usr/share/man/man1"
- install -Dm 644 LICENCE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ # The "make install" target doesn't support DESTDIR and sets MANDIR
+ # incorrectly. It's simple enough to just install without using it.
+ install -Dm755 tweak "$pkgdir/usr/bin/tweak"
+ install -Dm644 tweak.1 "$pkgdir/usr/share/man/man1/tweak.1"
+ install -Dm644 LICENCE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}