]> git.pld-linux.org Git - packages/rethinkdb.git/commitdiff
omit shell wrappers, install .py scripts directly with shebang
authorElan Ruusamäe <glen@delfi.ee>
Wed, 28 Aug 2013 18:53:41 +0000 (21:53 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Wed, 28 Aug 2013 18:53:41 +0000 (21:53 +0300)
rethinkdb.spec

index 7f93cd70e3825c4fad5c868f9b6e299511c58306..9e9224116bcc484ce07b021a3ca2d78497fac2c8 100644 (file)
@@ -20,6 +20,7 @@ BuildRequires:        npm
 BuildRequires: openssl-devel
 BuildRequires: protobuf-devel
 #BuildRequires:        python-pip
+BuildRequires: sed >= 4.0
 BuildRequires: v8-devel
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -31,6 +32,8 @@ administration.
 %prep
 %setup -q
 
+%{__sed} -i -e '1s,^#!.*python,#!%{__python},' scripts/backup/*.py
+
 %build
 CXX="%{__cxx}"
 if [ "$CXX" != "${CXX#ccache }" ]; then
@@ -60,6 +63,12 @@ rm -rf $RPM_BUILD_ROOT
        STRIP_ON_INSTALL=0 \
        DESTDIR=$RPM_BUILD_ROOT
 
+# omit the .py suffix, invoke tools directly without shell wrapper
+for a in $RPM_BUILD_ROOT%{_bindir}/rethinkdb-*.py; do
+       f=${a%.py}
+       mv -f $a $f
+done
+
 %{__rm} $RPM_BUILD_ROOT%{_datadir}/%{name}/etc/bash_completion.d/rethinkdb.bash
 %{__rm} $RPM_BUILD_ROOT%{_docdir}/%{name}/copyright
 
@@ -76,13 +85,9 @@ install -d $RPM_BUILD_ROOT/var/lib/rethinkdb/instances.d
 %attr(754,root,root) /etc/rc.d/init.d/rethinkdb
 %attr(755,root,root) %{_bindir}/rethinkdb
 %attr(755,root,root) %{_bindir}/rethinkdb-dump
-%attr(755,root,root) %{_bindir}/rethinkdb-dump.py
 %attr(755,root,root) %{_bindir}/rethinkdb-export
-%attr(755,root,root) %{_bindir}/rethinkdb-export.py
 %attr(755,root,root) %{_bindir}/rethinkdb-import
-%attr(755,root,root) %{_bindir}/rethinkdb-import.py
 %attr(755,root,root) %{_bindir}/rethinkdb-restore
-%attr(755,root,root) %{_bindir}/rethinkdb-restore.py
 %{_mandir}/man1/rethinkdb.1*
 
 /etc/bash_completion.d/rethinkdb.bash
This page took 0.078559 seconds and 4 git commands to generate.