renamed rpm to wamblee-upnpmonitor to make it unique.
[upnpmonitor] / wamblee-upnpmonitor / pom.xml
diff --git a/wamblee-upnpmonitor/pom.xml b/wamblee-upnpmonitor/pom.xml
new file mode 100644 (file)
index 0000000..0fb6e08
--- /dev/null
@@ -0,0 +1,121 @@
+<?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/maven-v4_0_0.xsd ">
+    
+    <parent>
+    <groupId>org.wamblee.upnpmonitor</groupId>
+    <artifactId>root</artifactId>
+    <version>0.1-SNAPSHOT</version>
+  </parent>
+    
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>wamblee-upnpmonitor</artifactId>
+       <packaging>rpm</packaging>
+    <name>/wamblee-upnpmonitor</name>
+       
+       <dependencies>
+           <dependency>
+                   <groupId>org.wamblee.upnpmonitor</groupId>
+                       <artifactId>monitor</artifactId>
+                       <version>0.1-SNAPSHOT</version>
+               </dependency>
+       </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>rpm-maven-plugin</artifactId>
+                <version>2.1-alpha-1</version>
+                <extensions>true</extensions>
+                <configuration>
+                    <changelogFile>CHANGELOG</changelogFile>
+                    <copyright>Apache License 2.0, 2010</copyright>
+                    <group>org.wamblee.server</group>
+                    <packager>Erik Brakkee</packager>
+                    
+                    <mappings>
+                        <mapping>
+                            <directory>/etc/init.d</directory>
+                            <filemode>755</filemode>
+                            <username>root</username>
+                            <groupname>root</groupname>
+                            <sources>
+                                <source>
+                                    <location>files/etc/init.d</location>
+                                </source>
+                            </sources>
+                        </mapping>
+                                               
+                                               <mapping>
+                                                   <directory>/opt/upnpmonitor/lib</directory>
+                                                       <filemode>755</filemode>
+                                                       <username>root</username>
+                                                       <groupname>root</groupname>
+                                                       <dependency/>
+                                               </mapping>
+                       
+                        <mapping>
+                            <directory>/etc/profile.d</directory>
+                            <username>root</username>
+                            <groupname>root</groupname>
+                            <sources>
+                                <source>
+                                    <location>files/etc/profile.d</location>
+                                </source>
+                            </sources>
+                        </mapping>
+        
+                        <mapping>
+                            <directory>/usr/share/doc/packages/wamblee-upnpmonitor</directory>
+                            <username>root</username>
+                            <groupname>root</groupname>
+                            <sources>
+                                <source>
+                                    <location>files/usr/share/doc/packages/wamblee-upnpmonitor</location>
+                                </source>
+                            </sources>
+                        </mapping>
+                        
+                    </mappings>
+                    <provides>
+                        <provide>upnpmonitor</provide>
+                    </provides>
+                    <requires>
+                        <require>java-1_6_0-sun-devel</require>
+                    </requires>
+                                       <preinstallScriptlet>
+                                          <script><![CDATA[
+                                              
+                                              if grep '^java:' /etc/passwd > /dev/null
+                                              then
+                                                echo "User java already exists." 1>&2
+                                              else
+                                                /usr/sbin/useradd -m java
+                                              fi
+                                              (
+                                                echo "Make sure that user java has login enabled!"
+                                                echo "(passwd java)"
+                                              ) 1>&2
+                                              
+                                              if [[ -r /etc/init.d/glassfish ]]
+                                              then
+                                                echo "This RPM does not support upgrade" 1>&2
+                                                exit 1
+                                              fi
+                                          
+                                          ]]></script>
+                                       </preinstallScriptlet>
+                    
+                    <preremoveScriptlet>
+                       <script><![CDATA[
+                          /etc/init.d/upnpmonitor stop
+                          /sbin/chkconfig upnpmonitor off
+                       ]]></script>
+                    </preremoveScriptlet>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+    
+</project>