]> git.pld-linux.org Git - packages/cassandra-bin.git/blob - cassandra-bin.spec
Version 1.1.12-1
[packages/cassandra-bin.git] / cassandra-bin.spec
1 # TODO: Fix .init cassandra status does not work now.
2 # TODO: Fix .init stop routine it is now subset of PLD default one
3 # TODO: Fix of data/ cassandra created dirs/files privilages (now they are all readable)
4 # TODO: Consider adding
5 #               cassandra       -       memlock unlimited
6 #   to /etc/security/limits.conf ?
7
8 %define shname cassandra
9 %include        /usr/lib/rpm/macros.java
10 Summary:        Cassandra database binary package
11 Summary(pl.UTF-8):      Binarna redystrybucja bazy danych Cassandra
12 Name:           cassandra-bin
13 Version:        1.1.12
14 Release:        1
15 License:        ASF
16 Group:          Applications/Databases
17 Source0:        ftp://ftp.task.gda.pl/pub/www/apache/dist/cassandra/%{version}/apache-cassandra-%{version}-bin.tar.gz
18 Source1:        cassandra.in.sh
19 Source2:        %{shname}.init
20 Source3:        %{name}.tmpfiles
21 Patch0:         %{name}-jamm_path_fix.patch
22 URL:            http://cassandra.apache.org/
23 BuildRequires:  rpm-javaprov
24 BuildRequires:  rpmbuild(macros) >= 1.300
25 Requires(post,preun):   /sbin/chkconfig
26 Requires:       rc-scripts
27 Suggests:       java-jna
28 BuildArch:      noarch
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31 %description
32 Cassandra brings together the distributed systems technologies from
33 Dynamo and the data model from Google's BigTable. Like Dynamo,
34 Cassandra is eventually consistent. Like BigTable, Cassandra provides
35 a ColumnFamily-based data model richer than typical key/value systems.
36
37 %description -l pl.UTF-8
38 Cassandra łączy technologie systemów rozproszonych z Dynamo i model
39 danych z googlowskiego BigTable. Tak jak Dynamo, Cassandra jest
40 ostatecznie spójna. Tak jak BigTable daje do dyspozycji model danych
41 oparty na ColumnFamily, bogatszy niż typowe systemy klucza i wartości.
42
43 %prep
44 %setup -q -n apache-cassandra-%{version}
45 %patch0 -p1
46
47 %install
48 rm -rf $RPM_BUILD_ROOT
49 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d/,%{_sysconfdir}/%{shname},%{_bindir},%{_sbindir},%{_datadir}/%{shname}} \
50         $RPM_BUILD_ROOT/var/{lib/%{shname}/{commitlog,conf,data,saved_caches},{log,run}/%{shname}} \
51         $RPM_BUILD_ROOT%{systemdtmpfilesdir}
52
53 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/cassandra
54 cp -p bin/{*sstable*,*tool,cassandra-cli} $RPM_BUILD_ROOT%{_bindir}
55 cp -p bin/cassandra $RPM_BUILD_ROOT%{_sbindir}
56 cp -p %{SOURCE1} lib/*.jar $RPM_BUILD_ROOT%{_datadir}/%{shname}
57 cp -p conf/{*.properties,cassandra-env.sh,cassandra.yaml,README.txt} $RPM_BUILD_ROOT/var/lib/%{shname}/conf
58
59 install %{SOURCE3} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{shname}.conf
60
61 %clean
62 rm -rf $RPM_BUILD_ROOT
63
64 %pre
65 %groupadd -g 259 -r cassandra
66 %useradd -M -o -r -u 259 -d /var/lib/%{shname} -s /bin/sh -g cassandra -c "Cassandra Server" cassandra
67
68 %post
69 /sbin/chkconfig --add cassandra
70 %service cassandra restart
71
72 %preun
73 if [ "$1" = "0" ]; then
74         %service cassandra stop
75         /sbin/chkconfig --del cassandra
76 fi
77
78 %files
79 %defattr(644,root,root,755)
80 %doc CHANGES.txt LICENSE.txt README.txt NEWS.txt NOTICE.txt
81 %attr(754,root,root) /etc/rc.d/init.d/cassandra
82 %attr(755,root,root) %{_bindir}/cassandra-cli
83 %attr(755,root,root) %{_bindir}/nodetool
84 %attr(755,root,root) %{_bindir}/json2sstable
85 %attr(755,root,root) %{_bindir}/sstable2json
86 %attr(755,root,root) %{_bindir}/sstablescrub
87 %attr(755,root,root) %{_bindir}/sstablekeys
88 %attr(755,root,root) %{_bindir}/sstableloader
89 %attr(755,root,root) %{_sbindir}/cassandra
90 %{_datadir}/%{shname}
91 %{systemdtmpfilesdir}/%{shname}.conf
92 %attr(750,cassandra,cassandra) %dir /var/lib/%{shname}
93 %attr(750,root,cassandra) %dir /var/lib/%{shname}/conf
94 %attr(640,root,cassandra) %config(noreplace) %verify(not md5 mtime size) /var/lib/%{shname}/conf/*.properties
95 %attr(755,root,cassandra) %config(noreplace) %verify(not md5 mtime size) /var/lib/%{shname}/conf/*.sh
96 %attr(640,root,cassandra) /var/lib/%{shname}/conf/*.txt
97 %attr(640,root,cassandra) %config(noreplace) %verify(not md5 mtime size) /var/lib/%{shname}/conf/*.yaml
98 %attr(750,cassandra,cassandra) %dir /var/log/%{shname}
99 %attr(750,cassandra,cassandra) %dir /var/run/%{shname}
This page took 0.080981 seconds and 3 git commands to generate.