-
Notifications
You must be signed in to change notification settings - Fork 37
/
Makefile.am
49 lines (39 loc) · 1.35 KB
/
Makefile.am
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
ACLOCAL_AMFLAGS = -I m4
pluginsdir = $(datadir)/ipfixcol/plugins
sofile = $(pluginsdir)/ipfixcol-nfdump-input.so
internalcfg = $(DESTDIR)$(sysconfdir)/ipfixcol/internalcfg.xml
plugins_LTLIBRARIES = ipfixcol-nfdump-input.la
ipfixcol_nfdump_input_la_LDFLAGS = -module -avoid-version -shared
ipfixcol_nfdump_input_la_SOURCES = nfinput.c ext_fill.c ext_fill.h ext_parse.c ext_parse.h nffile.h nfinput.h
if HAVE_DOC
MANSRC = ipfixcol-nfdump-input.dbk
EXTRA_DIST = $(MANSRC)
man_MANS = ipfixcol-nfdump-input.1
CLEANFILES = ipfixcol-nfdump-input.1
endif
rpmspec = $(PACKAGE_TARNAME).spec
RPMDIR = RPMBUILD
%.1 : %.dbk
@if [ -n "$(XSLTPROC)" ]; then \
if [ -f "$(XSLTMANSTYLE)" ]; then \
echo $(XSLTPROC) $(XSLTMANSTYLE) $<; \
$(XSLTPROC) $(XSLTMANSTYLE) $<; \
else \
echo "Missing $(XSLTMANSTYLE)!"; \
exit 1; \
fi \
else \
echo "Missing xsltproc"; \
fi
.PHONY: rpm
rpm: dist $(rpmspec)
@mkdir -p $(RPMDIR)/BUILD $(RPMDIR)/RPMS $(RPMDIR)/SOURCES $(RPMDIR)/SPECS $(RPMDIR)/SRPMS;
mv $(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar.gz $(RPMDIR)/SOURCES/$(PACKAGE_TARNAME)-$(PACKAGE_VERSION)-$(RELEASE).tar.gz
$(RPMBUILD) -ba $(rpmspec) \
--define "_topdir `pwd`/$(RPMDIR)";
clean-local:
rm -rf RPMBUILD
install-data-hook:
@if [ -f "$(internalcfg)" ]; then \
ipfixconf add -c "$(internalcfg)" -p i -n nfdumpReader -t nfdumpFile -s "$(sofile)" -f; \
fi