comparison logstash.spec @ 14:0e45fe64b10d

work on building from source
author Carl Byington <carl@five-ten-sg.com>
date Wed, 10 Apr 2013 21:24:14 -0700
parents c0150404962d
children c158cae7cd26
comparison
equal deleted inserted replaced
13:c0150404962d 14:0e45fe64b10d
1 # prevent brp repack jar files 1 # prevent brp repack jar files
2 %define __os_install_post %{nil} 2 %define __os_install_post %{nil}
3 3
4 %define _bindir /usr/local/bin 4 %define _bindir /usr/local/bin
5 %define ES_VERSION 0.20.6
6 %define gtcommit 06a620d011d08bd2c1099c0d0810c053bf105400
7 5
8 Summary: logstash is a tool for managing events and logs. 6 Summary: logstash is a tool for managing events and logs.
9 Name: logstash 7 Name: logstash
10 Version: 1.1.9 8 Version: 1.1.9
11 Release: 0 9 Release: 0%{?dist}
12 License: Apache 2.0 10 License: Apache 2.0
13 Group: System Environment/Daemons 11 Group: System Environment/Daemons
14 URL: http://logstash.net/ 12 URL: http://logstash.net/
15 BuildArch: noarch 13 BuildArch: noarch
16 Source0: https://logstash.objects.dreamhost.com/release/%{name}-%{version}-monolithic.jar 14 Source0: https://logstash.objects.dreamhost.com/release/%{name}-%{version}-monolithic.jar
17 Source1: https://logstash.jira.com/secure/attachment/12610/logstash_index_cleaner.py 15 Source1: https://logstash.jira.com/secure/attachment/12610/logstash_index_cleaner.py
18 #Source2: curl https://nodeload.github.com/logstash/logstash/tar.gz/v1.1.9 >logstash-1.1.9.tar.gz 16 #Source2: curl https://nodeload.github.com/logstash/logstash/tar.gz/v%{version} >logstash-%{version}.tar.gz
19 Source2: %{name}-%{version}.tar.gz 17 Source2: %{name}-%{version}.tar.gz
20 Source3: %{name}.Makefile 18 Source3: http://logstash.objects.dreamhost.com/maxmind/GeoLite-City-2013-01-18.dat.gz
21 #Source4: curl https://nodeload.github.com/elasticsearch/elasticsearch/tar.gz/V%{ES_VERSION}.tar.gz >elasticsearch-%{ES_VERSION}.tar.gz 19 Source4: %{name}.Makefile
22 Source4: elasticsearch-%{ES_VERSION}.tar.gz
23 #Source5: https://github.com/NickPadilla/GraphTastic/tar.gz/%{gtcommit} >GraphTastic.tar.gz
24 Source5: GraphTastic.tar.gz
25 Source10: %{name}.rc 20 Source10: %{name}.rc
26 Source11: %{name}.cron 21 Source11: %{name}.cron
27 Source12: %{name}.conf 22 Source12: %{name}.conf
28 Source13: %{name}.sysconfig 23 Source13: %{name}.sysconfig
29 Source20: apache.pattern 24 Source20: apache.pattern
30 Source21: sendmail.pattern 25 Source21: sendmail.pattern
31 Source22: dnsbl.pattern 26 Source22: dnsbl.pattern
27 BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
32 Requires: logrotate httpd java-1.7.0-openjdk python-pip python-argparse python-ordereddict 28 Requires: logrotate httpd java-1.7.0-openjdk python-pip python-argparse python-ordereddict
33 Requires(pre): /usr/sbin/useradd 29 Requires(pre): /usr/sbin/useradd
34 Requires(pre): /usr/bin/getent 30 Requires(pre): /usr/bin/getent
35 Requires(postun): /usr/sbin/userdel 31 Requires(postun): /usr/sbin/userdel
36 Requires(post,preun): /sbin/chkconfig 32 Requires(post,preun): /sbin/chkconfig
37 Requires(post,preun): /sbin/service 33 Requires(post,preun): /sbin/service
38 #BuildRequires: maven 34 BuildRequires: ragel jruby
39 BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
40 35
41 36
42 %description 37 %description
43 logstash is a tool for managing events and logs. You can use it to 38 logstash is a tool for managing events and logs. You can use it to
44 collect logs, parse them, and store them for later use (like, for 39 collect logs, parse them, and store them for later use (like, for
46 for searching and drilling into all of your logs. 41 for searching and drilling into all of your logs.
47 42
48 43
49 %prep 44 %prep
50 %setup -q -T -b 2 45 %setup -q -T -b 2
51 mkdir ES
52 cd ES
53 gzip -dc %SOURCE4 | tar -xvvf -
54 cd ..
55 mkdir GT
56 cd GT
57 gzip -dc %SOURCE5 | tar -xvvf -
58 mv GraphTastic-%{gtcommit} GraphTastic
59 46
60 47
61 %build 48 %build
62 make -f %SOURCE3 49 gunzip -c %SOURCE3 >GeoLiteCity.dat
50 make -f %SOURCE4
63 51
64 52
65 %install 53 %install
66 # for now, ignore the results of the build, and just package the source jar files. 54 # for now, ignore the results of the build, and just package the source jar files.
67 rm -rf $RPM_BUILD_ROOT 55 rm -rf $RPM_BUILD_ROOT
68 mkdir -p $RPM_BUILD_ROOT/var/log/%{name} 56 install -d $RPM_BUILD_ROOT/var/log/%{name}
69 install -D -m 750 %SOURCE0 $RPM_BUILD_ROOT/%{_bindir}/%{name}.jar 57 install -D -m 750 %SOURCE0 $RPM_BUILD_ROOT/%{_bindir}/%{name}.jar
70 install -D -m 750 %SOURCE1 $RPM_BUILD_ROOT/%{_bindir}/logstash_index_cleaner.py 58 install -D -m 750 %SOURCE1 $RPM_BUILD_ROOT/%{_bindir}/logstash_index_cleaner.py
71 install -D -m 755 %SOURCE10 $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} 59 install -D -m 755 %SOURCE10 $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
72 install -D -m 755 %SOURCE11 $RPM_BUILD_ROOT/etc/cron.daily/%{name} 60 install -D -m 755 %SOURCE11 $RPM_BUILD_ROOT/etc/cron.daily/%{name}
73 install -D -m 640 %SOURCE12 $RPM_BUILD_ROOT/etc/%{name}/%{name}.conf 61 install -D -m 640 %SOURCE12 $RPM_BUILD_ROOT/etc/%{name}/%{name}.conf