| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one |
| or more contributor license agreements. See the NOTICE file |
| distributed with this work for additional information |
| regarding copyright ownership. The ASF licenses this file |
| to you under the Apache License, Version 2.0 (the |
| "License"); you may not use this file except in compliance |
| with the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, |
| software distributed under the License is distributed on an |
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| KIND, either express or implied. See the License for the |
| specific language governing permissions and limitations |
| under the License. |
| --> |
| <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> |
| <packaging>pom</packaging> |
| <artifactId>rpm-packaging</artifactId> |
| <name>Brooklyn RPM Package</name> |
| <description> |
| Brooklyn RPM Package for Centos 7 and RHEL 7 operating systems |
| </description> |
| |
| <properties> |
| <brooklyn.directory.permission.default>740</brooklyn.directory.permission.default> |
| <brooklyn.directory.permission.root>740</brooklyn.directory.permission.root> |
| <brooklyn.file.permission.default>740</brooklyn.file.permission.default> |
| <brooklyn.file.permission.bin>740</brooklyn.file.permission.bin> |
| <brooklyn.file.permission.global>664</brooklyn.file.permission.global> |
| </properties> |
| |
| <parent> |
| <groupId>org.apache.brooklyn</groupId> |
| <artifactId>brooklyn-dist-root</artifactId> |
| <version>1.0.0-SNAPSHOT</version> <!-- BROOKLYN_VERSION --> |
| <relativePath>../pom.xml</relativePath> |
| </parent> |
| |
| <dependencies> |
| <dependency> |
| <groupId>org.apache.brooklyn</groupId> |
| <artifactId>apache-brooklyn</artifactId> |
| <version>${project.version}</version> |
| <type>zip</type> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.brooklyn</groupId> |
| <artifactId>shared-packaging</artifactId> |
| <version>${project.version}</version> |
| </dependency> |
| </dependencies> |
| <build> |
| <plugins> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-dependency-plugin</artifactId> |
| <executions> |
| <execution> |
| <id>unpack</id> |
| <phase>package</phase> |
| <goals> |
| <goal>unpack</goal> |
| </goals> |
| <configuration> |
| <artifactItems> |
| <artifactItem> |
| <groupId>org.apache.brooklyn</groupId> |
| <artifactId>apache-brooklyn</artifactId> |
| <version>${project.version}</version> |
| <type>zip</type> |
| <outputDirectory>${project.build.directory}/deps</outputDirectory> |
| </artifactItem> |
| <artifactItem> |
| <groupId>org.apache.brooklyn</groupId> |
| <artifactId>shared-packaging</artifactId> |
| <version>${project.version}</version> |
| <type>jar</type> |
| <outputDirectory>${project.build.directory}/deps/shared-packaging</outputDirectory> |
| </artifactItem> |
| </artifactItems> |
| </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</id> |
| <goals> |
| <goal>attached-rpm</goal> |
| </goals> |
| </execution> |
| </executions> |
| <configuration> |
| <name>apache-brooklyn</name> |
| <license>ASL 2.0</license> |
| <group>Applications/Internet</group> |
| <changelogFile><!--TODO--></changelogFile> |
| <needarch>noarch</needarch> |
| <classifier>noarch</classifier> |
| <targetOS>Linux</targetOS> |
| <requires> |
| <require>java-1.8.0</require> |
| </requires> |
| <defineStatements> |
| <defineStatement>_binaries_in_noarch_packages_terminate_build 0</defineStatement> |
| </defineStatements> |
| <defaultDirmode>${brooklyn.directory.permission.default}</defaultDirmode> |
| <defaultFilemode>${brooklyn.file.permission.default}</defaultFilemode> |
| <defaultGroupname>brooklyn</defaultGroupname> |
| <defaultUsername>brooklyn</defaultUsername> |
| <mappings> |
| <mapping> |
| <directory>/opt/brooklyn-${project.version}</directory> |
| </mapping> |
| <mapping> |
| <directory>/opt/brooklyn-${project.version}/bin</directory> |
| <filemode>${brooklyn.file.permission.bin}</filemode> |
| <sources> |
| <source> |
| <location>${project.build.directory}/deps/apache-brooklyn-${project.version}/bin</location> |
| </source> |
| </sources> |
| </mapping> |
| <mapping> |
| <directory>/opt/brooklyn-${project.version}/catalog</directory> |
| </mapping> |
| <mapping> |
| <directory>/opt/brooklyn-${project.version}/data</directory> |
| <directoryIncluded>true</directoryIncluded> |
| <recurseDirectories>true</recurseDirectories> |
| <sources> |
| <source> |
| <location>${project.build.directory}/deps/apache-brooklyn-${project.version}/data</location> |
| </source> |
| </sources> |
| </mapping> |
| <mapping> |
| <directory>/opt/brooklyn-${project.version}/data/log</directory> |
| </mapping> |
| <mapping> |
| <directory>/opt/brooklyn-${project.version}/deploy</directory> |
| <sources> |
| <source> |
| <location>${project.build.directory}/deps/apache-brooklyn-${project.version}/deploy</location> |
| </source> |
| </sources> |
| </mapping> |
| <mapping> |
| <directory>/etc/brooklyn</directory> |
| <configuration>noreplace</configuration> |
| <filemode>${brooklyn.file.permission.default}</filemode> |
| <sources> |
| <source> |
| <location>${project.build.directory}/deps/apache-brooklyn-${project.version}/etc</location> |
| </source> |
| </sources> |
| </mapping> |
| <mapping> |
| <directory>/opt/brooklyn-${project.version}/lib</directory> |
| <sources> |
| <source> |
| <location>${project.build.directory}/deps/apache-brooklyn-${project.version}/lib</location> |
| </source> |
| </sources> |
| </mapping> |
| <mapping> |
| <directory>/opt/brooklyn-${project.version}/system</directory> |
| <sources> |
| <source> |
| <location>${project.build.directory}/deps/apache-brooklyn-${project.version}/system</location> |
| </source> |
| </sources> |
| </mapping> |
| <mapping> |
| <directory>/opt/brooklyn-${project.version}</directory> |
| <sources> |
| <source> |
| <location>${project.build.directory}/deps/apache-brooklyn-${project.version}/LICENSE</location> |
| </source> |
| </sources> |
| </mapping> |
| <mapping> |
| <directory>/opt/brooklyn-${project.version}</directory> |
| <sources> |
| <source> |
| <location>${project.build.directory}/deps/apache-brooklyn-${project.version}/NOTICE</location> |
| </source> |
| </sources> |
| </mapping> |
| <mapping> |
| <directory>/lib/systemd/system</directory> |
| <directoryIncluded>false</directoryIncluded> |
| <filemode>${brooklyn.file.permission.global}</filemode> |
| <username>root</username> |
| <groupname>root</groupname> |
| <sources> |
| <source> |
| <location>${project.build.directory}/deps/shared-packaging/service/systemd</location> |
| </source> |
| </sources> |
| </mapping> |
| <mapping> |
| <directory>/etc/init</directory> |
| <directoryIncluded>false</directoryIncluded> |
| <filemode>${brooklyn.file.permission.global}</filemode> |
| <username>root</username> |
| <groupname>root</groupname> |
| <sources> |
| <source> |
| <location>${project.build.directory}/deps/shared-packaging/service/upstart/rpm/</location> |
| </source> |
| </sources> |
| </mapping> |
| <mapping> |
| <directory>/etc/systemd/system/multi-user.target.wants</directory> |
| <directoryIncluded>false</directoryIncluded> |
| <filemode>${brooklyn.file.permission.global}</filemode> |
| <username>root</username> |
| <groupname>root</groupname> |
| <sources> |
| <source> |
| <location>${project.build.directory}/deps/shared-packaging/service/systemd</location> |
| </source> |
| </sources> |
| </mapping> |
| <mapping> |
| <directory>/var/lib/brooklyn</directory> |
| <filemode>${brooklyn.file.permission.default}</filemode> |
| </mapping> |
| <mapping> |
| <directory>/opt/brooklyn</directory> |
| <sources> |
| <softlinkSource> |
| <location>/opt/brooklyn-${project.version}</location> |
| </softlinkSource> |
| </sources> |
| </mapping> |
| <mapping> |
| <directory>/var/log/brooklyn</directory> |
| <sources> |
| <softlinkSource> |
| <location>/opt/brooklyn-${project.version}/data/log</location> |
| </softlinkSource> |
| </sources> |
| </mapping> |
| <!-- There is a bug in karaf 4.1.2 that ignores the KARAF_ETC envvar. The workaround is to softlink to the etc folder --> |
| <!-- Until it is resolved: https://issues.apache.org/jira/browse/KARAF-5352 --> |
| <mapping> |
| <directory>/opt/brooklyn-${project.version}/etc</directory> |
| <sources> |
| <softlinkSource> |
| <location>/etc/brooklyn</location> |
| </softlinkSource> |
| </sources> |
| </mapping> |
| </mappings> |
| <preinstallScriptlet> |
| <scriptFile>${basedir}/rpm/preinstall.sh</scriptFile> |
| </preinstallScriptlet> |
| <postinstallScriptlet> |
| <scriptFile>${basedir}/rpm/postinstall.sh</scriptFile> |
| </postinstallScriptlet> |
| <preremoveScriptlet> |
| <scriptFile>${basedir}/rpm/preremove.sh</scriptFile> |
| </preremoveScriptlet> |
| </configuration> |
| </plugin> |
| </plugins> |
| </build> |
| </project> |