changeset 24:0f249d38da21

jruby.spec needs /usr/share to match fedora jrudy location
author Carl Byington <carl@five-ten-sg.com>
date Fri, 19 Apr 2013 17:48:29 -0700
parents bb48b2672ff2
children d058481276aa
files jruby.spec logstash.cron logstash.rc logstash.spec
diffstat 4 files changed, 11 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/jruby.spec	Fri Apr 19 15:03:01 2013 -0700
+++ b/jruby.spec	Fri Apr 19 17:48:29 2013 -0700
@@ -1,6 +1,8 @@
 # prevent brp repack jar files
 %define __os_install_post %{nil}
 
+%define _bindir /usr/share
+
 Summary:        just enough jruby for el6 to get logstash running
 Name:           jruby
 Version:        1.7.3
@@ -24,7 +26,7 @@
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -D -p -m 644 %SOURCE0 $RPM_BUILD_ROOT/%{_javadir}/%{name}.jar
+install -D -p -m 644 %SOURCE0 $RPM_BUILD_ROOT/%{_bindir}/%{name}.jar
 
 
 %clean
@@ -33,7 +35,7 @@
 
 %files
 %defattr(-,root,root,-)
-%attr(0755,root,root) %{_javadir}/*
+%attr(0755,root,root) %{_bindir}/*
 
 
 
--- a/logstash.cron	Fri Apr 19 15:03:01 2013 -0700
+++ b/logstash.cron	Fri Apr 19 17:48:29 2013 -0700
@@ -2,5 +2,5 @@
 
 . /etc/sysconfig/logstash
 
-/usr/local/bin/logstash_index_cleaner.py -d $DAYS
+/usr/share/java/logstash_index_cleaner.py -d $DAYS
 
--- a/logstash.rc	Fri Apr 19 15:03:01 2013 -0700
+++ b/logstash.rc	Fri Apr 19 17:48:29 2013 -0700
@@ -30,7 +30,7 @@
 JAVA=$(which java)
 CONFIGFILE=/etc/logstash/logstash.conf
 LOGFILE=/var/log/logstash/logstash.log
-JARNAME=/usr/local/bin/logstash.jar
+JARNAME=/usr/share/java/logstash.jar
 ARGS="$JAVAARGS -jar $JARNAME agent --config $CONFIGFILE --log $LOGFILE $AGENTARGS -- web $WEBARGS"
 PIDFILE=/var/run/logstash.pid
 base=logstash
--- a/logstash.spec	Fri Apr 19 15:03:01 2013 -0700
+++ b/logstash.spec	Fri Apr 19 17:48:29 2013 -0700
@@ -1,8 +1,6 @@
 # prevent brp repack jar files
 %define __os_install_post %{nil}
 
-%define _bindir  /usr/local/bin
-
 Summary:        logstash is a tool for managing events and logs.
 Name:           logstash
 Version:        1.1.10
@@ -45,8 +43,8 @@
 
 %prep
 %setup -q
-sed -i -e 's,jarpath =.*,jarpath = "/usr/local/bin/elasticsearch/*.jar",g' lib/logstash/outputs/elasticsearch.rb
-sed -i -e 's,jarpath =.*,jarpath = "/usr/local/bin/elasticsearch/*.jar",g' lib/logstash/outputs/elasticsearch_river.rb
+sed -i -e 's,jarpath =.*,jarpath = "%{_javadir}/elasticsearch/*.jar",g' lib/logstash/outputs/elasticsearch.rb
+sed -i -e 's,jarpath =.*,jarpath = "%{_javadir}/elasticsearch/*.jar",g' lib/logstash/outputs/elasticsearch_river.rb
 
 
 %build
@@ -58,8 +56,8 @@
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT/var/log/%{name}
-install -D -m 750 build/logstash.jar  $RPM_BUILD_ROOT/%{_bindir}/%{name}.jar
-install -D -m 750 %SOURCE1            $RPM_BUILD_ROOT/%{_bindir}/logstash_index_cleaner.py
+install -D -m 750 build/logstash.jar  $RPM_BUILD_ROOT/%{_javadir}/%{name}.jar
+install -D -m 750 %SOURCE1            $RPM_BUILD_ROOT/%{_javadir}/logstash_index_cleaner.py
 install -D -m 755 %SOURCE10           $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
 install -D -m 755 %SOURCE11           $RPM_BUILD_ROOT/etc/cron.daily/%{name}
 install -D -m 640 %SOURCE12           $RPM_BUILD_ROOT/etc/%{name}/%{name}.conf
@@ -99,7 +97,7 @@
 
 %files
 %defattr(-,root,root,-)
-%attr(0750,%{name},root) %{_bindir}/*
+%attr(0750,%{name},root) %{_javadir}/*
 %dir %attr(0750,%{name},root) /etc/%{name}
 %config(noreplace) %attr(0640,%{name},root) /etc/%{name}/%{name}.conf
 %config(noreplace) %attr(0640,%{name},root) /etc/sysconfig/%{name}