<?xml version="1.0" encoding="UTF-8"?>
<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>com.rackspace.repose.installation.deb</groupId>
        <artifactId>deb</artifactId>
        <version>2.0.0</version>
    </parent>

    <groupId>com.rackspace.repose.installation.deb.cli-utils</groupId>
    <artifactId>cli-utils</artifactId>
    <version>2.0.0</version>

    <name>Repose - Installation Cloud Integration CLI-Utilities DEB</name>

    <description>
        Module for the CLI-Utils DEB.
    </description>

    <packaging>pom</packaging>

    <profiles>
        <profile>
            <id>build-system-packages</id>

            <activation>
                <property>
                    <name>Build Command Line Utilities DEB</name>
                </property>
            </activation>

            <build>
                <plugins>

                    <plugin>
                        <groupId>org.vafer</groupId>
                        <artifactId>jdeb</artifactId>
                        <version>0.9</version>

                        <executions>
                            <execution>
                                <phase>package</phase>
                                <goals>
                                    <goal>jdeb</goal>
                                </goals>

                                <configuration>
                                    <deb>[[buildDir]]/repose-[[artifactId]]-[[version]].deb</deb> 
                                    <timestamped>true</timestamped>
                                    <dataSet>


                                            <!-- The jar file -->
                                        <data>
                                            <src>${basedir}/../../../components/cli-utils/target/repose-cli.jar</src>
                                            <type>file</type>
                                            <mapper>
                                                <type>perm</type>
                                                <prefix>/usr/share/lib/repose</prefix>
                                                <filemode>755</filemode>
                                            </mapper>
                                        </data>

                                            <!-- The start script -->
                                        <data>
                                            <src>${basedir}/../../../components/cli-utils/src/bash/dd-remove</src>
                                            <type>file</type>
                                            <mapper>
                                                <type>perm</type>
                                                <prefix>/etc/init.d</prefix>
                                                <filemode>755</filemode>
                                            </mapper>
                                        </data>

                                    </dataSet>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>

                </plugins>
            </build>
        </profile>
    </profiles>
</project>
