mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 00:14:44 +01:00
From: Jeff Mahoney <jeffm@suse.com>
Fix up tomcat build, also use in-tree libapparmor.
This commit is contained in:
parent
0cfa2b2cf8
commit
788bdcafb9
3 changed files with 11 additions and 10 deletions
|
@ -4,8 +4,8 @@
|
|||
<property name="jni_src" location="src/jni_src"/>
|
||||
<property name="build" location="build"/>
|
||||
<property name="install_root" location="/"/>
|
||||
<property name="catalina_home" location="/usr/share/tomcat5"/>
|
||||
<property name="lib" location="lib"/>
|
||||
<property name="catalina_home" location="/usr/share/tomcat6"/>
|
||||
<property name="lib" location="/usr/share/tomcat6/bin"/>
|
||||
<property name="install_lib" value="/lib"/>
|
||||
<property name="dist" location="dist"/>
|
||||
<property name="jarfile" location="${dist}/${ant.project.name}.jar"/>
|
||||
|
@ -18,10 +18,11 @@
|
|||
<include name="**/*.jar"/>
|
||||
</fileset>
|
||||
|
||||
<fileset id="tomcat.jars" dir="${catalina_home}/server/lib">
|
||||
<fileset id="tomcat.jars" dir="${catalina_home}/lib">
|
||||
<include name="**/*.jar"/>
|
||||
</fileset>
|
||||
<fileset id="servlet.jars" dir="${catalina_home}/common/lib">
|
||||
|
||||
<fileset id="servlet.jars" dir="${catalina_home}/lib">
|
||||
<include name="**/*.jar"/>
|
||||
</fileset>
|
||||
|
||||
|
@ -80,9 +81,9 @@
|
|||
</target>
|
||||
|
||||
<target name="install_jar" depends="jni_so" description="Install jar file">
|
||||
<mkdir dir="${install_root}/${catalina_home}/server/lib/"/>
|
||||
<copy file="${jarfile}" tofile="${install_root}/${catalina_home}/server/lib/${ant.project.name}.jar"/>
|
||||
<chmod perm="644" file="${install_root}/${catalina_home}/server/lib/${ant.project.name}.jar"/>
|
||||
<mkdir dir="${install_root}/${catalina_home}/lib/"/>
|
||||
<copy file="${jarfile}" tofile="${install_root}/${catalina_home}/lib/${ant.project.name}.jar"/>
|
||||
<chmod perm="644" file="${install_root}/${catalina_home}/lib/${ant.project.name}.jar"/>
|
||||
</target>
|
||||
|
||||
<target name="clean" description="Remove build and dist directories">
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
#include "jni.h"
|
||||
#include <errno.h>
|
||||
#include "sys/apparmor.h"
|
||||
#include <apparmor.h>
|
||||
#include "com_novell_apparmor_JNIChangeHat.h"
|
||||
|
||||
/* c intermediate lib call for Java -> JNI -> c library execution of the change_hat call */
|
||||
|
|
|
@ -4,7 +4,7 @@ LIB = lib/
|
|||
LIBDIR = /usr/${LIB}
|
||||
INCLUDE = ${LIBDIR}/jvm/java/include
|
||||
CFLAGS = -g -O2 -Wall -Wstrict-prototypes -Wl,-soname,$@.${SO_VERS} -pipe -fpic -D_REENTRANT
|
||||
INCLUDES = -I$(INCLUDE) -I$(INCLUDE)/linux
|
||||
INCLUDES = -I$(INCLUDE) -I$(INCLUDE)/linux -I$(TOP)/../../../libraries/libapparmor/src/
|
||||
CLASSFILE = ${CLASSPATH}/com/novell/apparmor/${JAVA_CLASSNAME}.class
|
||||
DESTDIR = ${TOP}/dist
|
||||
SO_VERS = 1
|
||||
|
@ -20,7 +20,7 @@ ${JAVA_CLASSNAME}.java com_novell_apparmor_${JAVA_CLASSNAME}.h: ${CLASSFILE}
|
|||
javah -jni -classpath ${CLASSPATH} com.novell.apparmor.${JAVA_CLASSNAME}
|
||||
|
||||
${TARGET}.so: ${JAVA_CLASSNAME}.c ${JAVA_CLASSNAME}.java com_novell_apparmor_${JAVA_CLASSNAME}.h
|
||||
gcc ${INCLUDES} ${CFLAGS} -shared -o ${TARGET}.so ${JAVA_CLASSNAME}.c -lapparmor
|
||||
gcc ${INCLUDES} ${CFLAGS} -shared -o ${TARGET}.so ${JAVA_CLASSNAME}.c -L$(TOP)/../../../libraries/libapparmor/src/.libs -lapparmor
|
||||
|
||||
install: ${TARGET}.so
|
||||
install -d $(DESTDIR)/${LIB} $(DESTDIR)${LIBDIR}
|
||||
|
|
Loading…
Add table
Reference in a new issue