louisutdml
Used in:
components
- OverviewOverview
- VersionsVersions
- DependentsDependents
- DependenciesDependencies
<dependency>
<groupId>org.liblouis</groupId>
<artifactId>louisutdml</artifactId>
<version>2.11.0-p1</version>
</dependency><?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.liblouis</groupId>
<artifactId>louisutdml</artifactId>
<version>2.11.0-p1</version>
<packaging>nar</packaging>
<name>liblouisutdml-nar</name>
<description>liblouisutdml packaged in a NAR (Native ARchive).</description>
<url>https://github.com/bertfrees/liblouisutdml-nar</url>
<scm>
<connection>scm:git:git@github.com:liblouis/liblouisutdml-nar.git</connection>
<developerConnection>scm:git:git@github.com:liblouis/liblouisutdml-nar.git</developerConnection>
<url>git@github.com:liblouis/liblouisutdml-nar.git</url>
</scm>
<licenses>
<license>
<name>GNU Lesser General Public License 3</name>
<url>http://www.gnu.org/licenses/lgpl.html</url>
</license>
</licenses>
<developers>
<developer>
<name>Bert Frees</name>
<email>bertfrees@gmail.com</email>
<url>http://github.com/bertfrees</url>
<organization>SBS - Schweizerische Bibliothek für Blinde, Seh- und Lesebehinderte</organization>
<organizationUrl>http://www.sbs.ch</organizationUrl>
</developer>
</developers>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<liblouis.version>3.21.0-p2</liblouis.version>
<libxml2.version>2.7.3</libxml2.version>
<nar.arch.option/>
<nar.install_name.option/>
<nar.rpath.option/>
<nar.java-bindings.option>--disable-java-bindings</nar.java-bindings.option>
<nar.jni.option/>
<nar.libxml2.option/>
<nar.host.option/>
</properties>
<dependencies>
<dependency>
<groupId>org.liblouis</groupId>
<artifactId>louis</artifactId>
<version>${liblouis.version}</version>
<type>nar</type>
</dependency>
</dependencies>
<build>
<sourceDirectory>${project.build.directory}/generated-sources/java</sourceDirectory>
<pluginManagement>
<plugins>
<plugin>
<groupId>com.github.maven-nar</groupId>
<artifactId>nar-maven-plugin</artifactId>
<version>3.5.3-SNAPSHOT</version> <!-- depends on "bertfrees" branch -->
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.1</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>shell-maven-plugin</artifactId>
<version>1.0-beta-1</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.2</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</plugin>
<plugin>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.4</version>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.3</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>com.github.maven-nar</groupId>
<artifactId>nar-maven-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<gnuSourceDirectory>target/generated-sources/liblouisutdml</gnuSourceDirectory>
<gnuConfigureArgs>${nar.host.option} ${nar.java-bindings.option}</gnuConfigureArgs>
<libraries>
<library>
<type>shared</type>
</library>
</libraries>
<linker>
<name>g++</name>
</linker>
</configuration>
<executions>
<!--
validate: nar-validate
initialize: nar-download
generate-sources: nar-unpack
process-sources: nar-gnu-configure
generate-resources: nar-system-generate, nar-vcproj
process-resources: nar-resources, nar-gnu-resources
compile: nar-javah, nar-gnu-make, nar-compile
process-classes: nar-gnu-process, nar-process-libraries
generate-test-sources: nar-test-unpack
test-compile: nar-testCompile
test: nar-test
prepare-package: nar-prepare-package
package: nar-package,
integration-test: nar-integration-test
-->
<execution>
<id>default-nar-unpack</id>
<configuration>
<layout>com.github.maven_nar.NarLayout20</layout>
<skipUnpackProcessing>true</skipUnpackProcessing>
</configuration>
</execution>
<execution>
<id>default-nar-javah</id>
<phase>none</phase>
</execution>
<execution>
<id>default-nar-gnu-resources</id>
<phase>none</phase>
</execution>
<!-- bind nar-gnu-configure to compile phase instead of generate-sources -->
<execution>
<id>default-nar-gnu-make</id>
<phase>none</phase>
</execution>
<execution>
<id>default-nar-compile</id>
<phase>none</phase>
</execution>
<execution>
<id>default-nar-gnu-configure</id>
<phase>compile</phase>
</execution>
<execution>
<id>nar-gnu-make</id>
<phase>compile</phase>
<goals>
<goal>nar-gnu-make</goal>
</goals>
</execution>
<execution>
<id>nar-compile</id>
<phase>compile</phase>
<goals>
<goal>nar-compile</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-sources</id>
<phase>generate-sources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/generated-sources/liblouisutdml</outputDirectory>
<overwrite>true</overwrite>
<resources>
<resource>
<directory>src/liblouisutdml</directory>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>copy-results-1</id>
<phase>process-classes</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/nar/louisutdml-${project.version}-${nar.aol}-shared/lib/${nar.aol}/shared</outputDirectory>
<resources>
<resource>
<directory>${project.build.directory}/nar/gnu/${nar.aol}/target/lib</directory>
<includes>
<include>*.dll.a</include>
<include>liblouisutdml.dylib</include>
<include>pkgconfig/*</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>copy-results-2</id>
<phase>process-classes</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/nar/louisutdml-${project.version}-noarch/</outputDirectory>
<resources>
<resource>
<directory>${project.build.directory}/nar/gnu/x86_64-MacOSX-gpp/target/</directory>
<includes>
<include>share/**/*</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>process-sources</id>
<phase>process-sources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<replace dir="${project.build.directory}/nar/lib/${nar.aol}/shared/pkgconfig">
<replacefilter token="@NAR@" value="${project.build.directory}/nar"/>
</replace>
</tasks>
</configuration>
</execution>
<execution>
<id>process-test-resources</id>
<phase>process-test-resources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<copy todir="${project.build.directory}/test-classes" flatten="true" overwrite="true">
<fileset dir="${project.build.directory}/nar">
<include name="lib/${nar.aol}/shared/liblouis.so"/>
<include name="lib/${nar.aol}/shared/liblouis.dylib"/>
<include name="bin/${nar.aol}/liblouis.dll"/>
<include name="bin/i586-mingw32msvc-gpp/libxml2.dll"/>
<include name="louisutdml-${project.version}-${nar.aol}-shared/lib/${nar.aol}/shared/liblouisutdml.dylib"/>
<include name="louisutdml-${project.version}-${nar.aol}-shared/lib/${nar.aol}/shared/liblouisutdml.so"/>
<include name="louisutdml-${project.version}-${nar.aol}-executable/bin/${nar.aol}/file2brl"/>
<include name="louisutdml-${project.version}-${nar.aol}-executable/bin/${nar.aol}/file2brl.exe"/>
<include name="louisutdml-${project.version}-${nar.aol}-executable/bin/${nar.aol}/liblouisutdml.dll"/>
</fileset>
</copy>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>shell-maven-plugin</artifactId>
<configuration>
<chmod>true</chmod>
</configuration>
<executions>
<execution>
<id>process-sources</id>
<phase>process-sources</phase>
<goals>
<goal>shell</goal>
</goals>
<configuration>
<workDir>${project.build.directory}/generated-sources/liblouisutdml</workDir>
<script>
#!/bin/sh
case ${nar.aol} in
amd64-Linux-gpp)
PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig:${project.build.directory}/nar/lib/${nar.aol}/shared/pkgconfig
;;
i386-Linux-gpp)
PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig:${project.build.directory}/nar/lib/${nar.aol}/shared/pkgconfig
;;
i686-w64-mingw32-gpp)
PKG_CONFIG_PATH=${project.build.directory}/nar/lib/i586-mingw32msvc-gpp/shared/pkgconfig:${project.build.directory}/nar/lib/${nar.aol}/shared/pkgconfig
;;
*)
PKG_CONFIG_PATH=${project.build.directory}/nar/lib/${nar.aol}/shared/pkgconfig
;;
esac
sed \
-e 's|^\(liblouisutdml_la_LDFLAGS =\)\(.*\)$|\1 ${nar.install_name.option} ${nar.rpath.option} -avoid-version \2|' \
../../../src/liblouisutdml/liblouisutdml/Makefile.am > liblouisutdml/Makefile.am
sed \
-e 's|\(^AM_LDFLAGS =\)\(.*\)$|\1 ${nar.rpath.option} \2|' \
../../../src/liblouisutdml/tools/Makefile.am > tools/Makefile.am
sed \
-e 's|^\(AM_CONDITIONAL(\[HAVE_HELP2MAN\],\)\(.*\)$|\1 \[false\])|' \
-e 's|^\(AC_INIT(liblouisutdml,\).*\(,.*\)$|\1 ${project.version}\2|' \
-e '/^AC_INIT.*$/a\
CFLAGS="$CFLAGS ${nar.arch.option} ${nar.jni.option} ${nar.libxml2.option}"\
export PKG_CONFIG_PATH="'$PKG_CONFIG_PATH'"\
' \
../../../src/liblouisutdml/configure.ac > configure.ac
sed \
-e '/^prefix=/d' \
-e '/^exec_prefix=/d' \
-e '/^lbudir=/d' \
-e 's|@libdir@|@NAR@/lib/${nar.aol}/shared|' \
-e 's|@includedir@|@NAR@/include|' \
../../../src/liblouisutdml/liblouisutdml.pc.in > liblouisutdml.pc.in
</script>
</configuration>
</execution>
<execution>
<id>test</id>
<phase>test</phase>
<goals>
<goal>shell</goal>
</goals>
<configuration>
<workDir>${project.build.directory}/test-classes</workDir>
<script>
#!/bin/sh
chmod +x file2brl
if [ "${nar.aol}" = i386-Linux-gpp ]; then
# when inside Docker container and about to run the 32-bit version, first copy the files into
# a temporary directory because in this case stat() does not work on files within mounted volume
mkdir -p /tmp/test-file2brl
cp * /tmp/test-file2brl
cd /tmp/test-file2brl
fi
./file2brl -f ./config.cfg input.xml
</script>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>i386</id>
<activation>
<property>
<name>os.arch</name>
<value>i386</value>
</property>
</activation>
<properties>
<nar.arch.option>-m32</nar.arch.option>
</properties>
</profile>
<profile>
<id>linux</id>
<activation>
<property>
<name>os.name</name>
<value>Linux</value>
</property>
</activation>
<properties>
<nar.rpath.option>-Wl,-rpath,".:\\\$\$ORIGIN",--enable-new-dtags</nar.rpath.option>
</properties>
</profile>
<profile>
<id>mac</id>
<activation>
<property>
<name>os.name</name>
<value>Mac OS X</value>
</property>
</activation>
<properties>
<nar.install_name.option>-Wl,-install_name,@loader_path/liblouisutdml.dylib</nar.install_name.option>
<nar.jni.option>-I/System/Library/Frameworks/JavaVM.framework/Headers</nar.jni.option>
<!--
FIXME: This depends on the exact location where the libxml2 header files where
installed. Homebrew refused to symlink this directory to
/usr/local/include/libxml2 because libxml2 is "macOS-provided software".
-->
<nar.libxml2.option>-I/usr/local/Cellar/libxml2/2.9.5/include/libxml2</nar.libxml2.option>
</properties>
</profile>
<profile>
<id>cross-compile</id>
<properties>
<nar.arch.option></nar.arch.option>
<nar.rpath.option></nar.rpath.option>
<nar.install_name.option></nar.install_name.option>
<nar.host.option>--host ${os.arch}-${host.os}</nar.host.option>
</properties>
<build>
<plugins>
<plugin>
<groupId>com.github.maven-nar</groupId>
<artifactId>nar-maven-plugin</artifactId>
<configuration>
<os>${host.os}</os>
<linker>
<name>gpp</name>
</linker>
</configuration>
<executions>
<execution>
<id>default-nar-validate</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack-libxml2</id>
<phase>generate-sources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.daisy.libs</groupId>
<artifactId>xml2</artifactId>
<version>${libxml2.version}</version>
<classifier>noarch</classifier>
<type>nar</type>
<outputDirectory>${project.build.directory}/nar</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.daisy.libs</groupId>
<artifactId>xml2</artifactId>
<version>${libxml2.version}</version>
<classifier>i586-mingw32msvc-gpp-shared</classifier>
<type>nar</type>
<outputDirectory>${project.build.directory}/nar</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
<execution>
<id>unpack-dlls</id>
<phase>generate-test-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.liblouis</groupId>
<artifactId>louis</artifactId>
<classifier>${nar.aol}-executable</classifier>
<type>nar</type>
<outputDirectory>${project.build.directory}/nar</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.daisy.libs</groupId>
<artifactId>xml2</artifactId>
<version>${libxml2.version}</version>
<classifier>i586-mingw32msvc-gpp-executable</classifier>
<type>nar</type>
<outputDirectory>${project.build.directory}/nar</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>process-sources</id>
<phase>process-sources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<replace dir="${project.build.directory}/nar/lib/${nar.aol}/shared/pkgconfig">
<replacefilter token="@NAR@" value="${project.build.directory}/nar"/>
</replace>
<replace dir="${project.build.directory}/nar/lib/i586-mingw32msvc-gpp/shared/pkgconfig">
<replacefilter token="@NAR@" value="${project.build.directory}/nar"/>
</replace>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>shell-maven-plugin</artifactId>
<configuration>
<chmod>true</chmod>
</configuration>
<executions>
<execution>
<id>test</id>
<phase>test</phase>
<goals>
<goal>shell</goal>
</goals>
<configuration>
<workDir>${project.build.directory}/test-classes</workDir>
<script>
#!/bin/sh
wine file2brl.exe -f .\\config.cfg input.xml
</script>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>with-java-bindings</id>
<properties>
<nar.java-bindings.option></nar.java-bindings.option>
</properties>
<build>
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-java</id>
<phase>generate-sources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/generated-sources/java</outputDirectory>
<overwrite>true</overwrite>
<resources>
<resource>
<directory>src/liblouisutdml/java/src</directory>
<includes>
<include>**/*.java</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>process-java</id>
<phase>process-sources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<fixcrlf srcDir="${project.build.directory}/generated-sources/java" includes="**/*.java"/>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>sonatype-deploy</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<configuration>
<useAgent>true</useAgent>
</configuration>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<distributionManagement>
<repository>
<id>sonatype-nexus-staging</id>
<name>oss.sonatype.org Staging Repository</name>
<url>http://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
<snapshotRepository>
<id>sonatype-nexus-snapshots</id>
<name>oss.sonatype.org github Release Repository Snapshot Repository</name>
<url>http://oss.sonatype.org/content/repositories/snapshots/</url>
</snapshotRepository>
</distributionManagement>
</project>