]> git.pld-linux.org Git - packages/mongodb.git/blobdiff - mongodb.spec
- rebuild with boost 1.56.0
[packages/mongodb.git] / mongodb.spec
index 8443be5075149bd92fd2296bbe7140a43c3c49c3..c0c5ac02fc2cd751d8a28e169acc89a115f1a8a1 100644 (file)
@@ -1,16 +1,15 @@
 # TODO:
 #      - add support for sharding server (init scripts, systemd units, sample config)
-#      - fix 'libs' subpackage (disabled due to broken 'sharedclient' build option)
 #
 Summary:       MongoDB client shell and tools
 Summary(pl.UTF-8):     Powłoka kliencka i narzędzia dla bazy danych MongoDB
 Name:          mongodb
-Version:       2.2.2
-Release:       4
+Version:       2.2.4
+Release:       3
 License:       AGPL v3
 Group:         Applications/Databases
 Source0:       http://downloads.mongodb.org/src/%{name}-src-r%{version}.tar.gz
-# Source0-md5: 697c448271358545a8a40a973f88edf4
+# Source0-md5: 033354c543c053f5d539b573ac8c28b0
 Source1:       %{name}.logrotate
 Source2:       %{name}.init
 Source3:       mongod-default.conf
@@ -19,6 +18,7 @@ Patch0:               %{name}-cflags.patch
 Patch1:                %{name}-system-libs.patch
 Patch2:                boost-1.50.patch
 Patch3:                %{name}-install.patch
+Patch4:                %{name}-shared.patch
 URL:           http://www.mongodb.org/
 BuildRequires: boost-devel >= 1.50
 BuildRequires: libpcap-devel
@@ -34,7 +34,7 @@ BuildRequires:        scons >= 1.2
 BuildRequires: sed >= 4.0
 BuildRequires: snappy-devel
 BuildRequires: v8-devel
-#Requires:     %{name}-libs = %{version}-%{release}
+Requires:      %{name}-libs = %{version}-%{release}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -75,8 +75,7 @@ Ten pakiet zawiera bibliotekę kliencką mongo.
 Summary:       Header files for MongoDB client library
 Summary(pl.UTF-8):     Pliki nagłówkowe biblioteki klienckiej MongoDB
 Group:         Development/Libraries
-#Requires:     %{name}-libs = %{version}-%{release}
-Requires:      %{name}-static = %{version}-%{release}
+Requires:      %{name}-libs = %{version}-%{release}
 
 %description devel
 Mongo (from "huMONGOus") is a schema-free document-oriented database.
@@ -95,7 +94,7 @@ oprogramowania klienckiego dla MongoDB.
 Summary:       Static MongoDB client library
 Summary(pl.UTF-8):     Statyczna biblioteka kliencka MongoDB
 Group:         Development/Libraries
-#Requires:     %{name}-libs = %{version}-%{release}
+Requires:      %{name}-devel = %{version}-%{release}
 
 %description static
 Mongo (from "huMONGOus") is a schema-free document-oriented database.
@@ -145,6 +144,7 @@ konfiguracji oraz skrypty init.d.
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
 
 # Fix permissions
 find -type f -executable | xargs chmod a-x
@@ -159,6 +159,7 @@ find -type f -executable | xargs chmod a-x
        --extralib=pcrecpp,pcre,snappy \
        --prefix=$RPM_BUILD_ROOT%{_prefix} \
        --full=all \
+       --sharedclient \
        --usev8 \
        --cxx=%{__cxx}
 
@@ -171,30 +172,37 @@ install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_mandir}/man1} \
 
 # XXX: scons is so great, recompiles everything here!
 %scons install \
+       CPPFLAGS="%{rpmcppflags} -DXP_UNIX" \
        --use-system-all=yes \
        --extralib=pcrecpp,pcre,snappy \
        --prefix=$RPM_BUILD_ROOT%{_prefix} \
        --full=all \
+       --sharedclient \
        --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
 cp -p rpm/mongod.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/mongod
-install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/mongod/default.conf
+cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/mongod/default.conf
 cp -p debian/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
 
 # mask out the LSB service
 ln -s /dev/null $RPM_BUILD_ROOT%{systemdunitdir}/mongod.service
-install %{SOURCE4} $RPM_BUILD_ROOT%{systemdunitdir}/mongod@.service
+cp -p %{SOURCE4} $RPM_BUILD_ROOT%{systemdunitdir}/mongod@.service
 
 touch $RPM_BUILD_ROOT%{_var}/log/mongodb/mongod.log
 
 # for some reason these are installed twice, remove unwanted copies
-for f in $RPM_BUILD_ROOT%{_includedir}/mongo/* ; do
+for f in $RPM_BUILD_ROOT%{_includedir}/mongo/*; do
        rm -r "$RPM_BUILD_ROOT%{_includedir}/$(basename $f)" || :
 done
 
+%ifarch %{x8664}
+chmod -R a+rX $RPM_BUILD_ROOT/usr/lib
+%{__rm} -r $RPM_BUILD_ROOT/usr/lib
+%endif
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -267,11 +275,9 @@ fi
 %{_mandir}/man1/mongostat.1*
 %{_mandir}/man1/mongorestore.1*
 
-%if 0
 %files libs
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/libmongoclient.so
-%endif
 
 %files devel
 %defattr(644,root,root,755)
@@ -283,12 +289,13 @@ fi
 
 %files server
 %defattr(644,root,root,755)
-#%dir %{_sysconfdir}
 %dir %{_sysconfdir}/mongod
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mongod/default.conf
 %attr(754,root,root) /etc/rc.d/init.d/mongod
 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mongod
 %config(noreplace) /etc/logrotate.d/mongod
+%{systemdunitdir}/mongod.service
+%{systemdunitdir}/mongod@.service
 %attr(755,root,root) %{_bindir}/mongod
 %attr(755,root,root) %{_bindir}/mongos
 %{_mandir}/man1/mongod.1*
@@ -297,5 +304,3 @@ fi
 %attr(775,root,mongod) %dir %{_var}/log/mongodb
 %attr(775,root,mongod) %dir %{_var}/log/archive/mongodb
 %attr(640,mongod,mongod) %config(noreplace) %verify(not md5 mtime size) %{_var}/log/mongodb/mongod.log
-%{systemdunitdir}/mongod.service
-%{systemdunitdir}/mongod@.service
This page took 0.06926 seconds and 4 git commands to generate.