diff options
author | Ondřej Hlavatý | 2017-02-21 09:19:34 +0100 |
---|---|---|
committer | Ondřej Hlavatý | 2017-02-21 09:34:05 +0100 |
commit | b834371049228b133a484f3f79f25a5b864c8ebc (patch) | |
tree | 0cef98f27f4ea1e962898e00a7447fbab29bc91e | |
parent | 381f52422dd461d062d79a16de53cf198b9891e8 (diff) | |
download | aur-b834371049228b133a484f3f79f25a5b864c8ebc.tar.gz |
Introduce Makefile patch
The build system of plotnetcfg has nonstandard handling of CFLAGS and
requires patching the Makefile. And when we're doing it, make use of the
install target.
Signed-off-by: Ondřej Hlavatý <ohlavaty@redhat.com>
-rw-r--r-- | .SRCINFO | 7 | ||||
-rw-r--r-- | PKGBUILD | 25 | ||||
-rw-r--r-- | plotnetcfg-git.patch | 12 |
3 files changed, 30 insertions, 14 deletions
@@ -1,16 +1,19 @@ pkgbase = plotnetcfg-git pkgdesc = A tool that scans networking configuration on the machine and plots a diagram of the configuration hierarchy - pkgver = v0.4.1.r54.g2bbca33 + pkgver = v0.4.1.r65.gbb4e154 pkgrel = 1 url = https://github.com/jbenc/plotnetcfg arch = i686 arch = x86_64 license = GPL2 makedepends = git - depends = jansson + depends = jansson>=2.3 provides = plotnetcfg + conflicts = plotnetcfg source = git+https://github.com/jbenc/plotnetcfg + source = plotnetcfg-git.patch md5sums = SKIP + md5sums = 54a548645f6d46633e5c3b19a608de36 pkgname = plotnetcfg-git @@ -1,17 +1,18 @@ # Maintainer: awe00 < awe00 AT hotmail DOT fr> - +# Contributor: Ondřej Hlavatý <ohlavaty at redhat dot com> pkgname=plotnetcfg-git -pkgver=v0.4.1.r54.g2bbca33 +pkgver=v0.4.1.r65.gbb4e154 pkgrel=1 pkgdesc="A tool that scans networking configuration on the machine and plots a diagram of the configuration hierarchy" arch=('i686' 'x86_64') url="https://github.com/jbenc/plotnetcfg" license=('GPL2') -depends=('jansson') +depends=('jansson>=2.3') makedepends=('git') provides=('plotnetcfg') -source=("git+https://github.com/jbenc/plotnetcfg") -md5sums=('SKIP') +conflicts=('plotnetcfg') +source=("git+https://github.com/jbenc/plotnetcfg" "plotnetcfg-git.patch") +md5sums=('SKIP' '54a548645f6d46633e5c3b19a608de36') _gitrepo=plotnetcfg pkgver() { @@ -19,17 +20,17 @@ pkgver() { git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g' } +prepare() { + cd "$_gitrepo" + patch -p1 <../plotnetcfg-git.patch +} + build() { cd "$_gitrepo" - make + make CC=gcc } package() { cd "$_gitrepo" - - install -d "${pkgdir}/usr/bin" - install -d "${pkgdir}/usr/share/man/man5/" "${pkgdir}/usr/share/man/man8/" - install -t "${pkgdir}/usr/bin" plotnetcfg - install -m 644 -t "${pkgdir}/usr/share/man/man8/" plotnetcfg.8 - install -m 644 -t "${pkgdir}/usr/share/man/man5/" plotnetcfg-json.5 + make DESTDIR="$pkgdir/" install } diff --git a/plotnetcfg-git.patch b/plotnetcfg-git.patch new file mode 100644 index 000000000000..500f95ecec4d --- /dev/null +++ b/plotnetcfg-git.patch @@ -0,0 +1,12 @@ +diff --git a/Makefile b/Makefile +index 07fca8c..904ee0d 100644 +--- a/Makefile ++++ b/Makefile +@@ -8 +8 @@ endif +-CFLAGS=-std=c99 -D_GNU_SOURCE -W -Wall $(INCLUDE) $(EXTRA_CFLAGS) ++CFLAGS+=-std=c99 -D_GNU_SOURCE -W -Wall $(INCLUDE) +@@ -34,2 +34,2 @@ install: plotnetcfg +- install -d $(DESTDIR)/usr/sbin/ +- install plotnetcfg $(DESTDIR)/usr/sbin/ ++ install -d $(DESTDIR)/usr/bin/ ++ install plotnetcfg $(DESTDIR)/usr/bin/ |