[med-svn] r2538 - in trunk/packages/agdbnet/trunk/debian: . patches

tille at alioth.debian.org tille at alioth.debian.org
Thu Sep 25 13:54:17 UTC 2008


Author: tille
Date: 2008-09-25 13:54:15 +0000 (Thu, 25 Sep 2008)
New Revision: 2538

Added:
   trunk/packages/agdbnet/trunk/debian/patches/20_metainfo.patch
Modified:
   trunk/packages/agdbnet/trunk/debian/README.Debian
   trunk/packages/agdbnet/trunk/debian/patches/series
Log:
Enable more fine grained configuration of header information


Modified: trunk/packages/agdbnet/trunk/debian/README.Debian
===================================================================
--- trunk/packages/agdbnet/trunk/debian/README.Debian	2008-09-25 06:52:21 UTC (rev 2537)
+++ trunk/packages/agdbnet/trunk/debian/README.Debian	2008-09-25 13:54:15 UTC (rev 2538)
@@ -69,4 +69,49 @@
 testing proper operation.
 
 
+Adapting Layout
+---------------
+
+The original agdbnet code regards 4 files which can be provided by the
+user to influence the layout of the output.  Because these files should
+be editable by the user they are considered config files in Debian and
+are placed under /etc/agdbnet.  A subdirectory with the same name as
+the database is created at package installation time which contains
+the following files:
+
+  header.html    - output after <body> tag (before any agdbnet content)
+  banner.html    - output after headline of agdbnet output
+  footer.html    - output before </body> (after any agdbnet content)
+  stylesheet.css - CSS stylesheet for the whole output
+
+The Debian package installs very simple templates for these files.
+You should edit or delete these files because they print should
+messages inbetween your output to visualise the effect.
+
+For the agcurate.pl scripts the files
+
+  curate_footer.html
+  curate_header.html
+
+take over the role of the respective files above.
+
+A specific Debian extension is the option to provide a file
+
+  meta.html
+
+where you can specify the following type of header information:
+
+  <meta name="<your meta info name>" content="<your meta info content>" />
+
+like for instance
+
+  <meta name="date" content="2008-09-25" />
+
+and a shortcut icon for instance
+
+  <link rel="shortcut icon" href="/agdbnet/databasename/favicon.gif" type="image/gif" />
+
+A patch in the Debian packaged version of agdbnet enables this feature
+which is not (yet) supportet upstream.
+
  -- Andreas Tille <tillea at rki.de>, Wed, 24 Sep 2008 14:23:04 +0200

Added: trunk/packages/agdbnet/trunk/debian/patches/20_metainfo.patch
===================================================================
--- trunk/packages/agdbnet/trunk/debian/patches/20_metainfo.patch	                        (rev 0)
+++ trunk/packages/agdbnet/trunk/debian/patches/20_metainfo.patch	2008-09-25 13:54:15 UTC (rev 2538)
@@ -0,0 +1,56 @@
+--- agdbnet_v1.0.0.orig/cgi-bin/agdbnet.pl
++++ agdbnet_v1.0.0/cgi-bin/agdbnet.pl
+@@ -196,6 +196,25 @@
+ 	}
+ 	my $stylesheet = "$system{'webroot'}/$system{'longcode'}/stylesheet.css";
+ 	print $q->header( -expires => '+1d' );
++        my $metafile = "$ENV{'DOCUMENT_ROOT'}$system{'webroot'}/$system{'longcode'}/meta.html";
++        my %metacontent;
++        my %shortcuticon;
++        if ( -e $metafile ) {
++		if ( open( FILE, $metafile ) ) {
++                	while ( <FILE> ) {
++				if ( $_ =~ /<meta\s+name="([^"]+)"\s+content="([^"]+)"\s*\/?>/ ) {
++					$metacontent{$1} = $2;
++				}
++				if ( $_ =~ /<link\s+rel="shortcut icon"\s+href="([^"]+)"\s+type="([^"]+)"\s*\/?>/ ) {
++					$shortcuticon{'-rel'}  = 'shortcut icon';
++                                        $shortcuticon{'-href'} = $1;
++                                        $shortcuticon{'-type'} = $2;
++				}
++                        }
++                        close FILE;
++                }
++	}
++
+ 	if ( $page eq 'version' ) {
+ 		print $q->start_html( -title => "agdbNet version $version" );
+ 		print "<h1>agdbNet</h1>";
+@@ -229,11 +248,22 @@
+ 		print $q->end_html;
+ 		return;
+ 	} else {
+-		print $q->start_html(
+-			-title    => $system{'description'},
+-			-encoding => 'UTF-8',
+-			-style    => { 'src' => $stylesheet }
+-		);
++		if ( %shortcuticon ) {
++			print $q->start_html(
++				-title    => $system{'description'},
++				-encoding => 'UTF-8',
++				-meta     => { %metacontent },
++				-style    => { -src => $stylesheet },
++				-head     => CGI->Link({ %shortcuticon })
++			);
++		} else {
++			print $q->start_html(
++				-title    => $system{'description'},
++				-encoding => 'UTF-8',
++				-meta     => { %metacontent },
++				-style    => { -src => $stylesheet }
++			);
++		}
+ 	}
+ 
+ 	#Check if header file exists, if so print it

Modified: trunk/packages/agdbnet/trunk/debian/patches/series
===================================================================
--- trunk/packages/agdbnet/trunk/debian/patches/series	2008-09-25 06:52:21 UTC (rev 2537)
+++ trunk/packages/agdbnet/trunk/debian/patches/series	2008-09-25 13:54:15 UTC (rev 2538)
@@ -4,3 +4,4 @@
 11_moreinfo.patch
 12_apache_is_web-data.patch
 13_ident_authentication.patch
+20_metainfo.patch




More information about the debian-med-commit mailing list