Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix to be able to specify perl path at build/execute

  • Loading branch information...
commit aeb23216bb4cb00464fb3b9e97184c7a5e68496a 1 parent 14f4185
@tagomoris tagomoris authored
View
4 SPECS/fluent-agent-lite.spec
@@ -1,6 +1,8 @@
%define name fluent-agent-lite
%define version 0.1
%define prefix /usr/local
+%define build_perl_path /usr/bin/perl
+
%define _use_internal_dependency_generator 0
%global debug_package %{nil}
@@ -33,7 +35,7 @@ Log transfer agent service over fluentd protocol.
%install
rm -rf $RPM_BUILD_ROOT
-env PREFIX=$RPM_BUILD_ROOT bin/install.sh
+env PREFIX=$RPM_BUILD_ROOT PERL_PATH=%{build_perl_path} bin/install.sh
%clean
rm -rf $RPM_BUILD_ROOT
View
8 bin/install.sh
@@ -15,6 +15,10 @@ if [ "x"$PREFIX = "x" ]; then
fi
INSTALLDIR=$PREFIX/usr/local/fluent-agent-lite
+if [ "x"$PERL_PATH = "x" ]; then
+ $PERL_PATH="perl"
+fi
+
if [ -d $INSTALLDIR -a "x"$CLEAN = "xy" ]; then
rm -rf $INSTALLDIR
fi
@@ -26,8 +30,8 @@ cp -rp bin lib Makefile.PL $INSTALLDIR
cd $INSTALLDIR
export PERL_CPANM_OPT="--local-lib=~/perl5"
-perl $SOURCEDIR/bin/cpanm -n inc::Module::Install
-perl $SOURCEDIR/bin/cpanm -lextlib -n --reinstall --installdeps .
+$PERL_PATH $SOURCEDIR/bin/cpanm -n inc::Module::Install
+$PERL_PATH $SOURCEDIR/bin/cpanm -lextlib -n --reinstall --installdeps .
cd $SOURCEDIR
View
4 package/fluent-agent-lite.conf
@@ -34,4 +34,6 @@ PRIMARY_SERVER="primary.fluentd.local:24224"
# TAIL_PATH=/usr/bin/tail
# LOG_PATH=/tmp/fluent-agent.log
-# LOG_VERBOSE=false
+# LOG_VERBOSE=false
+
+# PERL_PATH=/usr/bin/perl
View
6 package/fluent-agent-lite.init
@@ -120,6 +120,10 @@ status() {
PREPARE_GLOBAL=""
+if [ "x"$PERL_PATH = "x" ]; then
+ PERL_PATH="perl"
+fi
+
NICE_PART=""
TAG_PREFIX_STRING=""
OPTIONS_PART=""
@@ -195,7 +199,7 @@ function build_command_line {
path=$(echo $line | awk '{print $2;}')
- echo -n $NICE_PART $scriptpath $OPTIONS_PART $tag $path $ARGS_SERVER_PART
+ echo -n $NICE_PART $PERL_PATH $scriptpath $OPTIONS_PART $tag $path $ARGS_SERVER_PART
return 0
}
Please sign in to comment.
Something went wrong with that request. Please try again.