Skip to content
This repository was archived by the owner on Oct 20, 2022. It is now read-only.

Commit 556005a

Browse files
Merge branch 'master' into JoelGardes-patch-1
2 parents 1912b5d + 469fa8f commit 556005a

File tree

130 files changed

+2979
-325
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

130 files changed

+2979
-325
lines changed

.ci.sh

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,9 @@ export LANG=C.UTF-8
66
TAG=`git describe`
77
echo git tag is: $TAG
88

9-
(cd simdoc && ./prep-simdoc.sh) && \
10-
(cd simdoc/simdoc-server && ./mvnw clean install) && \
11-
(cd simdoc/apps && ./refIntegrationTest.sh) && \
12-
cp simdoc/simdoc-server/target/simdoc-server-1.0.0-SNAPSHOT.jar simdoc-server-$TAG.jar && \
13-
cp simdoc/apps/line-detection/target/line*.jar line-detection-$TAG.jar && \
14-
cp simdoc/apps/prep-data/target/prep*.jar prep-data-$TAG.jar && \
15-
cp simdoc/apps/ncd/target/ncd*.jar ncd-$TAG.jar && \
16-
cp simdoc/apps/ncd-remote/target/ncd*.jar ncd-remote-$TAG.jar && \
17-
cp simdoc/apps/prep-clustering/target/prep*.jar prep-clustering-$TAG.jar && \
18-
cp simdoc/apps/similarity-clustering/target/sim*.jar similarity-clustering-$TAG.jar && \
19-
cp simdoc/apps/graph/target/graph*.jar graph-$TAG.jar && \
20-
cp simdoc/apps/base64/target/base64*.jar base64-$TAG.jar && \
21-
cp simdoc/simdoc-server/target/simdoc-server*.jar simdoc-server-$TAG.jar && \
22-
cp simdoc-server-$TAG.jar simdoc/simdoc-server && \
23-
echo Create tarball && \
24-
tar cvjf documentare-simdoc-$TAG.tar.bz2 *.jar && \
9+
make build-tests integration-test deb && \
10+
echo Create tar && \
11+
tar cvf documentare-simdoc-$TAG.tar *.jar usr ../simdoc*.deb && \
2512
echo && \
2613
echo OK && exit 0
2714

.dh_build.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
3+
debuild -uc -us -b <<<"y"

.dh_make.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/sh
2+
3+
export DEBEMAIL=christophe.maldivi@orange.com
4+
export DEBFULLNAME="Christophe Maldivi"
5+
6+
VERSION=`git describe`
7+
PACKAGENAME=simdoc-server
8+
9+
dh_make -p ${PACKAGENAME}_${VERSION} -c gpl2 --native -s
10+

.gitlab-ci.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
image: registry.gitlab.com/orange-opensource/documentare-simdoc-ci-docker:master
1+
image: registry.gitlab.com/orange-opensource/documentare/documentare-simdoc-ci-docker:master
22

33
cache:
44
paths:
@@ -17,8 +17,7 @@ default-job:
1717
- ./.ci.sh
1818
artifacts:
1919
paths:
20-
- ./CHANGELOG.html
21-
- ./*.jar
20+
- ./usr
2221
expire_in: 5 mins
2322
except:
2423
- tags
@@ -29,8 +28,7 @@ release-job:
2928
- ./.ci.sh
3029
artifacts:
3130
paths:
32-
- ./CHANGELOG.html
33-
- ./*.jar
31+
- ./usr
3432
only:
3533
- tags
3634

@@ -44,7 +42,7 @@ deploy-job:
4442
# - env | grep ^CI_
4543
# - docker info
4644
- ls
47-
- cp simdoc-server*.jar simdoc/simdoc-server
45+
- cp ./usr/share/java/simdoc-server.jar simdoc/simdoc-server
4846
- ls simdoc/simdoc-server
4947
- docker login $CI_REGISTRY --username gitlab-ci-token --password $CI_BUILD_TOKEN
5048

.travis.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,34 @@
11
language: java
22

33
dist: trusty
4-
sudo: false
4+
sudo: required
55

66
jdk:
77
- oraclejdk8
88

99
addons:
1010
apt:
1111
packages:
12+
- maven
1213
- libgts-0.7-5
14+
- devscripts
15+
- fakeroot
16+
- debhelper
17+
- libopencv-core2.4
18+
- libopencv2.4-java
19+
1320

1421
install: true
1522

1623
before_script:
17-
- tar xvjf 3rdparty/graphviz-2.38-ubuntu-trusty.tar.bz2 && mv opt/local /opt/
18-
- /opt/local/bin/sfdp -V
19-
- /opt/local/bin/gvmap --help
24+
- wget https://gitlab.com/Orange-OpenSource/documentare/documentare-graphviz/-/jobs/21454333/artifacts/raw/graphviz_2.38.0-18_amd64.deb
25+
- sudo dpkg --force-all -i graphviz_2.38.0-18_amd64.deb
2026

2127
script:
2228
- ./.ci.sh
2329

2430
before_deploy:
25-
- export TARBALL=$(ls *.tar.bz2)
31+
- export TARBALL=$(ls *.tar)
2632
- echo Will deploy ${TARBALL}
2733

2834
deploy:
@@ -46,4 +52,5 @@ notifications:
4652
recipients:
4753
- christophe.maldivi@orange.com
4854
- joel.gardes@orange.com
55+
- denis.boisset@orange.com
4956

Makefile

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
VERSION=`git describe`
2+
3+
# Quick build without tests
4+
build-notest:
5+
(cd simdoc/core/java/ && mvn -Dmaven.repo.local=${HOME}/.m2/repository install -DskipTests=true)
6+
(cd simdoc/apps && mvn -Dmaven.repo.local=${HOME}/.m2/repository install -DskipTests=true)
7+
(cd simdoc/simdoc-server/ && mvn -Dmaven.repo.local=${HOME}/.m2/repository install -DskipTests=true)
8+
9+
build-tests:
10+
(cd simdoc/core/java/ && mvn -Dmaven.repo.local=${HOME}/.m2/repository install)
11+
(cd simdoc/apps && mvn -Dmaven.repo.local=${HOME}/.m2/repository install)
12+
(cd simdoc/simdoc-server/ && mvn -Dmaven.repo.local=${HOME}/.m2/repository install)
13+
14+
# Used to build debian package
15+
# here we consider that artifacts are already built (to speed up continuous integration)
16+
# so we do nothing here
17+
build:
18+
19+
integration-test:
20+
(cd simdoc/apps/ && ./refIntegrationTest.sh)
21+
22+
# Build debian package
23+
deb:
24+
dch -v ${VERSION} "git update, version ${VERSION}"
25+
bash .dh_build.sh
26+
27+
# Debian package install
28+
install:
29+
rm -rf usr && mkdir -p usr/share/java
30+
cp simdoc/simdoc-server/target/simdoc-server-*.jar usr/share/java/simdoc-server.jar
31+
rm -rf etc && mkdir -p etc/init.d && cp debian/server-init-d etc/init.d/simdoc-server
32+
mkdir etc/rc2.d && (cd etc/rc2.d && ln -s ../init.d/simdoc-server S08simdoc-server)
33+
34+
# We only include server in deb package, here we copy jars to have it in the tarball
35+
cp simdoc/apps/line-detection/target/line*.jar line-detection.jar
36+
cp simdoc/apps/prep-data/target/prep*.jar prep-data.jar
37+
cp simdoc/apps/ncd/target/ncd*.jar ncd.jar
38+
cp simdoc/apps/ncd-remote/target/ncd*.jar ncd-remote.jar
39+
cp simdoc/apps/clustering-remote/target/clustering-remote*.jar clustering-remote.jar
40+
cp simdoc/apps/prep-clustering/target/prep*.jar prep-clustering.jar
41+
cp simdoc/apps/similarity-clustering/target/sim*.jar similarity-clustering.jar
42+
cp simdoc/apps/graph/target/graph*.jar graph.jar
43+
44+
clean:
45+
debclean

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ Library and tools for similarity measurement, classification and clustering of d
88

99
Prerequisites:
1010
- java 8
11-
- you need to install graphviz (see .travis.yml to see how we install it)
11+
- you need to install a rebuilt version of graphviz, provided here: https://gitlab.com/Orange-OpenSource/documentare/documentare-graphviz
1212
- you need to install convert (imagemagick)
1313

14-
To build the core library: ```cd simdoc/core/java/libs && ./mvnw clean install```
14+
More information about graphviz are provided under `doc/graphviz/README.md`
1515

16-
To build tools (***LineDetection***,***NCD***, etc): ```cd simdoc/apps/pc/ && ./compileAll.sh```
16+
To build the core library: ```cd simdoc/core/java && ./mvnw clean install```
17+
18+
To build tools (***LineDetection***,***NCD***, etc): ```cd simdoc/apps/ && ./mvnw clean install```
1719

18-
NB: gradle daemon is great to speed up builds, but it has a nasty effect: sometimes it will not see that the core library has changed after a rebuild. So if you update the core library, do a ```gradle --stop``` to be sure that the new core library version will be used for the next gradle build.
19-
2020
## Introduction
2121

2222
This software bundle is aimed for computer-aided transcription of digitised document produced with scanners or digital cameras. But other uses are allowed for NCD and SimClustering. Following tools are implemented:

debian/README

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
The Debian Package simdoc-server
2+
----------------------------
3+
4+
Comments regarding the Package
5+
6+
-- Christophe Maldivi <christophe.maldivi@orange.com> Fri, 30 Jun 2017 22:14:08 +0200

debian/README.Debian

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
simdoc-server for Debian
2+
-----------------------
3+
4+
<possible notes regarding this package - if none, delete this file>
5+
6+
-- Christophe Maldivi <christophe.maldivi@orange.com> Fri, 30 Jun 2017 22:14:08 +0200

debian/README.source

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
simdoc-server for Debian
2+
-----------------------
3+
4+
<this file describes information about the source package, see Debian policy
5+
manual section 4.14. You WILL either need to modify or delete this file>
6+
7+
8+
9+
-- Christophe Maldivi <christophe.maldivi@orange.com> Fri, 30 Jun 2017 22:14:08 +0200
10+

0 commit comments

Comments
 (0)