blob: de019f8c7893f8726309053c53f7c19ef9cf06db (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
|
<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>
<groupId>net.sourceforge.subsonic</groupId>
<artifactId>subsonic-installer-rpm</artifactId>
<packaging>pom</packaging>
<name>Subsonic Installer for RPM</name>
<parent>
<groupId>net.sourceforge.subsonic</groupId>
<artifactId>subsonic</artifactId>
<version>4.7.beta2</version>
</parent>
<profiles>
<profile>
<id>linux</id>
<activation>
<os>
<family>linux</family>
</os>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>create</goal>
</goals>
</execution>
</executions>
<configuration>
<doCheck>false</doCheck>
<doUpdate>false</doUpdate>
</configuration>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>rpm</id>
<phase>compile</phase>
<configuration>
<target>
<echo>Creating RPM package...</echo>
<copy file="${basedir}/src/subsonic.spec"
todir="${project.build.directory}/rpm/SPECS">
<filterset>
<filter token="VERSION" value="${project.version}"/>
<filter token="BUILD_NUMBER" value="${buildNumber}"/>
</filterset>
</copy>
<!--Remove ".beta" suffix from version tag.-->
<replace file="${project.build.directory}/rpm/SPECS/subsonic.spec">
<replacetoken>.beta1</replacetoken>
<replacetoken>.beta2</replacetoken>
<replacetoken>.beta3</replacetoken>
<replacetoken>.beta4</replacetoken>
</replace>
<copy file="${basedir}/src/etc/init.d/subsonic"
todir="${project.build.directory}/rpm/buildroot/etc/init.d"/>
<copy file="${basedir}/src/etc/sysconfig/subsonic"
todir="${project.build.directory}/rpm/buildroot/etc/sysconfig"/>
<copy file="../subsonic-booter/src/main/script/subsonic.sh"
todir="${project.build.directory}/rpm/buildroot/usr/share/subsonic"/>
<copy file="../subsonic-booter/target/subsonic-booter-jar-with-dependencies.jar"
todir="${project.build.directory}/rpm/buildroot/usr/share/subsonic"/>
<copy file="../subsonic-main/target/subsonic.war"
todir="${project.build.directory}/rpm/buildroot/usr/share/subsonic"/>
<copy file="../subsonic-transcode/linux/ffmpeg"
todir="${project.build.directory}/rpm/buildroot/var/subsonic/transcode"/>
<copy file="../subsonic-transcode/linux/lame"
todir="${project.build.directory}/rpm/buildroot/var/subsonic/transcode"/>
<exec executable="rpmbuild">
<arg value="-bb"/>
<arg value="--buildroot"/>
<arg value="${project.build.directory}/rpm/buildroot"/>
<arg value="--define"/>
<arg value="_topdir ${project.build.directory}/rpm"/>
<arg value="--target"/>
<arg value="i386"/>
<arg value="${project.build.directory}/rpm/SPECS/subsonic.spec"/>
</exec>
<copy tofile="${project.build.directory}/subsonic-${project.version}.rpm">
<fileset dir="${project.build.directory}/rpm/RPMS/i386">
<include name="*.rpm"/>
</fileset>
</copy>
<exec executable="rpmlint">
<arg value="${project.build.directory}/subsonic-${project.version}.rpm"/>
</exec>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
|