Code

Remove obsolete log plugin, update build script
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 25 Nov 2010 13:22:11 +0000 (13:22 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 25 Nov 2010 13:22:11 +0000 (13:22 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20370 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/contrib/build-gosa
gosa-core/debian/control

index c7d756b310bbc144f31711adc7d310c73fd61e45..4d7923c35dcc0f847e8ef5b1e742e3e0ce7a03d6 100755 (executable)
@@ -45,7 +45,7 @@ def tar_create(name, source):
     tar.add(source)
     tar.close()
 
-def build(release, base_url, target="/tmp", method="svn", key_id=None, cleanup=True):
+def build(release, base_url, target="/tmp", method="svn", key_id=None, cleanup=True, smarty=False):
 
     # Absolutize target
     target = os.path.abspath(target)
@@ -69,19 +69,41 @@ def build(release, base_url, target="/tmp", method="svn", key_id=None, cleanup=T
         shutil.move(join(core_dir, "debian"), target_dir)
 
         # Remove all but .php files provided by GOsa
-        smarty_dir = join(core_dir, "include", "smarty")
-        for rfile in [f for f in os.listdir(join(smarty_dir, "plugins"))
-            if not f in ["block.render.php", "block.t.php", "function.msgPool.php",
-            "function.factory.php", "function.image.php"]]:
-
-            os.remove(join(smarty_dir, "plugins", rfile))
-
-        for rfile in [join(smarty_dir, f) for f in os.listdir(smarty_dir)]:
-            if os.path.basename(rfile) != "plugins":
-                if os.path.isdir(rfile):
-                    shutil.rmtree(rfile)
-                else:
-                    os.remove(rfile)
+        if not smarty:
+            smarty_dir = join(core_dir, "include", "smarty")
+            for rfile in [f for f in os.listdir(join(smarty_dir, "plugins"))
+                if not f in ["block.render.php", "block.t.php", "function.msgPool.php",
+                "function.factory.php", "function.image.php"]]:
+
+                os.remove(join(smarty_dir, "plugins", rfile))
+
+            for rfile in [join(smarty_dir, f) for f in os.listdir(smarty_dir)]:
+                if os.path.basename(rfile) != "plugins":
+                    if os.path.isdir(rfile):
+                        shutil.rmtree(rfile)
+                    else:
+                        os.remove(rfile)
+
+            # Remove smarty3 package section
+            out = ""
+            control = join(tmp_dir, "debian", "control")
+            data = open(control, 'r')
+            remove = False
+
+            for line in data:
+                line = line.strip()
+                if line == "Package: smarty3":
+                    remove = True
+            
+                if not remove:
+                    out += line + "\n"
+
+                if remove and line == "":
+                    remove = False
+
+            of = open(control, 'w')
+            of.write(out)
+            of.close()
 
         # Get target version number
         version = None
@@ -162,6 +184,9 @@ def main():
     op.add_option("-s", "--source", dest="source",
         default="https://oss.gonicus.de/repositories/gosa",
         help="retrieval base path [%default]", metavar="URL")
+    op.add_option("-a", "--with-smarty", dest="smarty",
+        default=False, action="store_true",
+        help="retrieval base path [%default]")
     op.add_option("-t", "--target", dest="target",
         default=".",
         help="target directory [%default]", metavar="PATH")
@@ -192,7 +217,7 @@ def main():
 
     # Start build
     build(release, options.source, options.target,
-        options.method, options.key_id, options.cleanup)
+        options.method, options.key_id, options.cleanup, options.smarty)
 
 
 """ Main GOsa packaging aid """
index 7c617e9d57fac48726fa37d11d2221fbb88d7d06..686b0fd5776cd19891790dc7d20dc16aa4776fc6 100644 (file)
@@ -247,27 +247,6 @@ Description: ldapmanager plugin for GOsa²
  GOsa² is a combination of system-administrator and end-user web
  interface, designed to handle LDAP based setups.
 
-Package: gosa-plugin-log
-Architecture: all
-Depends: ${misc:Depends}, gosa, gosa-plugin-systems
-Breaks: gosa (<<2.6)
-Description: log plugin for GOsa²
- Syslog and GOsa² logging management plugin
- .
- GOsa² is a combination of system-administrator and end-user web
- interface, designed to handle LDAP based setups.
-
-Package: gosa-plugin-log-schema
-Architecture: all
-Depends: ${misc:Depends}
-Recommends: slapd
-Description: LDAP schema for GOsa² log plugin
- This package includes the LDAP schema needed by the GOsa²
- log plugin.
- .
- GOsa² is a combination of system-administrator and end-user web
- interface, designed to handle LDAP based setups.
-
 Package: gosa-plugin-mail
 Architecture: all
 Depends: ${misc:Depends}, gosa, gosa-plugin-systems