diff logstash.spec @ 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 1d50b19beda0
children d058481276aa
line wrap: on
line diff
--- 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}