added information about the license in /opt/upnpmonitor
[upnpmonitor] / wamblee-upnpmonitor / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd ">
4     
5     <parent>
6     <groupId>org.wamblee.upnpmonitor</groupId>
7     <artifactId>root</artifactId>
8     <version>0.1-SNAPSHOT</version>
9   </parent>
10     
11     <modelVersion>4.0.0</modelVersion>
12     <artifactId>wamblee-upnpmonitor</artifactId>
13         <packaging>rpm</packaging>
14     <name>/wamblee-upnpmonitor</name>
15         
16         <dependencies>
17             <dependency>
18                     <groupId>org.wamblee.upnpmonitor</groupId>
19                         <artifactId>monitor</artifactId>
20                         <version>0.1-SNAPSHOT</version>
21                 </dependency>
22         </dependencies>
23
24     <build>
25         <plugins>
26             <plugin>
27                 <groupId>org.codehaus.mojo</groupId>
28                 <artifactId>rpm-maven-plugin</artifactId>
29                 <version>2.1-alpha-1</version>
30                 <extensions>true</extensions>
31                 <configuration>
32                     <changelogFile>CHANGELOG</changelogFile>
33                     <copyright>Apache License 2.0, 2010</copyright>
34                     <group>org.wamblee.server</group>
35                     <packager>Erik Brakkee</packager>
36                     
37                     <mappings>
38                         <mapping>
39                             <directory>/etc/init.d</directory>
40                             <filemode>755</filemode>
41                             <username>root</username>
42                             <groupname>root</groupname>
43                             <sources>
44                                 <source>
45                                     <location>files/etc/init.d</location>
46                                 </source>
47                             </sources>
48                         </mapping>
49                                                 
50                                                 <mapping>
51                             <directory>/opt/upnpmonitor</directory>
52                             <username>root</username>
53                             <groupname>root</groupname>
54                             <sources>
55                                 <source>
56                                     <location>files/opt/upnpmonitor</location>
57                                 </source>
58                             </sources>
59                         </mapping>
60                                                 
61                                                 <mapping>
62                                                     <directory>/opt/upnpmonitor/lib</directory>
63                                                         <filemode>755</filemode>
64                                                         <username>root</username>
65                                                         <groupname>root</groupname>
66                                                         <dependency/>
67                                                 </mapping>
68                        
69                         <mapping>
70                             <directory>/etc/profile.d</directory>
71                             <username>root</username>
72                             <groupname>root</groupname>
73                             <sources>
74                                 <source>
75                                     <location>files/etc/profile.d</location>
76                                 </source>
77                             </sources>
78                         </mapping>
79         
80                         <mapping>
81                             <directory>/usr/share/doc/packages/wamblee-upnpmonitor</directory>
82                             <username>root</username>
83                             <groupname>root</groupname>
84                             <sources>
85                                 <source>
86                                     <location>files/usr/share/doc/packages/wamblee-upnpmonitor</location>
87                                 </source>
88                             </sources>
89                         </mapping>
90                         
91                     </mappings>
92                     <provides>
93                         <provide>upnpmonitor</provide>
94                     </provides>
95                     <requires>
96                         <require>java-1_6_0-sun-devel</require>
97                     </requires>
98                                         <preinstallScriptlet>
99                                            <script><![CDATA[
100                                                
101                                                if grep '^java:' /etc/passwd > /dev/null
102                                                then
103                                                  echo "User java already exists." 1>&2
104                                                else
105                                                  /usr/sbin/useradd -m java
106                                                fi
107                                                (
108                                                  echo "Make sure that user java has login enabled!"
109                                                  echo "(passwd java)"
110                                                ) 1>&2
111                                                
112                                                if [[ -r /etc/init.d/glassfish ]]
113                                                then
114                                                  echo "This RPM does not support upgrade" 1>&2
115                                                  exit 1
116                                                fi
117                                            
118                                            ]]></script>
119                                         </preinstallScriptlet>
120                     
121                     <preremoveScriptlet>
122                        <script><![CDATA[
123                           /etc/init.d/upnpmonitor stop
124                           /sbin/chkconfig upnpmonitor off
125                        ]]></script>
126                     </preremoveScriptlet>
127                 </configuration>
128             </plugin>
129         </plugins>
130     </build>
131     
132 </project>