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