<?xml version="1.0" encoding="UTF-8"?>
|
<!--
|
The contents of this file are subject to the terms of the Common Development and
|
Distribution License (the License). You may not use this file except in compliance with the
|
License.
|
|
You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
|
specific language governing permission and limitations under the License.
|
|
When distributing Covered Software, include this CDDL Header Notice in each file and include
|
the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
|
Header, with the fields enclosed by brackets [] replaced by your own identifying
|
information: "Portions Copyright [year] [name of copyright owner]".
|
|
Copyright 2015-2016 ForgeRock AS.
|
-->
|
<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/xsd/maven-4.0.0.xsd">
|
<modelVersion>4.0.0</modelVersion>
|
|
<parent>
|
<groupId>org.openidentityplatform.opendj</groupId>
|
<artifactId>opendj-packages</artifactId>
|
<version>4.4.7-SNAPSHOT</version>
|
</parent>
|
|
<packaging>pom</packaging>
|
|
<artifactId>opendj-rpm</artifactId>
|
<name>OpenDJ RPM Packages Parent</name>
|
|
<profiles>
|
<profile>
|
<id>packages</id>
|
<activation>
|
<file><exists>/bin/rpm</exists></file>
|
</activation>
|
<modules>
|
<module>opendj-rpm-standard</module>
|
</modules>
|
</profile>
|
<profile>
|
<id>packages2</id>
|
<activation>
|
<file><exists>/usr/bin/rpm</exists></file>
|
</activation>
|
<modules>
|
<module>opendj-rpm-standard</module>
|
</modules>
|
</profile>
|
<profile>
|
<id>packages3</id>
|
<activation>
|
<file><exists>/opt/local/bin/rpm</exists></file>
|
</activation>
|
<modules>
|
<module>opendj-rpm-standard</module>
|
</modules>
|
</profile>
|
</profiles>
|
|
<description>
|
This module contains configuration and generic plugin calls to generate RPM OpenDJ packages.
|
</description>
|
|
<properties>
|
<rpm.prefix>/opt/${product.name.lowercase}</rpm.prefix>
|
<manpage.dir>${project.build.directory}/dependency/man</manpage.dir>
|
<doc.homepage.url>https://github.com/OpenIdentityPlatform/OpenDJ</doc.homepage.url>
|
<rpm.license />
|
<rpm.product.name />
|
<rpm.product.name.lowercase />
|
<rpm.resources.path />
|
<rpm.description.header />
|
<rpm.product.summary />
|
</properties>
|
|
<build><finalName>${project.groupId}.${project.artifactId}</finalName>
|
<pluginManagement>
|
<plugins>
|
<!-- Unpack man pages -->
|
<plugin>
|
<groupId>org.apache.maven.plugins</groupId>
|
<artifactId>maven-dependency-plugin</artifactId>
|
<executions>
|
<execution>
|
<id>unpack-man-pages</id>
|
<phase>package</phase>
|
<goals>
|
<goal>unpack</goal>
|
</goals>
|
<configuration>
|
<artifactItems>
|
<artifactItem>
|
<groupId>org.openidentityplatform.opendj</groupId>
|
<artifactId>opendj-doc-generated-ref</artifactId>
|
<version>${project.version}</version>
|
<outputDirectory>${project.build.directory}/dependency/man</outputDirectory>
|
<classifier>server-man-pages</classifier>
|
</artifactItem>
|
</artifactItems>
|
</configuration>
|
</execution>
|
</executions>
|
</plugin>
|
|
<!--
|
This plugin execution is used to replace the dash in the project version (if any) by an
|
underscore since an rpm package name must follow the Name-Version-Release pattern so the
|
Version field cannot contains dash.
|
-->
|
<plugin>
|
<groupId>org.codehaus.mojo</groupId>
|
<artifactId>build-helper-maven-plugin</artifactId>
|
<executions>
|
<execution>
|
<id>regex-property</id>
|
<goals>
|
<goal>regex-property</goal>
|
</goals>
|
<configuration>
|
<name>rpm.version</name>
|
<value>${project.version}</value>
|
<regex>(.*)[-](.*)</regex>
|
<replacement>$1_$2</replacement>
|
<failIfNoMatch>false</failIfNoMatch>
|
</configuration>
|
</execution>
|
</executions>
|
</plugin>
|
|
<plugin>
|
<groupId>org.codehaus.mojo</groupId>
|
<artifactId>rpm-maven-plugin</artifactId>
|
<version>2.1.5</version>
|
<executions>
|
<execution>
|
<id>generate-rpm-package</id>
|
<phase>package</phase>
|
<goals>
|
<goal>attached-rpm</goal>
|
</goals>
|
</execution>
|
</executions>
|
|
<configuration>
|
<summary>${rpm.product.name}</summary>
|
<name>${rpm.product.name.lowercase}</name>
|
<prefix>${rpm.prefix}</prefix>
|
<license>${rpm.license}</license>
|
<group>Productivity/Networking/LDAP/Servers</group>
|
<url>${doc.homepage.url}</url>
|
<needarch>noarch</needarch>
|
<targetOS>linux</targetOS>
|
<description>
|
${rpm.description.header}
|
OpenDJ is an LDAPv3 compliant directory service, developed for the Java
|
platform, providing a high performance, highly available and secure store
|
for the identities managed by enterprises. Its easy installation process,
|
combined with the power of the Java platform makes OpenDJ one of the
|
simplest and fastest directory servers to deploy and manage.
|
|
${rpm.product.summary}
|
</description>
|
|
<defineStatements>
|
<defineStatement>arch noarch</defineStatement>
|
<defineStatement>_prefix ${rpm.prefix}</defineStatement>
|
<defineStatement>_pre ${rpm.product.name.lowercase}-${rpm.version}</defineStatement>
|
<defineStatement>__os_install_post %{nil}</defineStatement>
|
</defineStatements>
|
|
<mappings>
|
<!-- Add directories -->
|
<mapping>
|
<directory>${rpm.prefix}</directory>
|
</mapping>
|
|
<mapping>
|
<directory>${rpm.prefix}/bin</directory>
|
</mapping>
|
|
<mapping>
|
<directory>${rpm.prefix}/legal-notices</directory>
|
</mapping>
|
|
<mapping>
|
<directory>${rpm.prefix}/lib</directory>
|
</mapping>
|
|
<mapping>
|
<directory>${rpm.prefix}/lib/extensions</directory>
|
</mapping>
|
|
<mapping>
|
<directory>${rpm.prefix}/share</directory>
|
</mapping>
|
|
<mapping>
|
<directory>${rpm.prefix}/share/man</directory>
|
</mapping>
|
|
<mapping>
|
<directory>${rpm.prefix}/share/man/META-INF</directory>
|
</mapping>
|
|
<mapping>
|
<directory>${rpm.prefix}/share/man/man1</directory>
|
</mapping>
|
|
<mapping>
|
<directory>${rpm.prefix}/share/man/man5</directory>
|
</mapping>
|
|
<mapping>
|
<directory>${rpm.prefix}/snmp</directory>
|
</mapping>
|
|
<mapping>
|
<directory>${rpm.prefix}/snmp/mib</directory>
|
</mapping>
|
|
<!-- Add service script -->
|
<mapping>
|
<directory>/etc/init.d</directory>
|
<directoryIncluded>false</directoryIncluded>
|
<filemode>755</filemode>
|
<sources>
|
<source>
|
<location>${sysv.file.location}</location>
|
</source>
|
</sources>
|
</mapping>
|
|
<!-- Add executable scripts and libraries -->
|
<mapping>
|
<directory>${rpm.prefix}</directory>
|
<filemode>755</filemode>
|
<sources>
|
<source>
|
<location>${project.build.directory}/${product.name.lowercase}</location>
|
<includes>
|
<include>bin/**</include>
|
<include>lib/*.sh</include>
|
<include>setup</include>
|
<include>uninstall</include>
|
<include>upgrade</include>
|
</includes>
|
|
<excludes>
|
<exclude>**/*.exe</exclude>
|
<exclude>**/*bat</exclude>
|
<exclude>**/*.app/**</exclude>
|
<exclude>**/*.app</exclude>
|
</excludes>
|
</source>
|
</sources>
|
</mapping>
|
|
<!-- Add man pages -->
|
<mapping>
|
<directory>${rpm.prefix}/share/man</directory>
|
<sources>
|
<source>
|
<location>${project.build.directory}/dependency/man</location>
|
<includes>
|
<include>**/*.*</include>
|
</includes>
|
</source>
|
</sources>
|
</mapping>
|
|
<!-- Add other files to the rpm -->
|
<mapping>
|
<directory>${rpm.prefix}</directory>
|
<sources>
|
<source>
|
<location>${project.build.directory}/${product.name.lowercase}</location>
|
<excludes>
|
<exclude>template/**</exclude>
|
<exclude>bin/**</exclude>
|
<exclude>lib/*.sh</exclude>
|
<exclude>setup</exclude>
|
<exclude>uninstall</exclude>
|
<exclude>upgrade</exclude>
|
<exclude>**/*.exe</exclude>
|
<exclude>**/*bat</exclude>
|
<exclude>**/readme</exclude>
|
<exclude>**/README</exclude>
|
<exclude>**/*.app/**</exclude>
|
<exclude>**/*.app</exclude>
|
</excludes>
|
</source>
|
</sources>
|
</mapping>
|
|
<!-- Add template dir -->
|
<mapping>
|
<directory>${rpm.prefix}/template</directory>
|
<sources>
|
<source>
|
<location>${project.build.directory}/${product.name.lowercase}/template
|
</location>
|
</source>
|
</sources>
|
</mapping>
|
</mappings>
|
|
<preinstallScriptlet>
|
<scriptFile>${rpm.resources.path}/specs/preinstall.sh</scriptFile>
|
<fileEncoding>utf-8</fileEncoding>
|
</preinstallScriptlet>
|
|
<postinstallScriptlet>
|
<scriptFile>${rpm.resources.path}/specs/postinstall.sh</scriptFile>
|
<fileEncoding>utf-8</fileEncoding>
|
</postinstallScriptlet>
|
|
<preremoveScriptlet>
|
<scriptFile>${rpm.resources.path}/specs/preuninstall.sh</scriptFile>
|
<fileEncoding>utf-8</fileEncoding>
|
</preremoveScriptlet>
|
|
<postremoveScriptlet>
|
<scriptFile>${rpm.resources.path}/specs/postuninstall.sh</scriptFile>
|
<fileEncoding>utf-8</fileEncoding>
|
</postremoveScriptlet>
|
|
<cleanScriptlet>
|
<scriptFile>${rpm.resources.path}/specs/clean.sh</scriptFile>
|
<fileEncoding>utf-8</fileEncoding>
|
</cleanScriptlet>
|
|
<changelogFile>${rpm.resources.path}/changelog</changelogFile>
|
</configuration>
|
</plugin>
|
</plugins>
|
</pluginManagement>
|
</build>
|
</project>
|