]> git.pld-linux.org Git - packages/cassandra-bin.git/blame - cassandra-bin.spec
- Version 0.7.4-1.
[packages/cassandra-bin.git] / cassandra-bin.spec
CommitLineData
3f05bde6 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
16c24e02
MK
5# cassandra - memlock unlimited
6# to /etc/security/limits.conf ?
3f05bde6 7
3f05bde6 8%define shname cassandra
f60c3231 9%include /usr/lib/rpm/macros.java
087ae4ed
MK
10Summary: Cassandra database binary package
11Summary(pl.UTF-8): Baza danych Cassandra wersja binarna.
12Name: cassandra-bin
1d458944 13Version: 0.7.4
fc4db3ec 14Release: 1
3f05bde6
MK
15License: ASF
16Group: Applications/Databases
0dc347f9 17Source0: http://ftp.tpnet.pl/vol/d1/apache//cassandra/%{version}/apache-cassandra-%{version}-bin.tar.gz
1d458944 18# Source0-md5: ee0d7ac9b73dedb0a5dca1c34499c2d5
087ae4ed
MK
19Source1: cassandra.in.sh
20Source2: %{shname}.init
3f05bde6
MK
21URL: http://cassandra.apache.org/
22BuildRequires: rpm-javaprov
23BuildRequires: rpmbuild(macros) >= 1.300
f60c3231
ER
24Requires(post,preun): /sbin/chkconfig
25Requires: rc-scripts
dd8de5bc 26Suggests: java-jna
3f05bde6
MK
27BuildArch: noarch
28BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30%description
087ae4ed
MK
31Cassandra brings together the distributed systems technologies from
32Dynamo and the data model from Google's BigTable. Like Dynamo,
33Cassandra is eventually consistent. Like BigTable, Cassandra provides
34a ColumnFamily-based data model richer than typical key/value systems.
3f05bde6
MK
35
36%description -l pl.UTF-8
087ae4ed 37Cassandra łaczy technologie systemów rozproszonych z Dynamo i model
fc4db3ec 38danych z Googlowskiego BigTable. Tak jak Dynamo, Cassandra jest
087ae4ed
MK
39ostatecznie spójna. Tak jak BigTable daje do dyspozycji model danych
40oparty na ColumnFamily bogatszy niż typowwe systemy klucza i wartości.
3f05bde6
MK
41
42%prep
b51a24b8 43%setup -q -n apache-cassandra-%{version}
3f05bde6 44
3f05bde6
MK
45%install
46rm -rf $RPM_BUILD_ROOT
47install -d $RPM_BUILD_ROOT%{_javadir}
087ae4ed
MK
48install -d $RPM_BUILD_ROOT%{_sysconfdir}/%{shname}/
49install -d $RPM_BUILD_ROOT%{_datadir}/%{shname}
50install -d $RPM_BUILD_ROOT/etc/rc.d/init.d/
51cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/%{shname}
52cp -p lib/*.jar $RPM_BUILD_ROOT%{_datadir}/%{shname}
53install -d $RPM_BUILD_ROOT%{_sbindir}
54cp -p bin/cassandra $RPM_BUILD_ROOT%{_sbindir}
55install -d $RPM_BUILD_ROOT%{_bindir}
56cp -p bin/cassandra-cli $RPM_BUILD_ROOT%{_bindir}
57cp -p bin/nodetool $RPM_BUILD_ROOT%{_bindir}
58cp -p bin/clustertool $RPM_BUILD_ROOT%{_bindir}
59cp -p bin/json2sstable $RPM_BUILD_ROOT%{_bindir}
60cp -p bin/sstable2json $RPM_BUILD_ROOT%{_bindir}
61cp -p bin/schematool $RPM_BUILD_ROOT%{_bindir}
62cp -p bin/config-converter $RPM_BUILD_ROOT%{_bindir}
63cp -p bin/sstablekeys $RPM_BUILD_ROOT%{_bindir}
3f05bde6 64install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/cassandra
087ae4ed
MK
65install -d $RPM_BUILD_ROOT/var/lib/%{shname}/commitlog
66install -d $RPM_BUILD_ROOT/var/lib/%{shname}/data
67install -d $RPM_BUILD_ROOT/var/lib/%{shname}/saved_caches
68install -d $RPM_BUILD_ROOT/var/lib/%{shname}/conf
3f05bde6
MK
69cp -p conf/log4j-server.properties $RPM_BUILD_ROOT/var/lib/%{shname}/conf
70cp -p conf/cassandra.yaml $RPM_BUILD_ROOT/var/lib/%{shname}/conf
71cp -p conf/cassandra-env.sh $RPM_BUILD_ROOT/var/lib/%{shname}/conf
72cp -p conf/access.properties $RPM_BUILD_ROOT/var/lib/%{shname}/conf
73cp -p conf/passwd.properties $RPM_BUILD_ROOT/var/lib/%{shname}/conf
74cp -p conf/cassandra-topology.properties $RPM_BUILD_ROOT/var/lib/%{shname}/conf
75cp -p conf/README.txt $RPM_BUILD_ROOT/var/lib/%{shname}/conf
087ae4ed
MK
76install -d $RPM_BUILD_ROOT/var/run/%{shname}
77install -d $RPM_BUILD_ROOT/var/log/%{shname}
3f05bde6
MK
78
79%clean
80rm -rf $RPM_BUILD_ROOT
81
82%pre
3f05bde6
MK
83%groupadd -g 259 -r cassandra
84%useradd -M -o -r -u 259 -d /var/lib/%{shname} -s /bin/sh -g cassandra -c "Cassandra Server" cassandra
85
f60c3231
ER
86%post
87/sbin/chkconfig --add cassandra
88%service cassandra restart
89
3f05bde6
MK
90%preun
91if [ "$1" = "0" ]; then
f60c3231
ER
92 %service cassandra stop
93 /sbin/chkconfig --del cassandra
3f05bde6
MK
94fi
95
3f05bde6
MK
96%files
97%defattr(644,root,root,755)
98%doc CHANGES.txt LICENSE.txt README.txt NEWS.txt NOTICE.txt
99%attr(754,root,root) /etc/rc.d/init.d/cassandra
100%attr(755,root,root) %{_bindir}/cassandra-cli
101%attr(755,root,root) %{_bindir}/nodetool
102%attr(755,root,root) %{_bindir}/clustertool
103%attr(755,root,root) %{_bindir}/json2sstable
104%attr(755,root,root) %{_bindir}/sstable2json
105%attr(755,root,root) %{_bindir}/schematool
106%attr(755,root,root) %{_bindir}/config-converter
107%attr(755,root,root) %{_bindir}/sstablekeys
108%attr(755,root,root) %{_sbindir}/cassandra
087ae4ed 109%{_datadir}/%{shname}
3f05bde6
MK
110%attr(750,cassandra,cassandra) %dir /var/lib/%{shname}
111%attr(750,root,cassandra) %dir /var/lib/%{shname}/conf
087ae4ed
MK
112%attr(640,root,cassandra) %config(noreplace) %verify(not md5 mtime size) /var/lib/%{shname}/conf/*.properties
113%attr(755,root,cassandra) %config(noreplace) %verify(not md5 mtime size) /var/lib/%{shname}/conf/*.sh
3f05bde6 114%attr(640,root,cassandra) /var/lib/%{shname}/conf/*.txt
087ae4ed 115%attr(640,root,cassandra) %config(noreplace) %verify(not md5 mtime size) /var/lib/%{shname}/conf/*.yaml
3f05bde6
MK
116%attr(750,cassandra,cassandra) %dir /var/run/%{shname}
117%attr(750,cassandra,cassandra) %dir /var/log/%{shname}
This page took 0.102165 seconds and 4 git commands to generate.