]> git.pld-linux.org Git - SPECS.git/blob - graylog2-server.spec
SPECS updated Tue 30 Apr 15:06:09 CEST 2024
[SPECS.git] / graylog2-server.spec
1 # TODO
2 # - run as dedicated user
3 Summary:        A syslog implementation that stores logs in MongoDB
4 Name:           graylog2-server
5 Version:        0.9.6p1
6 Release:        0.2
7 License:        GPL v3
8 Group:          Daemons
9 URL:            http://www.graylog2.org/
10 Source0:        https://github.com/downloads/Graylog2/graylog2-server/%{name}-%{version}.tar.gz
11 # Source0-md5:  499ae16dcae71eeb7c3a30c75ea7a1a6
12 Source1:        %{name}.init
13 BuildRequires:  jpackage-utils
14 BuildRequires:  rpm-javaprov
15 BuildRequires:  rpmbuild(macros) >= 1.300
16 Requires:       jpackage-utils
17 Requires:       jre >= 1.6
18 Requires(post): /sbin/chkconfig
19 Requires(preun):        /sbin/chkconfig
20 Requires:       rc-scripts
21 BuildArch:      noarch
22 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
24 %description
25 Graylog2 is an open source syslog implementation that stores logs in
26 MongoDB. It consists of a server written in Java that accepts syslog
27 messages via TCP or UDP and stores them in the database.
28
29 %prep
30 %setup -q
31
32 %install
33 rm -rf $RPM_BUILD_ROOT
34 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_javadir},%{_initrddir}}
35 # Install the application
36 cp -p %{name}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
37 ln -s %{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
38
39 # Install the config file
40 cp -p graylog2.conf.example $RPM_BUILD_ROOT%{_sysconfdir}/graylog2.conf
41
42 # Install the init script
43 install -d $RPM_BUILD_ROOT
44 install -p %{SOURCE1} $RPM_BUILD_ROOT%{_initrddir}/%{name}
45
46 # Create the log directory
47 install -d $RPM_BUILD_ROOT%{_localstatedir}/log/%{name}
48
49 %clean
50 rm -rf $RPM_BUILD_ROOT
51
52 %post
53 /sbin/chkconfig --add %{name}
54 %service %{name} restart
55
56 %preun
57 if [ "$1" = 0 ]; then
58         %service %{name} stop
59         /sbin/chkconfig --del %{name}
60 fi
61
62 %files
63 %defattr(644,root,root,755)
64 %doc README graylog2.conf.example build_date
65 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/graylog2.conf
66 %attr(754,root,root) /etc/rc.d/init.d/graylog2-server
67 %{_javadir}/graylog2-server*.jar
68 %dir %{_localstatedir}/log/%{name}
This page took 0.379551 seconds and 3 git commands to generate.