Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
VirusCheckPlugin4Rosetta
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Digital Preservation
VirusCheckPlugin4Rosetta
Commits
5801d906
Commit
5801d906
authored
2 years ago
by
Andreas Romeyke
Browse files
Options
Downloads
Patches
Plain Diff
- fixed test targets
parent
9245a7eb
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Makefile
+31
-30
31 additions, 30 deletions
Makefile
with
31 additions
and
30 deletions
Makefile
+
31
−
30
View file @
5801d906
...
...
@@ -17,22 +17,14 @@ ROSETTASDKPLUGINS:=${ROSETTASDK}/../../bundled_plugins/
ROSETTASDKJARS
=
$(
shell find
${
ROSETTASDKDEPOSIT
}
-name
"*.jar"
)
# classpath
JUNITCLASSPATH
:=
/usr/share/java/junit4.jar:
$(
shell find
${
ROSETTASDKDEPOSIT
}
-name
"*.jar"
-print
|xargs
echo
|sed
-e
"s/ /:/g"
)
#SOURCESCLASSPATH=org/slub/rosetta/dps/repository/plugin/storage/nfs
CLASSPATH
:=
./java:
${
ROSETTASDKDEPOSIT
}
/../src/:
${
ROSETTASDKDEPOSIT
}
/xmlbeans-2.3.0.jar:
${
ROSETTASDKDEPOSIT
}
/dps-sdk-
${
ROSETTAVERSION
}
.jar:
${
ROSETTASDKDEPOSIT
}
/log4j-1.2.14.jar:
${
ROSETTASDKPLUGINS
}
/NFSStoragePlugin.jar
JUNITCLASSPATH
:=
./java/:/usr/share/java/junit4.jar:
$(
shell find
${
ROSETTASDKDEPOSIT
}
-name
"*.jar"
-print
|xargs
echo
|sed
-e
"s/ /:/g"
)
CLASSPATH
:=
${
ROSETTASDKDEPOSIT
}
/../src/:
${
ROSETTASDKDEPOSIT
}
/xmlbeans-2.3.0.jar:
${
ROSETTASDKDEPOSIT
}
/dps-sdk-
${
ROSETTAVERSION
}
.jar:
${
ROSETTASDKDEPOSIT
}
/log4j-1.2.14.jar:
${
ROSETTASDKPLUGINS
}
/NFSStoragePlugin.jar
# sources
#SOURCES=java/org/slub/rosetta/dps/repository/plugin/storage/nfs/SLUBStoragePlugin.java\
# java/org/slub/rosetta/dps/repository/plugin/storage/nfs/testSLUBStoragePlugin.java
SOURCES
=
java/org/slub/rosetta/dps/repository/plugin/SLUBVirusCheckClamAVPlugin.java
OBJS
=
$(
SOURCES:.java
=
.class
)
JAR
=
SLUBVirusCheckPlugin.jar
SOURCES
:=
java/org/slub/rosetta/dps/repository/plugin/SLUBVirusCheckClamAVPlugin.java
OBJS
:=
$(
SOURCES:.java
=
.class
)
JAR
:=
SLUBVirusCheckPlugin.jar
BUILD
:=
build/
export
CMD
=
/usr/bin/java
-cp
$(
CLASSPATH
)
:
$(
JUNITCLASSPATH
)
:
$(
JAR
)
org.slub.rosetta.dps.repository.plugin.SLUBVirusCheckClamAVPlugin
#export CMD=echo SIGNATURE: Eicar-Signature
CMD_EICAR
=
$(
shell
${
CMD
}
EICAR/eicar |
grep
-F
'SIGNATURE:'
)
CMD_NOVIRUS
=
$(
shell
${
CMD
}
Makefile |
grep
-F
'SIGNATURE:'
)
all
:
$(BUILD) $(JAR)
...
...
@@ -46,34 +38,22 @@ help:
jarclean
:
@
rm
-Rf
$(
BUILD
)
test
:
$(OBJS)
@
echo
-n
"testing EICAR: "
ifeq
"$(CMD_EICAR)" "RESULT: 2 SIGNATURE: Eicar-Signature"
@
echo
pass
;
else
@
echo
fail
;
exit
2
;
endif
@
echo
-n
"testing No virus: "
ifeq
"$(CMD_NOVIRUS)" "RESULT: 0 SIGNATURE: "
@
echo
pass
;
else
@
echo
fail
;
exit
2
;
endif
clean
:
jarclean
@
rm
-Rf
doc/
find ./java/org/
-name
"*.class"
-exec
rm
-f
\{\}
\;
@
find ./java/org/
-name
"*.class"
-exec
rm
-f
\{\}
\;
@
rm
-Rf
$(
JAR
)
@
rm
test_novirus
@
rm
test_eicar
distclean
:
clean
find ./
-name
"*~"
-exec
rm
-f
\{\}
\;
@
rm
-Rf
null
$(BUILD)
:
@
mkdir
$@
;
@
mkdir
$@
/lib
$(JAR)
:
$(OBJS)
$(JAR)
:
$(OBJS)
$(BUILD)
@
cp
-r
PLUGIN-INF/
$(
BUILD
)
@
cp
-r
META-INF/
$(
BUILD
)
@
cd
java
;
find ./
-name
"*.class"
-print
-exec
cp
--parents
-r
\{\}
$(
PWD
)
/
$(
BUILD
)
\;
;
cd
..
...
...
@@ -91,4 +71,25 @@ check_prerequisites:
@
echo
-n
"### Checking Exlibris Rosetta SDK path:
$(
ROSETTASDK
)
...."
@
if
[
-e
$(
ROSETTASDK
)
]
;
then
echo
"fine :)"
;
else
echo
" not found! :("
;
fi
.PHONY
:
help check_prerequisites clean distclean jarclean test
test_eicar
:
$(OBJS)
@
/usr/bin/java
-cp
$(
CLASSPATH
)
:
$(
JUNITCLASSPATH
)
:java org.slub.rosetta.dps.repository.plugin.SLUBVirusCheckClamAVPlugin EICAR/eicar |
grep
-F
'SIGNATURE:'
>
$@
@
echo
-n
"testing 'EICAR':"
ifeq
"$(shell cat test_eicar)" "RESULT: 2 SIGNATURE: Eicar-Signature"
@
echo
pass
;
else
@
echo
failed
;
exit
2
;
endif
test_novirus
:
$(OBJS)
@
/usr/bin/java
-cp
$(
CLASSPATH
)
:
$(
JUNITCLASSPATH
)
:java org.slub.rosetta.dps.repository.plugin.SLUBVirusCheckClamAVPlugin Makefile |
grep
-F
'SIGNATURE:'
>
$@
@
echo
-n
"testing 'No virus': "
ifeq
"$(shell cat test_novirus)" "RESULT: 0 SIGNATURE: "
@
echo
pass
;
else
@
echo
fail
;
exit
2
;
endif
test
:
test_eicar test_novirus
.PHONY
:
help check_prerequisites clean distclean jarclean test test_eicar test_novirus
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment