]> git.pld-linux.org Git - packages/cassandra-bin.git/blame - cassandra-bin.spec
Version 2.0.16-1.
[packages/cassandra-bin.git] / cassandra-bin.spec
CommitLineData
4e6d3cb2 1# TODO: Fix .init cassandra status does not work now.
16c24e02
MK
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)
f60c3231 4# TODO: Consider adding
4e6d3cb2 5# cassandra - memlock unlimited
16c24e02 6# to /etc/security/limits.conf ?
3f05bde6 7
4e6d3cb2 8%define shname cassandra
f60c3231 9%include /usr/lib/rpm/macros.java
087ae4ed 10Summary: Cassandra database binary package
4e6d3cb2 11Summary(pl.UTF-8): Binarna redystrybucja bazy danych Cassandra
087ae4ed 12Name: cassandra-bin
fdc8d9a4
MK
13Version: 2.0.16
14Release: 1
3f05bde6
MK
15License: ASF
16Group: Applications/Databases
b4f49f9b 17Source0: ftp://ftp.task.gda.pl/pub/www/apache/dist/cassandra/%{version}/apache-cassandra-%{version}-bin.tar.gz
fdc8d9a4 18# Source0-md5: 17f4dac611c1eae631a27b1105164920
087ae4ed
MK
19Source1: cassandra.in.sh
20Source2: %{shname}.init
687fc4b6 21Source3: %{name}.tmpfiles
40af29a9 22Patch0: %{name}-jamm_path_fix.patch
93a9c726 23Patch1: %{name}-cqlsh_path_fix.patch
3f05bde6 24URL: http://cassandra.apache.org/
fdc8d9a4 25BuildRequires: python-distribute
3f05bde6 26BuildRequires: rpm-javaprov
fdc8d9a4 27BuildRequires: rpm-pythonprov
3f05bde6 28BuildRequires: rpmbuild(macros) >= 1.300
f60c3231 29Requires(post,preun): /sbin/chkconfig
fdc8d9a4
MK
30Requires: python
31Requires: python-modules
f60c3231 32Requires: rc-scripts
dd8de5bc 33Suggests: java-jna
3f05bde6
MK
34BuildArch: noarch
35BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37%description
087ae4ed
MK
38Cassandra brings together the distributed systems technologies from
39Dynamo and the data model from Google's BigTable. Like Dynamo,
40Cassandra is eventually consistent. Like BigTable, Cassandra provides
41a ColumnFamily-based data model richer than typical key/value systems.
3f05bde6
MK
42
43%description -l pl.UTF-8
4e6d3cb2
TP
44Cassandra łączy technologie systemów rozproszonych z Dynamo i model
45danych z googlowskiego BigTable. Tak jak Dynamo, Cassandra jest
087ae4ed 46ostatecznie spójna. Tak jak BigTable daje do dyspozycji model danych
4e6d3cb2 47oparty na ColumnFamily, bogatszy niż typowe systemy klucza i wartości.
3f05bde6
MK
48
49%prep
b51a24b8 50%setup -q -n apache-cassandra-%{version}
40af29a9 51%patch0 -p1
93a9c726
MK
52%patch1 -p1
53
54%build
55# current version of cqlsh supports only python 2.
56cd pylib
57%{__python} setup.py build --build-base build-2 %{?with_tests:test}
58cd ..
3f05bde6 59
3f05bde6
MK
60%install
61rm -rf $RPM_BUILD_ROOT
4e6d3cb2 62install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d/,%{_sysconfdir}/%{shname},%{_bindir},%{_sbindir},%{_datadir}/%{shname}} \
687fc4b6 63 $RPM_BUILD_ROOT/var/{lib/%{shname}/{commitlog,conf,data,saved_caches},{log,run}/%{shname}} \
b4f49f9b 64 $RPM_BUILD_ROOT%{systemdtmpfilesdir}
4e6d3cb2 65
fdc8d9a4 66cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/cassandra
93a9c726
MK
67
68rm bin/*.bat
69cp -p bin/{cqlsh,*sstable*,*tool,cassandra-cli} $RPM_BUILD_ROOT%{_bindir}
4e6d3cb2
TP
70cp -p bin/cassandra $RPM_BUILD_ROOT%{_sbindir}
71cp -p %{SOURCE1} lib/*.jar $RPM_BUILD_ROOT%{_datadir}/%{shname}
93a9c726 72# use bundled libs for python-cql - from cqlsh doc
fdc8d9a4 73cp -p %{SOURCE1} lib/cql-internal-only-1.4.2.zip $RPM_BUILD_ROOT%{_datadir}/%{shname}
93a9c726 74cp -p %{SOURCE1} lib/thrift-python-internal-only-0.9.1.zip $RPM_BUILD_ROOT%{_datadir}/%{shname}
4e6d3cb2 75cp -p conf/{*.properties,cassandra-env.sh,cassandra.yaml,README.txt} $RPM_BUILD_ROOT/var/lib/%{shname}/conf
3f05bde6 76
fdc8d9a4 77cp -p %{SOURCE3} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{shname}.conf
687fc4b6 78
93a9c726
MK
79cd pylib
80%{__python} setup.py \
81 build --build-base build-2 \
82 install --skip-build \
83 --optimize=2 \
84 --root=$RPM_BUILD_ROOT
85cd ..
86
3f05bde6
MK
87%clean
88rm -rf $RPM_BUILD_ROOT
89
90%pre
3f05bde6
MK
91%groupadd -g 259 -r cassandra
92%useradd -M -o -r -u 259 -d /var/lib/%{shname} -s /bin/sh -g cassandra -c "Cassandra Server" cassandra
93
f60c3231
ER
94%post
95/sbin/chkconfig --add cassandra
96%service cassandra restart
97
3f05bde6
MK
98%preun
99if [ "$1" = "0" ]; then
f60c3231
ER
100 %service cassandra stop
101 /sbin/chkconfig --del cassandra
3f05bde6
MK
102fi
103
3f05bde6
MK
104%files
105%defattr(644,root,root,755)
93a9c726 106%doc CHANGES.txt LICENSE.txt NEWS.txt NOTICE.txt
3f05bde6
MK
107%attr(754,root,root) /etc/rc.d/init.d/cassandra
108%attr(755,root,root) %{_bindir}/cassandra-cli
93a9c726 109%attr(755,root,root) %{_bindir}/cqlsh
3f05bde6 110%attr(755,root,root) %{_bindir}/nodetool
3f05bde6
MK
111%attr(755,root,root) %{_bindir}/json2sstable
112%attr(755,root,root) %{_bindir}/sstable2json
b4f49f9b 113%attr(755,root,root) %{_bindir}/sstablescrub
3f05bde6 114%attr(755,root,root) %{_bindir}/sstablekeys
b4f49f9b 115%attr(755,root,root) %{_bindir}/sstableloader
c187b9d9
MGB
116%attr(755,root,root) %{_bindir}/sstablesplit
117%attr(755,root,root) %{_bindir}/sstableupgrade
3f05bde6 118%attr(755,root,root) %{_sbindir}/cassandra
087ae4ed 119%{_datadir}/%{shname}
b4f49f9b 120%{systemdtmpfilesdir}/%{shname}.conf
3f05bde6
MK
121%attr(750,cassandra,cassandra) %dir /var/lib/%{shname}
122%attr(750,root,cassandra) %dir /var/lib/%{shname}/conf
087ae4ed
MK
123%attr(640,root,cassandra) %config(noreplace) %verify(not md5 mtime size) /var/lib/%{shname}/conf/*.properties
124%attr(755,root,cassandra) %config(noreplace) %verify(not md5 mtime size) /var/lib/%{shname}/conf/*.sh
3f05bde6 125%attr(640,root,cassandra) /var/lib/%{shname}/conf/*.txt
087ae4ed 126%attr(640,root,cassandra) %config(noreplace) %verify(not md5 mtime size) /var/lib/%{shname}/conf/*.yaml
3f05bde6 127%attr(750,cassandra,cassandra) %dir /var/log/%{shname}
4e6d3cb2 128%attr(750,cassandra,cassandra) %dir /var/run/%{shname}
93a9c726
MK
129%{py_sitescriptdir}/cqlshlib
130%if "%{py_ver}" > "2.4"
131 %{py_sitescriptdir}/cassandra_pylib-0.0.0-py*.egg-info
132%endif
This page took 0.582263 seconds and 4 git commands to generate.