forked from fluent/fluentd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.am
55 lines (44 loc) · 2 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
50
51
52
53
54
SUBDIRS = deps/ruby
bin_SCRIPTS = fluent-gem fluent-cat fluentd
MOSTLYCLEANFILES = $(bin_SCRIPTS)
unexport GEM_HOME
unexport GEM_PATH
DEST_RUBY = $(DESTDIR)$(RUBY_BINDIR)/ruby
DEST_GEM = $(DEST_RUBY) -rrubygems -rrubygems/gem_runner -rrubygems/exceptions -rrubygems/installer -e 'class Gem::Installer; def shebang(bin_file_name) "\#\!$(RUBY_BINDIR)/ruby" end; end; Gem::GemRunner.new.run ARGV'
DEST_RAKE = $(DEST_RUBY) -rrake -e 'Rake.application.run'
DEST_RUBY_LIBDIR = $(DESTDIR)$(RUBY_LIBDIR)/ruby
fluent-gem:
echo '#!/bin/sh' > $@
echo 'exec "$(RUBY_BINDIR)/gem" "$$@"' >> $@
chmod 755 $@
fluent-cat:
echo '#!/bin/sh' > $@
echo 'export FLUENT_CONF="$(sysconfdir)/fluent/fluent.conf"' >> $@
echo 'export FLUENT_PLUGIN="$(sysconfdir)/fluent/plugin"' >> $@
echo 'export FLUENT_SOCKET="$(localstatedir)/run/fluent.sock"' >> $@
echo 'exec "$(RUBY_BINDIR)/fluent-cat" "$$@"' >> $@
chmod 755 $@
fluentd:
echo '#!/bin/sh' > $@
echo 'export FLUENT_CONF="$(sysconfdir)/fluent/fluent.conf"' >> $@
echo 'export FLUENT_PLUGIN="$(sysconfdir)/fluent/plugin"' >> $@
echo 'export FLUENT_SOCKET="$(localstatedir)/run/fluent.sock"' >> $@
echo 'exec "$(RUBY_BINDIR)/fluentd" "$$@"' >> $@
chmod 755 $@
install: install-recursive
for gem in $(srcdir)/deps/*.gem; do \
RUBYLIB="$(DEST_RUBY_LIBDIR)/1.9.1:$(DEST_RUBY_LIBDIR)/1.9.1/$(shell $(DEST_RUBY) --version | sed -E 's/.*\[(.*)\]/\1/')" \
$(DEST_GEM) install --no-rdoc --no-ri "$$gem"; \
done
cd "$(srcdir)" && \
RUBYLIB="$(DEST_RUBY_LIBDIR)/1.9.1:$(DEST_RUBY_LIBDIR)/1.9.1/$(shell $(DEST_RUBY) --version | sed -E 's/.*\[(.*)\]/\1/')" \
$(DEST_RAKE)
RUBYLIB="$(DEST_RUBY_LIBDIR)/1.9.1:$(DEST_RUBY_LIBDIR)/1.9.1/$(shell $(DEST_RUBY) --version | sed -E 's/.*\[(.*)\]/\1/')" \
$(DEST_GEM) install --no-rdoc --no-ri "$(srcdir)/pkg/fluentd-$(VERSION).gem"
mkdir -p $(DESTDIR)$(sysconfdir)/fluent
cp -f $(srcdir)/fluent.conf $(DESTDIR)$(sysconfdir)/fluent/fluent.conf
mkdir -p $(DESTDIR)$(sysconfdir)/fluent/plugin
distdir:
@echo do nothing
dist:
cd $(srcdir) && ./make_dist.sh