<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>
	<artifactId>adjuva-deb</artifactId>
	<name>Adjuva Debian Package</name>
	<description>An installable .deb package for the Adjuva client.</description>
	<parent>
		<groupId>com.sshtools</groupId>
		<artifactId>adjuva-group</artifactId>
		<version>0.0.1-SNAPSHOT</version>
		<relativePath>../adjuva-group</relativePath>
	</parent>
	<build>
		<plugins>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-dependency-plugin</artifactId>
				<version>2.8</version>
				<executions>
					<execution>
						<id>adjuva-deb</id>
						<phase>package</phase>
						<goals>
							<goal>copy-dependencies</goal>
						</goals>
						<configuration>
							<stripVersion>true</stripVersion>
							<outputDirectory>${staging.dir}/dependency</outputDirectory>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<artifactId>jdeb</artifactId>
				<groupId>org.vafer</groupId>
				<version>1.0.1</version>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>jdeb</goal>
						</goals>
						<configuration>
						</configuration>
					</execution>
				</executions>
				<configuration>
					<installDir>/usr/lib/adjuva</installDir>
					<deb>target/adjuva_${project.version}_${buildArch}.deb</deb>
					<dataSet>
						<data>
							<type>directory</type>
							<src>${staging.dir}/dependency</src>
							<includes>*.jar</includes>
							<mapper>
								<type>perm</type>
								<strip>1</strip>
								<prefix>/usr/lib/adjuva</prefix>
								<user>root</user>
								<group>root</group>
								<filemode>755</filemode>
							</mapper>
						</data>
						
						<data>
							<type>directory</type>
							<src>src/deb/scripts</src>
							<includes>*</includes>
							<mapper>
								<type>perm</type>
								<strip>1</strip>
								<prefix>/usr/bin</prefix>
								<user>root</user>
								<group>root</group>
								<filemode>755</filemode>
							</mapper>
						</data>
						<data>
							<type>directory</type>
							<src>src/deb/images</src>
							<includes>*</includes>
							<mapper>
								<type>perm</type>
								<strip>1</strip>
								<prefix>/usr/share/pixmaps</prefix>
								<user>root</user>
								<group>root</group>
								<filemode>755</filemode>
							</mapper>
						</data>
						<data>
							<type>directory</type>
							<src>src/deb/applications</src>
							<includes>*</includes>
							<mapper>
								<type>perm</type>
								<strip>1</strip>
								<prefix>/usr/share/applications</prefix>
								<user>root</user>
								<group>root</group>
								<filemode>755</filemode>
							</mapper>
						</data>
					</dataSet>
				</configuration>
				<dependencies>
					<dependency>
						<groupId>ant</groupId>
						<artifactId>ant</artifactId>
						<version>1.7.0</version>
					</dependency>
				</dependencies>
			</plugin>
		</plugins>
	</build>

	<dependencies>
		<dependency>
			<groupId>com.sshtools</groupId>
			<artifactId>adjuva-client</artifactId>
			<version>${project.version}</version>
			<scope>compile</scope>
		</dependency>
	</dependencies>

	<properties>
		<buildArch>${os.arch}</buildArch>
		<staging.dir>${project.build.directory}/staging</staging.dir>
	</properties>
</project>