Commit 0e62acc56a1afe86aeb64a61f90db380575ae45d
1 parent
a163d261
praca nad paczkowaniem
git-svn-id: svn://svn.nlp.ipipan.waw.pl/morfeusz/morfeusz@68 ff4e3ee1-f430-4e82-ade0-24591c43f1fd
Showing
15 changed files
with
82 additions
and
45 deletions
CMakeLists.txt
... | ... | @@ -25,7 +25,10 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") |
25 | 25 | endif () |
26 | 26 | # set (CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib") |
27 | 27 | |
28 | -if (${CMAKE_SYSTEM_NAME} MATCHES "Windows") | |
28 | +if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") | |
29 | + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++98 -Wall -pedantic -Wcast-align -Wextra -Wmissing-noreturn -Wconversion -Wcast-qual -Wcast-align -O2") | |
30 | +elseif (${CMAKE_SYSTEM_NAME} MATCHES "Windows") | |
31 | + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -Wall -O2") | |
29 | 32 | set (CMAKE_SHARED_LIBRARY_PREFIX "") |
30 | 33 | # here is some magic - must statically link libstdc++ and libgcc |
31 | 34 | # but exclude libgcc_eh.a as it causes "multiple definition of (...)" errors |
... | ... | @@ -33,8 +36,6 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Windows") |
33 | 36 | set (CMAKE_EXE_LINKER_FLAGS "-s -Os -static-libstdc++ -static-libgcc") |
34 | 37 | endif () |
35 | 38 | |
36 | -enable_testing() | |
37 | - | |
38 | 39 | file (COPY fsabuilder testfiles input DESTINATION .) |
39 | 40 | |
40 | 41 | configure_file ( |
... | ... | @@ -55,21 +56,6 @@ set (JMORFEUSZ jmorfeusz) |
55 | 56 | add_dependencies (${PYMORFEUSZ} morfeusz) |
56 | 57 | add_dependencies (${JMORFEUSZ} morfeusz) |
57 | 58 | |
58 | -########## JAVA ########## | |
59 | - | |
60 | -# find out library suffix (CMAKE_JAVA_LIBRARY_SUFFIX) | |
61 | -if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") | |
62 | - set (CMAKE_JAVA_LIBRARY_SUFFIX ".jnilib") | |
63 | -else () | |
64 | - set (CMAKE_JAVA_LIBRARY_SUFFIX ${CMAKE_SHARED_LIBRARY_SUFFIX}) | |
65 | -endif () | |
66 | - | |
67 | -# build jmorfeusz | |
68 | -add_custom_target ( jmorfeusz-maven-package ALL | |
69 | - COMMAND mvn package -PotherOutputDir -DoutputDir=${PROJECT_BINARY_DIR}/morfeusz/java -DskipTests=true | |
70 | - DEPENDS ${JMORFEUSZ} | |
71 | - WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/jmorfeusz) | |
72 | - | |
73 | 59 | ########## PYTHON ########## |
74 | 60 | |
75 | 61 | # find out library suffix |
... | ... | @@ -113,3 +99,8 @@ test_result_equals (testfiles/test1.txt testfiles/test1.txt.out |
113 | 99 | test_result_equals (testfiles/test1.txt.ISO8859-2 testfiles/test1.txt.out.ISO8859-2 ISO8859_2) |
114 | 100 | test_result_equals (testfiles/test1.txt.CP1250 testfiles/test1.txt.out.CP1250 CP1250) |
115 | 101 | test_result_equals (testfiles/test1.txt.CP852 testfiles/test1.txt.out.CP852 CP852) |
102 | + | |
103 | +set (CPACK_GENERATOR "DEB" "TGZ" "NSIS") | |
104 | +set (CPACK_DEBIAN_PACKAGE_MAINTAINER "Michał Lenart") #required | |
105 | + | |
106 | +include (CPack) | |
... | ... |
README
... | ... | @@ -5,16 +5,17 @@ Compilation - prerequisites |
5 | 5 | |
6 | 6 | This tutorial assumes that build process is performed on Linux 64bit machine (preferably from Debian/Ubuntu family). |
7 | 7 | |
8 | -sudo apt-get install build-essential autotools | |
8 | +sudo apt-get install build-essential autotools python setuptools python-stdeb | |
9 | +sudo pip install pyinstaller | |
9 | 10 | |
10 | 11 | For cross compiling: |
11 | 12 | -------------------- |
12 | 13 | |
13 | -sudo apt-get install g++-multilib g++-mingw-w64 | |
14 | +sudo apt-get install g++-multilib g++-mingw-w64 nsis | |
14 | 15 | |
15 | 16 | For Java and Python bindings: |
16 | 17 | ----------------------------- |
17 | -sudo apt-get install default-jdk python swig | |
18 | +sudo apt-get install default-jdk swig | |
18 | 19 | |
19 | 20 | Java and Python bindings with cross-compilation support: |
20 | 21 | -------------------------------------------------------- |
... | ... |
jmorfeusz/pom.xml
... | ... | @@ -4,7 +4,7 @@ |
4 | 4 | |
5 | 5 | <groupId>pl.waw.ipipan.morfeusz</groupId> |
6 | 6 | <artifactId>jmorfeusz</artifactId> |
7 | - <version>1.0-SNAPSHOT</version> | |
7 | + <version>1.0</version> | |
8 | 8 | <packaging>jar</packaging> |
9 | 9 | |
10 | 10 | <name>jmorfeusz</name> |
... | ... | @@ -80,14 +80,35 @@ |
80 | 80 | </execution> |
81 | 81 | </executions> |
82 | 82 | </plugin> |
83 | + | |
84 | + <plugin> | |
85 | + <groupId>org.apache.maven.plugins</groupId> | |
86 | + <artifactId>maven-assembly-plugin</artifactId> | |
87 | + <configuration> | |
88 | + <descriptor>src/main/assembly/bin.xml</descriptor> | |
89 | + <outputDirectory>${packageDir}</outputDirectory> | |
90 | +<!-- | |
91 | + <finalName>apache-maven-cookbook-${pom.version}</finalName> | |
92 | +--> | |
93 | + </configuration> | |
94 | + <executions> | |
95 | + <execution> | |
96 | + <phase>package</phase> | |
97 | + <goals> | |
98 | + <goal>single</goal> | |
99 | + </goals> | |
100 | + </execution> | |
101 | + </executions> | |
102 | + </plugin> | |
83 | 103 | </plugins> |
84 | 104 | </build> |
85 | 105 | |
106 | + | |
86 | 107 | <profiles> |
87 | 108 | <profile> |
88 | 109 | <id>otherOutputDir</id> |
89 | 110 | <build> |
90 | - <directory>${outputDir}</directory> | |
111 | + <directory>${buildDir}</directory> | |
91 | 112 | </build> |
92 | 113 | </profile> |
93 | 114 | </profiles> |
... | ... |
jmorfeusz/src/main/assembly/bin.xml
... | ... | @@ -16,7 +16,7 @@ |
16 | 16 | </includes> |
17 | 17 | </fileSet> |
18 | 18 | <fileSet> |
19 | - <directory>src/main/native</directory> | |
19 | + <directory>${outputDir}</directory> | |
20 | 20 | <outputDirectory>/</outputDirectory> |
21 | 21 | <includes> |
22 | 22 | <include>*.jar</include> |
... | ... | @@ -27,4 +27,4 @@ |
27 | 27 | </includes> |
28 | 28 | </fileSet> |
29 | 29 | </fileSets> |
30 | -</assembly> | |
31 | 30 | \ No newline at end of file |
31 | +</assembly> | |
... | ... |
jmorfeusz/src/main/java/pl/waw/ipipan/morfeusz/InterpsVector.java
1 | 1 | /* ---------------------------------------------------------------------------- |
2 | 2 | * This file was automatically generated by SWIG (http://www.swig.org). |
3 | - * Version 2.0.10 | |
3 | + * Version 2.0.4 | |
4 | 4 | * |
5 | 5 | * Do not make changes to this file unless you know what you are doing--modify |
6 | 6 | * the SWIG interface file instead. |
... | ... | @@ -12,12 +12,12 @@ public class InterpsVector { |
12 | 12 | private long swigCPtr; |
13 | 13 | protected boolean swigCMemOwn; |
14 | 14 | |
15 | - protected InterpsVector(long cPtr, boolean cMemoryOwn) { | |
15 | + public InterpsVector(long cPtr, boolean cMemoryOwn) { | |
16 | 16 | swigCMemOwn = cMemoryOwn; |
17 | 17 | swigCPtr = cPtr; |
18 | 18 | } |
19 | 19 | |
20 | - protected static long getCPtr(InterpsVector obj) { | |
20 | + public static long getCPtr(InterpsVector obj) { | |
21 | 21 | return (obj == null) ? 0 : obj.swigCPtr; |
22 | 22 | } |
23 | 23 | |
... | ... |
jmorfeusz/src/main/java/pl/waw/ipipan/morfeusz/Morfeusz.java
1 | 1 | /* ---------------------------------------------------------------------------- |
2 | 2 | * This file was automatically generated by SWIG (http://www.swig.org). |
3 | - * Version 2.0.10 | |
3 | + * Version 2.0.4 | |
4 | 4 | * |
5 | 5 | * Do not make changes to this file unless you know what you are doing--modify |
6 | 6 | * the SWIG interface file instead. |
... | ... | @@ -12,12 +12,12 @@ public class Morfeusz { |
12 | 12 | private long swigCPtr; |
13 | 13 | protected boolean swigCMemOwn; |
14 | 14 | |
15 | - protected Morfeusz(long cPtr, boolean cMemoryOwn) { | |
15 | + public Morfeusz(long cPtr, boolean cMemoryOwn) { | |
16 | 16 | swigCMemOwn = cMemoryOwn; |
17 | 17 | swigCPtr = cPtr; |
18 | 18 | } |
19 | 19 | |
20 | - protected static long getCPtr(Morfeusz obj) { | |
20 | + public static long getCPtr(Morfeusz obj) { | |
21 | 21 | return (obj == null) ? 0 : obj.swigCPtr; |
22 | 22 | } |
23 | 23 | |
... | ... |
jmorfeusz/src/main/java/pl/waw/ipipan/morfeusz/MorfeuszCharset.java
1 | 1 | /* ---------------------------------------------------------------------------- |
2 | 2 | * This file was automatically generated by SWIG (http://www.swig.org). |
3 | - * Version 2.0.10 | |
3 | + * Version 2.0.4 | |
4 | 4 | * |
5 | 5 | * Do not make changes to this file unless you know what you are doing--modify |
6 | 6 | * the SWIG interface file instead. |
... | ... |
jmorfeusz/src/main/java/pl/waw/ipipan/morfeusz/MorfeuszException.java
1 | 1 | /* ---------------------------------------------------------------------------- |
2 | 2 | * This file was automatically generated by SWIG (http://www.swig.org). |
3 | - * Version 2.0.10 | |
3 | + * Version 2.0.4 | |
4 | 4 | * |
5 | 5 | * Do not make changes to this file unless you know what you are doing--modify |
6 | 6 | * the SWIG interface file instead. |
... | ... | @@ -12,12 +12,12 @@ public class MorfeuszException { |
12 | 12 | private long swigCPtr; |
13 | 13 | protected boolean swigCMemOwn; |
14 | 14 | |
15 | - protected MorfeuszException(long cPtr, boolean cMemoryOwn) { | |
15 | + public MorfeuszException(long cPtr, boolean cMemoryOwn) { | |
16 | 16 | swigCMemOwn = cMemoryOwn; |
17 | 17 | swigCPtr = cPtr; |
18 | 18 | } |
19 | 19 | |
20 | - protected static long getCPtr(MorfeuszException obj) { | |
20 | + public static long getCPtr(MorfeuszException obj) { | |
21 | 21 | return (obj == null) ? 0 : obj.swigCPtr; |
22 | 22 | } |
23 | 23 | |
... | ... |
jmorfeusz/src/main/java/pl/waw/ipipan/morfeusz/MorfeuszWrapper.java
1 | 1 | /* ---------------------------------------------------------------------------- |
2 | 2 | * This file was automatically generated by SWIG (http://www.swig.org). |
3 | - * Version 2.0.10 | |
3 | + * Version 2.0.4 | |
4 | 4 | * |
5 | 5 | * Do not make changes to this file unless you know what you are doing--modify |
6 | 6 | * the SWIG interface file instead. |
... | ... |
jmorfeusz/src/main/java/pl/waw/ipipan/morfeusz/MorfeuszWrapperJNI.java
1 | 1 | /* ---------------------------------------------------------------------------- |
2 | 2 | * This file was automatically generated by SWIG (http://www.swig.org). |
3 | - * Version 2.0.10 | |
3 | + * Version 2.0.4 | |
4 | 4 | * |
5 | 5 | * Do not make changes to this file unless you know what you are doing--modify |
6 | 6 | * the SWIG interface file instead. |
... | ... |
jmorfeusz/src/main/java/pl/waw/ipipan/morfeusz/MorphInterpretation.java
1 | 1 | /* ---------------------------------------------------------------------------- |
2 | 2 | * This file was automatically generated by SWIG (http://www.swig.org). |
3 | - * Version 2.0.10 | |
3 | + * Version 2.0.4 | |
4 | 4 | * |
5 | 5 | * Do not make changes to this file unless you know what you are doing--modify |
6 | 6 | * the SWIG interface file instead. |
... | ... | @@ -12,12 +12,12 @@ public class MorphInterpretation { |
12 | 12 | private long swigCPtr; |
13 | 13 | protected boolean swigCMemOwn; |
14 | 14 | |
15 | - protected MorphInterpretation(long cPtr, boolean cMemoryOwn) { | |
15 | + public MorphInterpretation(long cPtr, boolean cMemoryOwn) { | |
16 | 16 | swigCMemOwn = cMemoryOwn; |
17 | 17 | swigCPtr = cPtr; |
18 | 18 | } |
19 | 19 | |
20 | - protected static long getCPtr(MorphInterpretation obj) { | |
20 | + public static long getCPtr(MorphInterpretation obj) { | |
21 | 21 | return (obj == null) ? 0 : obj.swigCPtr; |
22 | 22 | } |
23 | 23 | |
... | ... |
jmorfeusz/src/main/java/pl/waw/ipipan/morfeusz/ResultsIterator.java
1 | 1 | /* ---------------------------------------------------------------------------- |
2 | 2 | * This file was automatically generated by SWIG (http://www.swig.org). |
3 | - * Version 2.0.10 | |
3 | + * Version 2.0.4 | |
4 | 4 | * |
5 | 5 | * Do not make changes to this file unless you know what you are doing--modify |
6 | 6 | * the SWIG interface file instead. |
... | ... | @@ -12,12 +12,12 @@ public class ResultsIterator { |
12 | 12 | private long swigCPtr; |
13 | 13 | protected boolean swigCMemOwn; |
14 | 14 | |
15 | - protected ResultsIterator(long cPtr, boolean cMemoryOwn) { | |
15 | + public ResultsIterator(long cPtr, boolean cMemoryOwn) { | |
16 | 16 | swigCMemOwn = cMemoryOwn; |
17 | 17 | swigCPtr = cPtr; |
18 | 18 | } |
19 | 19 | |
20 | - protected static long getCPtr(ResultsIterator obj) { | |
20 | + public static long getCPtr(ResultsIterator obj) { | |
21 | 21 | return (obj == null) ? 0 : obj.swigCPtr; |
22 | 22 | } |
23 | 23 | |
... | ... |
morfeusz/java/CMakeLists.txt
... | ... | @@ -37,3 +37,24 @@ endif () |
37 | 37 | if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") |
38 | 38 | set (CMAKE_SHARED_LIBRARY_SUFFIX ".jnilib") |
39 | 39 | endif () |
40 | + | |
41 | +# build jmorfeusz | |
42 | +add_custom_target ( jmorfeusz-maven-package package | |
43 | + COMMAND mvn package -PotherOutputDir -DbuildDir=${CMAKE_CURRENT_BINARY_DIR} -DpackageDir=${PROJECT_BINARY_DIR} -DskipTests=true | |
44 | + DEPENDS ${JMORFEUSZ} | |
45 | + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/jmorfeusz) | |
46 | + | |
47 | +#~ file(GLOB JMORFEUSZ_PACKAGE_FILES "${CMAKE_CURRENT_BINARY_DIR}/*.tar.gz") | |
48 | +#~ | |
49 | +#~ add_custom_target(jmorfeusz-maven-package-copy ALL | |
50 | + #~ DEPENDS jmorfeusz-maven-package) | |
51 | +#~ | |
52 | +#~ foreach (f ${JMORFEUSZ_PACKAGE_FILES}) | |
53 | + #~ MESSAGE ("COPY ${f} TO ${PROJECT_BINARY_DIR}") | |
54 | + #~ add_custom_command ( | |
55 | + #~ TARGET jmorfeusz-maven-package-copy | |
56 | + #~ COMMAND ${CMAKE_COMMAND} -E copy ${f} ${PROJECT_BINARY_DIR} | |
57 | + #~ | |
58 | + #~ ) | |
59 | +#~ endforeach () | |
60 | + | |
... | ... |
morfeusz/python/CMakeLists.txt
... | ... | @@ -49,4 +49,7 @@ add_custom_command(OUTPUT ${OUTPUT} |
49 | 49 | |
50 | 50 | add_custom_target(pymorfeusz ALL DEPENDS ${OUTPUT}) |
51 | 51 | |
52 | -install(CODE "execute_process(COMMAND python ${SETUP_PY} install --home=${CMAKE_INSTALL_PREFIX})") | |
52 | +set (CPACK_PACKAGE_NAME "dupa") | |
53 | +install (FILES setup.py.in DESTINATION bin) | |
54 | +include (CPack) | |
55 | +#install(CODE "execute_process(COMMAND python ${SETUP_PY} install --home=${CMAKE_INSTALL_PREFIX})") | |
... | ... |