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