Browse Source

fix share/ path; add demo application; provide %options for rt, kjs and xbase; add libexec to PATH

Ralf S. Engelschall 20 years ago
parent
commit
9c8182eb90
2 changed files with 31 additions and 5 deletions
  1. 2 2
      rekall/rekall.patch
  2. 29 3
      rekall/rekall.spec

+ 2 - 2
rekall/rekall.patch

@@ -135,8 +135,8 @@ Index: libs/common/kb_locator_qt3.cpp
  
 -#define	DATAPATH	"/share/apps/rekallqt/"
 -#define	DOCPATH		"/share/doc/HTML/en/rekallqt/"
-+#define	DATAPATH	"/share/rekallqt/"
-+#define	DOCPATH		"/share/rekallqt/doc"
++#define	DATAPATH	"/share/rekall/"
++#define	DOCPATH		"/share/rekall/doc"
  
  /*  locateFile	: Locate a file of specified type			*/
  /*  type	: const char *	  : File type				*/

+ 29 - 3
rekall/rekall.spec

@@ -36,11 +36,15 @@ Version:      2.4.0
 Release:      20060115
 
 #   package options
-%option       with_pgsql  yes
+%option       with_rt     no
+%option       with_kjs    yes
+%option       with_xbase  yes
+%option       with_pgsql  no
 %option       with_mysql  no
 
 #   list of sources
 Source0:      http://www.rekallrevealed.org/packages/rekall-%{version}.tar.gz
+Source1:      http://www.rekallrevealed.org/packages/RekallDemo.tgz
 Patch0:       rekall.patch
 
 #   build information
@@ -74,6 +78,7 @@ AutoReqProv:  no
 
 %prep
     %setup -q
+    %setup -q -D -T -a 1
     %patch -p0
 
 %build
@@ -87,8 +92,21 @@ AutoReqProv:  no
       echo "with-python-includes=%{l_prefix}/include/python"
       echo "with-python-libraries=%{l_prefix}/lib/python/config"
       echo "prefix=%{l_prefix}"
+%if "%{with_rt}" == "yes"
+      echo "enable-rt=yes"
+%else
+      echo "enable-rt=no"
+%endif
+%if "%{with_kjs}" == "yes"
       echo "enable-kjs=yes"
+%else
+      echo "enable-kjs=no"
+%endif
+%if "%{with_xbase}" == "yes"
+      echo "enable-xbase=yes"
+%else
       echo "enable-xbase=no"
+%endif
 %if "%{with_mysql}" == "yes"
       echo "enable-mysql=yes"
       echo "with-mysql-includes=%{l_prefix}/include/mysql"
@@ -105,7 +123,6 @@ AutoReqProv:  no
 %endif
       echo "enable-debug=no"
       echo "enable-tests=no"
-      echo "enable-rt=yes"
       echo "libprefix=rekall"
       echo "appname=rekall"
       echo "mode=qt3"
@@ -129,13 +146,22 @@ AutoReqProv:  no
            $RPM_BUILD_ROOT%{l_prefix}/libexec/rekall/$bin
         strip $RPM_BUILD_ROOT%{l_prefix}/libexec/rekall/$bin >/dev/null 2>&1 || true
         ( echo "#!/bin/sh"
-          echo "LD_LIBRARY_PATH=\"%{l_prefix}/lib/rekall\""
+          echo "PATH=\"%{l_prefix}/libexec/rekall:\$PATH\""
+          echo "export PATH"
+          echo "LD_LIBRARY_PATH=\"%{l_prefix}/lib/rekall:\$LD_LIBRARY_PATH\""
           echo "export LD_LIBRARY_PATH"
           echo "exec %{l_prefix}/libexec/rekall/$bin \${1+\"$@\"}"
         ) >$RPM_BUILD_ROOT%{l_prefix}/bin/$bin
         chmod 755 $RPM_BUILD_ROOT%{l_prefix}/bin/$bin
     done
 
+    #   install demo application
+    %{l_shtool} mkdir -f -p -m 755 \
+        $RPM_BUILD_ROOT%{l_prefix}/share/rekall/demo
+    rm -f RekallDemo/*~
+    %{l_shtool} install -c -m 644 \
+        RekallDemo/* $RPM_BUILD_ROOT%{l_prefix}/share/rekall/demo/
+
     #   determine installation files
     %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}