File: rules

package info (click to toggle)
grok 1.20110708.1-7
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid
  • size: 2,488 kB
  • sloc: ansic: 3,469; ruby: 987; makefile: 278; sh: 124; yacc: 106; python: 11
file content (59 lines) | stat: -rwxr-xr-x 1,828 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1

# Build using TI RPC on GNU/Linux since glibc SunRPC implementation was removed
# in glibc 2.32
ifeq ($(DEB_HOST_ARCH_LIBC), gnu)
  DEB_CFLAGS_MAINT_APPEND  += -I/usr/include/tirpc
  DEB_LDFLAGS_MAINT_APPEND += -ltirpc
endif

# Build using -ldl on hurd and kfreebsd
ifneq ($(filter $(DEB_HOST_ARCH_OS),hurd kfreebsd),)
  DEB_LDFLAGS_MAINT_APPEND += -ldl
endif

# Add missing hardening flags
DEB_CFLAGS_MAINT_APPEND += -Wdate-time -D_FORTIFY_SOURCE=2

# Import build variables
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk

%:
	dh $@

override_dh_auto_install:
	dh_auto_install
	# Move the library
	install -d debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)
	mv debian/tmp/usr/lib/libgrok.so debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libgrok.so.1
	ln -s libgrok.so.1 debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libgrok.so

	help2man --no-info --section=1 \
		--version-string="discogrok $(DEB_VERSION)" \
		--name "Discover grok patterns in input" \
		$(CURDIR)/discogrok \
		> $(CURDIR)/debian/discogrok.1

override_dh_install:
	dh_install
	chmod 644 debian/grok/usr/share/grok/patterns/base

override_dh_installchangelogs:
	dh_installchangelogs -- CHANGELIST

override_dh_installexamples:
	dh_installexamples
	sed -i s,patterns/base,/usr/share/grok/patterns/base, debian/grok/usr/share/doc/grok/examples/*.grok

override_dh_strip:
	dh_strip --dbgsym-migration='grok-dbg (<< 1.20110708.1-5~)'