]> git.pld-linux.org Git - packages/cassandra-bin.git/blobdiff - cassandra-bin.spec
automatic change: use py_build/py_install macros
[packages/cassandra-bin.git] / cassandra-bin.spec
index 20f90b63ac11c3f41b1ebb0db08d46d976f35c6d..7606862c9cc3079e9d8938b4ec286881908e2d93 100644 (file)
 Summary:       Cassandra database binary package
 Summary(pl.UTF-8):     Binarna redystrybucja bazy danych Cassandra
 Name:          cassandra-bin
-Version:       1.0.11
+Version:       2.0.17
 Release:       1
 License:       ASF
 Group:         Applications/Databases
-Source0:       http://www.eu.apache.org/dist/cassandra/%{version}/apache-cassandra-%{version}-bin.tar.gz
-# Source0-md5: be2d87062b7184602f417fd9a4618f67
-
+Source0:       ftp://ftp.task.gda.pl/pub/www/apache/dist/cassandra/%{version}/apache-cassandra-%{version}-bin.tar.gz
+# Source0-md5: 5c3a1dd76f5261900e3f165f3e964815
 Source1:       cassandra.in.sh
 Source2:       %{shname}.init
 Source3:       %{name}.tmpfiles
 Patch0:                %{name}-jamm_path_fix.patch
+Patch1:                %{name}-cqlsh_path_fix.patch
 URL:           http://cassandra.apache.org/
+BuildRequires: python-distribute
 BuildRequires: rpm-javaprov
+BuildRequires: rpm-pythonprov
 BuildRequires: rpmbuild(macros) >= 1.300
 Requires(post,preun):  /sbin/chkconfig
+Requires:      python
+Requires:      python-modules
 Requires:      rc-scripts
 Suggests:      java-jna
 BuildArch:     noarch
@@ -45,20 +49,36 @@ oparty na ColumnFamily, bogatszy niż typowe systemy klucza i wartości.
 %prep
 %setup -q -n apache-cassandra-%{version}
 %patch0 -p1
+%patch1 -p1
+
+%build
+# current version of cqlsh supports only python 2.
+cd pylib
+%py_build %{?with_tests:test}
+cd ..
 
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d/,%{_sysconfdir}/%{shname},%{_bindir},%{_sbindir},%{_datadir}/%{shname}} \
        $RPM_BUILD_ROOT/var/{lib/%{shname}/{commitlog,conf,data,saved_caches},{log,run}/%{shname}} \
-       $RPM_BUILD_ROOT/usr/lib/tmpfiles.d
+       $RPM_BUILD_ROOT%{systemdtmpfilesdir}
+
+cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/cassandra
 
-install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/cassandra
-cp -p bin/{*sstable*,*tool,cassandra-cli} $RPM_BUILD_ROOT%{_bindir}
+rm bin/*.bat
+cp -p bin/{cqlsh,*sstable*,*tool,cassandra-cli} $RPM_BUILD_ROOT%{_bindir}
 cp -p bin/cassandra $RPM_BUILD_ROOT%{_sbindir}
 cp -p %{SOURCE1} lib/*.jar $RPM_BUILD_ROOT%{_datadir}/%{shname}
+# use bundled libs for python-cql - from cqlsh doc
+cp -p %{SOURCE1} lib/cql-internal-only-1.4.2.zip $RPM_BUILD_ROOT%{_datadir}/%{shname}
+cp -p %{SOURCE1} lib/thrift-python-internal-only-0.9.1.zip $RPM_BUILD_ROOT%{_datadir}/%{shname}
 cp -p conf/{*.properties,cassandra-env.sh,cassandra.yaml,README.txt} $RPM_BUILD_ROOT/var/lib/%{shname}/conf
 
-install %{SOURCE3} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/%{shname}.conf
+cp -p %{SOURCE3} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{shname}.conf
+
+cd pylib
+%py_install
+cd ..
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -79,20 +99,21 @@ fi
 
 %files
 %defattr(644,root,root,755)
-%doc CHANGES.txt LICENSE.txt README.txt NEWS.txt NOTICE.txt
+%doc CHANGES.txt LICENSE.txt NEWS.txt NOTICE.txt
 %attr(754,root,root) /etc/rc.d/init.d/cassandra
 %attr(755,root,root) %{_bindir}/cassandra-cli
+%attr(755,root,root) %{_bindir}/cqlsh
 %attr(755,root,root) %{_bindir}/nodetool
-# %attr(755,root,root) %{_bindir}/clustertool
 %attr(755,root,root) %{_bindir}/json2sstable
 %attr(755,root,root) %{_bindir}/sstable2json
-%attr(755,root,root) %{_bindir}/sstableloader
-# %attr(755,root,root) %{_bindir}/schematool
-# %attr(755,root,root) %{_bindir}/config-converter
+%attr(755,root,root) %{_bindir}/sstablescrub
 %attr(755,root,root) %{_bindir}/sstablekeys
+%attr(755,root,root) %{_bindir}/sstableloader
+%attr(755,root,root) %{_bindir}/sstablesplit
+%attr(755,root,root) %{_bindir}/sstableupgrade
 %attr(755,root,root) %{_sbindir}/cassandra
 %{_datadir}/%{shname}
-/usr/lib/tmpfiles.d/%{shname}.conf
+%{systemdtmpfilesdir}/%{shname}.conf
 %attr(750,cassandra,cassandra) %dir /var/lib/%{shname}
 %attr(750,root,cassandra) %dir /var/lib/%{shname}/conf
 %attr(640,root,cassandra) %config(noreplace) %verify(not md5 mtime size) /var/lib/%{shname}/conf/*.properties
@@ -101,3 +122,7 @@ fi
 %attr(640,root,cassandra) %config(noreplace) %verify(not md5 mtime size) /var/lib/%{shname}/conf/*.yaml
 %attr(750,cassandra,cassandra) %dir /var/log/%{shname}
 %attr(750,cassandra,cassandra) %dir /var/run/%{shname}
+%{py_sitescriptdir}/cqlshlib
+%if "%{py_ver}" > "2.4"
+       %{py_sitescriptdir}/cassandra_pylib-0.0.0-py*.egg-info
+%endif
This page took 0.074832 seconds and 4 git commands to generate.