Project

General

Profile

« Previous | Next » 

Revision 25876144

Added by Andreas Kohlbecker almost 11 years ago

first commits towards fixing #2324

View differences:

src/main/installer/linux/build-deb.xml
1 1
<project name="Java application deb packager" default="deb_package">
2 2

  
3
	<echo>basedir: ${basedir}</echo>
4
	<!-- UNUSED
3
  <!-- UNUSED
5 4
  <tstamp>
6 5
    <format property="project.buildtimestamp" pattern="yyyyMMddkkmmss"/>
7 6
  </tstamp>
8 7
  -->
9
	
10
	<!-- Package Name & Version -->
11
	<property name="package.name" value="cdmserver" />
12
	<!-- ${project.fullversionstring} must be passed as parameter --> 
13
	<property name="version.cdmserver" value="${project.fullversionstring}" />
14
	<property name="version.debian" value="5" />
15
	<echo>upstream-version = version.cdmserver: ${version.cdmserver}</echo>
16
	<echo>debian-version = version.debian: ${version.debian}</echo>
17
	
18
	<!-- Various Filenames -->
19
	<property name="cdmserverscript.filename" value="cdmserver" />
20
	<property name="datasources.filename" value="datasources.xml" />
21
	<property name="cdmserver.filename" value="cdm-server-${project.version}.jar" />
22
    <property name="cdmserver.destinationfilename" value="cdm-server.jar" />
23 8

  
24
	<!-- Various Paths -->
25
	<property name="installer.path" value="src/main/installer" />
26
	<property name="cdmserver.target.path" value="target" />
27
	<property name="dest.path" value="usr/bin" />
28
	<property name="linux.installer.path" value="${installer.path}/linux" />
29
	<!-- location -->
30
	<property name="basedirToRemoteRoot" value="../../../.." />
31
	<!--
32
    <property name="initscript.path" location="${installer.path}/linux/initscript" />
33
	<property name="cdmlibremote.path" value="../../../.." />
34
	-->
35
	<property name="cdmserverscript.path" value="${installer.path}/templates" />
36
	<!-- location -->
37
	<property name="cdmserver.path" value="${installer.path}/templates" />
38
	<!-- location -->
39
	<property name="datasources.path" value="${installer.path}/templates/.cdmLibrary" />
40
	<!-- location -->
41
	<property name="postinst.path" value="${linux.installer.path}"/>
42
	<!-- location -->
43
	<property name="postrm.path" value="${linux.installer.path}"/>
44
	<!-- location -->
45
	<property name="ant-deb-task.path" value="${linux.installer.path}/../lib"/>
46
	<!-- location -->
9
  <!-- Package Name & Version -->
10
  <property name="package.name" value="cdmserver" />
11
  <!-- ${project.fullversionstring} must be passed as parameter -->
12
  <property name="version.cdmserver" value="${project.fullversionstring}" />
13
  <property name="version.debian" value="5" />
47 14

  
48
	<!-- create distribution target -->
49
	<path id="ant-deb-task.classpath">
50
		<fileset dir="${basedir}/${ant-deb-task.path}" includes="*.jar" />
51
	</path>	
52
  <taskdef resource="ant_deb_task.properties" classpathref="ant-deb-task.classpath">
53
	</taskdef>
54 15

  
55
	<target name="deb_package" description="build the deb file">
56
		<mkdir dir="target/installer" />
57
		<deb todir="target/installer" package="${package.name}" 
58
			section="graphics" postinst="${postinst.path}/postinst" 
59
			postrm="${postinst.path}/postrm">
60
			<version upstream="${version.cdmserver}" debian="${version.debian}" />
61
			<maintainer name="BGBM Team" email="editsupport@bgbm.de" />
62
			<description synopsis="CDM Server: The CDM model for the EDIT Biodiversity Project">
63
CDM Server is a cross platform blablabla, visit www.bgbm.de for more info.
64
            </description>
16
  <!-- Various Filenames -->
17
  <property name="cdmserverscript.filename" value="cdmserver" />
18
  <property name="cdmserver.filename" value="cdm-server-${project.version}.jar" />
19
  <property name="cdmserver.destinationfilename" value="cdm-server.jar" />
20

  
21
  <!-- Various Paths -->
22
  <property name="installer.path" value="src/main/installer" />
23
  <property name="linux.installer.path" value="${installer.path}/linux" />
24
  <echo>linux.installer.path= ${linux.installer.path}</echo>
25

  
26
  <property name="maven.target.path" value="target" />
27
  <property name="basedirToRemoteRoot" value="../../../.." />
28
  <property name="ant-deb-task.path" value="${installer.path}/lib"/>
65 29

  
66
			<tarfileset file="${linux.installer.path}/${cdmserverscript.filename}" prefix="${dest.path}" />
67
			<tarfileset file="${datasources.path}/${datasources.filename}" prefix="${dest.path}" />
68
			<tarfileset file="${cdmserver.target.path}/${cdmserver.filename}" fullpath="${dest.path}/${cdmserver.destinationfilename}" />
30
  <!-- Report on some variables -->
31
  <echo>basedir: ${basedir}</echo>
32
  <echo>cdmserver.filename: ${cdmserver.filename}</echo>
33
  <echo>upstream-version = version.cdmserver: ${version.cdmserver}</echo>
34
  <echo>debian-version = version.debian: ${version.debian}</echo>
35

  
36
  <!-- create distribution target -->
37
  <path id="ant-deb-task.classpath">
38
    <fileset dir="${basedir}/${ant-deb-task.path}" includes="*.jar" />
39
  </path>
40
  <taskdef resource="ant_deb_task.properties" classpathref="ant-deb-task.classpath">
41
  </taskdef>
69 42

  
70
		</deb>
71
	</target>
43
  <target name="deb_package" description="build the deb file">
44
    <mkdir dir="target/installer" />
45
    <deb todir="target/installer"
46
        package="${package.name}"
47
        preDepends="jsvc"
48
        section="web"
49
        postinst="${linux.installer.path}/postinst"
50
        postrm="${linux.installer.path}/postrm"
51
      >
52
      <version upstream="${version.cdmserver}" debian="${version.debian}" />
53
      <maintainer name="EDIT (European Distributed Institute of Taxonomy)" email="editsupport@bgbm.de" />
54
      <description synopsis="The CDM Standalone Server exposes data stored in a CDM data base to the web.">
55
        The CDM Community Standalone Server exposes data stored in a CDM data base to the web.
56
        It is a Jetty based web application container bundeled with a simple management
57
        webapplication and of course with the remote component of the CDM Library.
58
        For more information please refer to http://wp5.e-taxonomy.eu/
59
      </description>
60
      <tarfileset file="${linux.installer.path}/${cdmserverscript.filename}" prefix="/etc/init.d/" />
61
      <tarfileset file="${installer.path}/templates/.cdmLibrary/*" prefix="/opt/cdmserver/templates/.cdmLibrary/" />
62
      <tarfileset file="${maven.target.path}/${cdmserver.filename}" fullpath="/opt/cdmserver/${cdmserver.destinationfilename}" />
63
    </deb>
64
  </target>
72 65
</project>

Also available in: Unified diff