diff --git a/bindings/java/Makefile.am b/bindings/java/Makefile.am index f075c9720ffc6703d83a10ab297dcf4f6f75e1c9..b7db5dadc8244da905089d06b8b9930a1cc7d4e5 100644 --- a/bindings/java/Makefile.am +++ b/bindings/java/Makefile.am @@ -5,10 +5,17 @@ tsk_jar = $(top_builddir)/bindings/java/dist/sleuthkit-$(PACKAGE_VERSION).jar jardir = $(prefix)/share/java jar_DATA = $(tsk_jar) +if OFFLINE + ant_command=ant dist -Doffline=true +else + ant_command=ant dist +endif + + $(tsk_jar): all-local: - ant dist -Donline=false + $(ant_command) CLEANFILES = $(tsk_jar) diff --git a/bindings/java/build.xml b/bindings/java/build.xml index dcc66c2ee7eee81df0860dc3e40499a20bf84a54..e8763610163d5b118519709bf6e5fb88fdb2a537 100755 --- a/bindings/java/build.xml +++ b/bindings/java/build.xml @@ -11,6 +11,7 @@ <import file="build-${os.family}.xml"/> <!-- set global properties for this build --> + <property name="default-jar-location" location="/usr/share/java"/> <property name="src" location="src/org/sleuthkit/datamodel"/> <property name="VERSION" value="4.6.0"/> <property name="sample" location="src/org/sleuthkit/datamodel/Examples"/> @@ -63,35 +64,29 @@ </target> <!-- set classpath for dependencies--> - <condition property="online"> - <http url="https://www.google.com/"/> - </condition> <target name="set-library-path" description="sets the path of the libraries" depends="set-library-path-online,set-library-path-offline"></target> - <target name="set-library-path-online" description="set this library path when the user is online" if="online"> + <target name="set-library-path-online" description="set this library path when the user is online" unless="offline"> <path id="libraries"> <fileset dir="${lib}"> <include name="*.jar"/> </fileset> <pathelement path="${build}"/> </path> + <echo message="hey"/> </target> - <target name="set-library-path-offline" description="set the library path when the user is offline" unless="online"> + <target name="set-library-path-offline" description="set the library path when the user is offline" if="offline"> <path id="libraries"> - <if> - <equals arg1="${os.family}" arg2="unix"/> - <then> - <pathelement path="${default-jar-location}"/> - </then> - </if> + <fileset dir="${default-jar-location}"> + <include name="*.jar"/> + </fileset> <fileset dir="${lib}"> <include name="*.jar"/> </fileset> <pathelement path="${build}"/> </path> - <echo message="${online}"/> </target> <property name="ivy.install.version" value="2.3.0-rc2"/> @@ -102,7 +97,7 @@ <property name="ivy.jar.dir" value="${ivy.home}/lib"/> <property name="ivy.jar.file" value="${ivy.jar.dir}/ivy.jar"/> - <target name="download-ivy" if="online"> + <target name="download-ivy" unless="offline"> <available file="${ivy.jar.file}" property="ivy.available"/> <antcall target="-download-ivy"/> </target> @@ -112,14 +107,14 @@ <get src="http://repo2.maven.org/maven2/org/apache/ivy/ivy/${ivy.install.version}/ivy-${ivy.install.version}.jar" dest="${ivy.jar.file}" usetimestamp="true"/> </target> - <target name="init-ivy" depends="download-ivy" unless="ivy.lib.path" if="online"> + <target name="init-ivy" depends="download-ivy" unless="ivy.lib.path"> <path id="ivy.lib.path"> <fileset dir="${ivy.jar.dir}" includes="*.jar"/> </path> <taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path"/> </target> - <target name="retrieve-deps" description="retrieve dependencies using ivy" depends="init-ivy" if="online"> + <target name="retrieve-deps" description="retrieve dependencies using ivy" depends="init-ivy" unless="offline"> <ivy:settings file="ivysettings.xml"/> <ivy:resolve/> <ivy:retrieve sync="true" pattern="lib/[artifact]-[revision](-[classifier]).[ext]"/> diff --git a/configure.ac b/configure.ac index 39e453c6d2125f5fe327fe00b1deba3e19d068b4..51356e14f51fb0f51177a575fd64f2fbca4475a9 100644 --- a/configure.ac +++ b/configure.ac @@ -33,7 +33,6 @@ AC_PROG_LN_S AC_PROG_MAKE_SET AC_PATH_PROG(PERL, perl) - dnl Checks for header files. AC_HEADER_STDC dnl AC_HEADER_MAJOR @@ -209,6 +208,19 @@ AC_SUBST(Z_PATH, $Z_PATH) dnl needed for sqllite AC_CHECK_LIB(dl, dlopen) +dnl check for user online input + +AC_ARG_ENABLE([offline], + [ AS_HELP_STRING([--enable-offline],[Turn on offline mode])], + [case "${enableval}" in + yes) offline=true ;; + no) offline=false ;; + *) AC_MSG_ERROR([bad value ${enableval} for --enable-online]) ;; + esac],[offline=false]) + +AM_CONDITIONAL([OFFLINE], [test "x$offline" = xtrue]) + + dnl Check if we should link libewf. AC_ARG_WITH([libewf], [AS_HELP_STRING([--without-libewf],[Do not use libewf even if it is installed])] diff --git a/debian/rules b/debian/rules index 702b390ce913d713148551035e9746d0ac5f5b0f..cfd425ffedf8077b6098887ba5b8c6e69c3fb234 100755 --- a/debian/rules +++ b/debian/rules @@ -22,8 +22,12 @@ export DEB_LDFLAGS_MAINT_APPEND = -lsqlite3 -lsupc++ -Wl,--as-needed # This is example for Cmake (See https://bugs.debian.org/641051 ) #override_dh_auto_configure: # dh_auto_configure -- # -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH) - + override_dh_auto_install: - /bin/bash ./libtool --mode=install /usr/bin/install -c /home/rishwanth07/Documents/sleuthkit/tsk/libtsk.la '/home/rishwanth07/Documents/sleuthkit/bindings/java/' + cd tsk/ + sudo make install + cd .. + cd bindings/java/ + sudo make install dh_install diff --git a/debian/sleuthkit-java.install b/debian/sleuthkit-java.install index 631e7a3feb172507607a77c605f362cf543c4dc4..67b5aefc5d486e8f38d60c9be816158e84f1aed4 100644 --- a/debian/sleuthkit-java.install +++ b/debian/sleuthkit-java.install @@ -1,5 +1,4 @@ bindings/java/thirdpartyjars/sqlite-jdbc-3.21.0.1.jar /usr/share/java bindings/java/dist/sleuthkit-4.6.0.jar /usr/share/java -bindings/java/libtsk.so* /usr/lib/ - +bindings/java/libtsk.so /usr/lib/