]> git.pld-linux.org Git - packages/mongodb.git/blobdiff - mongodb.spec
- formatting
[packages/mongodb.git] / mongodb.spec
index faaaa62f8764cb4569118706189374c8039fe8eb..496e06c12b84b9aa0707819dc6d8bceecb1d8586 100644 (file)
@@ -1,16 +1,18 @@
-# TODO: pass rpmldflags, rpmcppflags
+# TODO: pass rpmldflags
 Summary:       MongoDB client shell and tools
 Summary(pl.UTF-8):     Powłoka kliencka i narzędzia dla bazy danych MongoDB
 Name:          mongodb
-Version:       1.8.3
-Release:       0.1
-License:       AGPL 3.0
+Version:       2.0.1
+Release:       4
+License:       AGPL v3
 Group:         Applications/Databases
 Source0:       http://downloads.mongodb.org/src/%{name}-src-r%{version}.tar.gz
-# Source0-md5: 662e7ad6ff9f8e4d16c72c038b4a0c60
+# Source0-md5: cb8579074b7c9752eb382a2094ac4523
 Source1:       %{name}.logrotate
 Source2:       %{name}.init
 Patch0:                config.patch
+Patch1:                %{name}-system-libs.patch
+Patch2:                %{name}-build.patch
 URL:           http://www.mongodb.org/
 BuildRequires: boost-devel >= 1.42
 BuildRequires: libpcap-devel
@@ -21,6 +23,7 @@ BuildRequires:        readline-devel
 BuildRequires: rpmbuild(macros) >= 1.228
 BuildRequires: scons >= 1.2
 BuildRequires: sed >= 4.0
+BuildRequires: snappy-devel
 BuildRequires: v8-devel
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -99,8 +102,6 @@ Summary:     MongoDB server, sharding server, and support scripts
 Summary(pl.UTF-8):     Serwer MongoDB, serwer dzielący oraz skrypty pomocnicze
 Group:         Applications/Databases
 Requires:      %{name} = %{version}-%{release}
-Provides:      group(mongod)
-Provides:      user(mongod)
 Requires(post,preun):  /sbin/chkconfig
 Requires(postun):      /usr/sbin/groupdel
 Requires(postun):      /usr/sbin/userdel
@@ -109,6 +110,9 @@ Requires(pre):      /usr/bin/getgid
 Requires(pre): /usr/sbin/groupadd
 Requires(pre): /usr/sbin/useradd
 Requires:      rc-scripts
+Provides:      group(mongod)
+Provides:      user(mongod)
+Conflicts:     logrotate < 3.8.0
 
 %description server
 Mongo (from "huMONGOus") is a schema-free document-oriented database.
@@ -126,11 +130,16 @@ konfiguracji oraz skrypty init.d.
 %prep
 %setup -q -n %{name}-src-r%{version}
 %patch0 -p1
-%{__sed} -i 's,-O3,%{rpmcxxflags},;/,\.\.\/v8/d' SConstruct
+%patch1 -p1
+%patch2 -p1
+%{__sed} -i -e 's,-O3,%{rpmcxxflags} %{rpmcppflags},' SConstruct
 
 # Fix permissions
 find -type f -executable | xargs chmod a-x
 
+# force system pcre/js/snappy
+%{__rm} -r third_party/{js-1.7,pcre-7.4,snappy,*.py}
+
 %build
 %scons \
        --prefix=$RPM_BUILD_ROOT%{_prefix} \
@@ -139,19 +148,19 @@ find -type f -executable | xargs chmod a-x
        --usev8 \
        --cxx=%{__cxx}
 
-# XXX really should have shared library here
-
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_mandir}/man1} \
        $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig} \
        $RPM_BUILD_ROOT%{_var}/{lib,log}/mongo
 
+# XXX: scons is so great, recompiles everything here!
 %scons install \
        --prefix=$RPM_BUILD_ROOT%{_prefix} \
        --sharedclient \
        --full \
-       --usev8
+       --usev8 \
+       --cxx=%{__cxx}
 
 cp -p %{SOURCE1} $RPM_BUILD_ROOT/etc/logrotate.d/mongod
 install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mongod
@@ -190,6 +199,7 @@ fi
 %files
 %defattr(644,root,root,755)
 %doc README GNU-AGPL-3.0.txt
+%attr(755,root,root) %{_bindir}/bsondump
 %attr(755,root,root) %{_bindir}/mongo
 %attr(755,root,root) %{_bindir}/mongodump
 %attr(755,root,root) %{_bindir}/mongoexport
@@ -198,7 +208,8 @@ fi
 %attr(755,root,root) %{_bindir}/mongorestore
 %attr(755,root,root) %{_bindir}/mongosniff
 %attr(755,root,root) %{_bindir}/mongostat
-%attr(755,root,root) %{_bindir}/bsondump
+%attr(755,root,root) %{_bindir}/mongotop
+%{_mandir}/man1/bsondump.1*
 %{_mandir}/man1/mongo.1*
 %{_mandir}/man1/mongodump.1*
 %{_mandir}/man1/mongoexport.1*
This page took 0.027638 seconds and 4 git commands to generate.