Skip to content

Commit 59b3a41

Browse files
committed
update buildsystem to build
graylog-labs/apache-mod_log_gelf#12
1 parent 85c2e78 commit 59b3a41

File tree

2 files changed

+71
-0
lines changed

2 files changed

+71
-0
lines changed

apache-mod_log_gelf.spec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Group: Networking/Daemons/HTTP
99
Source0: https://github.com/graylog-labs/apache-mod_log_gelf/archive/%{version}/%{name}-%{version}.tar.gz
1010
# Source0-md5: 4aba4fd0f8e1175c39d4ac236282df10
1111
Source1: apache.conf
12+
Patch0: build.patch
1213
URL: https://github.com/graylog-labs/apache-mod_log_gelf
1314
BuildRequires: %{apxs}
1415
BuildRequires: apache-devel >= 2.2
@@ -24,6 +25,7 @@ Apache2 module for writing access logs to Graylog.
2425

2526
%prep
2627
%setup -q -n apache-mod_log_gelf-%{version}
28+
%patch0 -p1
2729

2830
%build
2931
%{__make} -C src

build.patch

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
From 747fe36fc7ef34b8dfe2196ebda5d189bbdbbe6e Mon Sep 17 00:00:00 2001
2+
From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= <[email protected]>
3+
Date: Mon, 29 Jan 2018 11:18:52 +0200
4+
Subject: [PATCH 1/2] use apxs to query apache install paths
5+
6+
---
7+
src/Makefile | 21 +++++++--------------
8+
1 file changed, 7 insertions(+), 14 deletions(-)
9+
10+
diff --git a/src/Makefile b/src/Makefile
11+
index 09b4871..0df88fb 100644
12+
--- a/src/Makefile
13+
+++ b/src/Makefile
14+
@@ -1,15 +1,12 @@
15+
builddir=.
16+
17+
-ifneq (,$(wildcard /usr/share/apache2/build/special.mk))
18+
- top_srcdir=/usr/share/apache2
19+
- top_builddir=/usr/share/apache2
20+
- include /usr/share/apache2/build/special.mk
21+
-endif
22+
-ifneq (,$(wildcard /usr/lib64/httpd/build/special.mk))
23+
- top_srcdir=/etc/httpd
24+
- top_builddir=/usr/lib64/httpd
25+
- include /usr/lib64/httpd/build/special.mk
26+
-endif
27+
+# the used tools
28+
+APXS=apxs
29+
+APACHECTL=apachectl
30+
+
31+
+top_builddir=$(shell $(APXS) -q exp_libexecdir)
32+
+include $(top_builddir)/build/special.mk
33+
+
34+
ifneq (,$(wildcard /etc/debian_version))
35+
DISTRIBUTION := $(shell lsb_release -i | cut -f2)
36+
ifeq ($(DISTRIBUTION),Debian)
37+
@@ -17,10 +14,6 @@ ifneq (,$(wildcard /etc/debian_version))
38+
endif
39+
endif
40+
41+
-# the used tools
42+
-APXS=apxs
43+
-APACHECTL=apachectl
44+
-
45+
# additional defines, includes and libraries
46+
LIBS=-ljson-c -lz
47+
48+
49+
From b53dc3cc7530de656525ed2dfcd4a9fad1a131f4 Mon Sep 17 00:00:00 2001
50+
From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= <[email protected]>
51+
Date: Mon, 29 Jan 2018 11:24:06 +0200
52+
Subject: [PATCH 2/2] assign top_srcdir for make install
53+
54+
---
55+
src/Makefile | 1 +
56+
1 file changed, 1 insertion(+)
57+
58+
diff --git a/src/Makefile b/src/Makefile
59+
index 0df88fb..63e130b 100644
60+
--- a/src/Makefile
61+
+++ b/src/Makefile
62+
@@ -5,6 +5,7 @@ APXS=apxs
63+
APACHECTL=apachectl
64+
65+
top_builddir=$(shell $(APXS) -q exp_libexecdir)
66+
+top_srcdir=$(top_builddir)
67+
include $(top_builddir)/build/special.mk
68+
69+
ifneq (,$(wildcard /etc/debian_version))

0 commit comments

Comments
 (0)